web stats
Handling namespaces in JavaScript XML constructor - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-05-2015, 03:41 PM
ahart ahart is offline
OBX.2 Kenobi
 
Join Date: Oct 2014
Posts: 56
ahart is on a distinguished road
Question Handling namespaces in JavaScript XML constructor

I have some javascript code in a channel scoped code template function that was running in Mirth 2.3 where I create an XMl object from a String containing XML.

e.g., var resultXml = new XML(responseMap.get('Call DIS').getMessage());

I'm converting to Mirth 3.2. Now, I'm getting an error because it's encountering some elements with a namespace prefix:

LINE NUMBER: 198
DETAILS: TypeError: The prefix "S" for element "S:Envelope" is not bound.

I've spent a few hours now fruitlessly looking for the correct way to declare the namespace.

I tried preceding this with:
var soap = new Namespace("S","http://schemas.xmlsoap.org/soap/envelope/");
default xml namespace=soap;

and also...

XML.addNamespace(soap);
XML.setNamespace(soap);

What is the correct way to do this?
Reply With Quote
 

Tags
e4x, javascript, namespaces, xml

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 06:14 PM.


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