web stats
WSDL Response - how to access the data - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2015, 06:54 AM
leaflet leaflet is offline
OBX.1 Kenobi
 
Join Date: Sep 2010
Posts: 32
leaflet is on a distinguished road
Default WSDL Response - how to access the data

I have the following WSDL response and would like to get the data of EUID and resultCode from the response. How can I do that using E4X.

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:executeMatchUpdateResponse xmlns:ns2="http://webservice.index.mdm.sun.com/">
<matchColResult>
<EUID>0000135305</EUID>
<resultCode>1</resultCode>
</matchColResult>
</ns2:executeMatchUpdateResponse>
</S:Body>
</S:Envelope>

Here is how I am getting the response stored in a responseMessage variable from the destination call "To_Dest"

var responseMessage=new XML(responseMap.get('To_Dest').getMessage());

Thanks in advance......
Reply With Quote
  #2  
Old 03-18-2015, 01:12 PM
leaflet leaflet is offline
OBX.1 Kenobi
 
Join Date: Sep 2010
Posts: 32
leaflet is on a distinguished road
Default

I was able to find the solution.... It was from one of the support question and response from the forum....

var respVal = responseMap.get('Mirth Web Service').getMessage();
resp = new XML(respVal);
var S = new Namespace('http://schemas.xmlsoap.org/soap/envelope/');
var ns2 = new Namespace('http://ws.connectors.connect.mirth.com/');
var tagX = resp.S::Body.ns2::acceptMessageResponse['return'].toString();
Reply With Quote
Reply

Tags
e4x

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 03:48 AM.


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