Forum Discussion

tanu08's avatar
13 years ago

Cant extract input for next request from JSON soap response

How can I extract input for next request from JSON format soap response.
In my project we are using Json-gson conversion type for SOAP response.

I am getting following SOAP Json format response from first request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:sessionStartResponse xmlns:ns="http://service.webservice.cryoserver.ci">
<ns:return>{
"message": "OK",
"errorStatus": 0,
"responseObject": "69038762-8e92-45fb-bce9-954a0158488d"
}</ns:return>
</ns:sessionStartResponse>
</soapenv:Body>
</soapenv:Envelope>

I want to Extract 'responseObject' from above response (its a session id), which we need to use as input for second Soap request.
Could you please help me as I am stuck here, I cant do this with XPATH or XQuery. And if Grovy is required here then could you please also tell me the steps for the same.

Any help will be appreciated in advance.
No RepliesBe the first to reply