web stats
Translate XML no protocol error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-09-2015, 07:48 AM
mirth wendito mirth wendito is offline
What's HL7?
 
Join Date: Sep 2015
Posts: 1
mirth wendito is on a distinguished road
Cool Translate XML no protocol error

I wonder if anyone would be able to help please?
I'm trying to translate an XML message and not getting very far.

I'm getting the following error :
Wrapped javax.xml.transform.TransformerConfigurationExcept ion: no protocol: \ip_address\folder\cdcatalog.xsl


on this line :
var transformer = tFactory.newTransformer( xslSource );


from this code :
importPackage(Packages.javax.xml.transform);
importPackage(Packages.javax.xml.transform.stream) ;
// Create the transformer factory
var tFactory = TransformerFactory.newInstance();

// Load XSL file
var xslSource = new StreamSource(' \\\\ip_address\\folder\\cdcatalog.xsl');

if (xslSource==null)
logger.error('error loading XSL');

// Create a new transformer using this transformation
var transformer = tFactory.newTransformer( xslSource );
var bos = new java.io.ByteArrayOutputStream();

// Create an inputstream using the raw message
var msg_sbis = new java.io.StringBufferInputStream(messageObject.getR awData()); // use msg to get internal Mirth XML representation

// Apply the XSL to the message
transformer.transform( new StreamSource(msg_sbis),new StreamResult( bos ));


I've tried it with and without the ip address, same error.

Thanking you in advance for any help offered.
Reply With Quote
Reply

Tags
xslt

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation