Is there a way to parse a SOAP webservice response in an expression rule and pop

Is there a way to parse a SOAP webservice response in an expression rule and populate the CDT? For example, my webservice returns response in the following format-
<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/.../">
<soapenv:Body>
<ns1:getBankResponse xmlns:ns1="thomas-bayer.com/.../">
<ns1:details>
<ns1:bezeichnung>Aachener Bank</ns1:bezeichnung>
<ns1:bic>GENODED1AAC</ns1:bic>
<ns1:ort>Aachen</ns1:ort>
<ns1:plz>52001</ns1:plz>
</ns1:details>
</ns1:getBankResponse>
</soapenv:Body>
</soapenv:Envelope>
I want to use an expression rule to parse this response and populate a CDT. I used xpathsnippet to parse the above response, but it is throwing-"An error occurred while trying to parse the XML stream".

OriginalPostID-147519

OriginalPostID-147519

  Discussion posts and replies are publicly visible

Parents
  • Thanks Travis.
    I created a very simple CDT: Envelope with just one field: Body, and used the torecord function to populate the CDT with the above SOAP response, but it is throwing the following error- "[Lorg.json.JSONObject; cannot be cast to [Lcom.appiancorp.suiteapi.process.TypedVariable;"
    Also, the documentation for torecord method says: type: (Any Type) Enter a variable (process variable or activity class) that has the same data type that you want the XML to be converted into.
    In my case, I do not have a process model for this. I simply want to populate my CDT with the response from the above SOAP response. The CDT is expected to have the fields- bezeichnung, bic,ort,plz and the response can return multiple elements with <ns1:details>, so I'll have an array of CDTs.
    Thanks in advance.
Reply
  • Thanks Travis.
    I created a very simple CDT: Envelope with just one field: Body, and used the torecord function to populate the CDT with the above SOAP response, but it is throwing the following error- "[Lorg.json.JSONObject; cannot be cast to [Lcom.appiancorp.suiteapi.process.TypedVariable;"
    Also, the documentation for torecord method says: type: (Any Type) Enter a variable (process variable or activity class) that has the same data type that you want the XML to be converted into.
    In my case, I do not have a process model for this. I simply want to populate my CDT with the response from the above SOAP response. The CDT is expected to have the fields- bezeichnung, bic,ort,plz and the response can return multiple elements with <ns1:details>, so I'll have an array of CDTs.
    Thanks in advance.
Children
No Data