Announcement

Collapse
No announcement yet.

WSDL Response - how to access the data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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......

  • #2
    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();

    Comment

    Working...
    X