Forum Discussion
Admins
Occasional Contributor
Rich
Yes, I want the XML Payload (ApplicationOutcomeUpdate) in the SOAP Body...
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
<s:Body>
<ns0:ApplicationOutcomeUpdate xmlns:ns0="http://CompanyA/v1">....
...and I have a MockService which accepts this Request from an Application and I want to save the XML Payload inside the SOAP Body to a file.
I have got the Request using...
def request = new XmlParser().parseText(mockRequest.requestContent)
I then try and use XmlHolder, XmlSlurper or XmlParser to extract the Xml I need inside the SOAP Body but all I seem to get is Null.
Regards
Stewart
richie
4 years agoCommunity Hero
Hey Admins,
Cool, i might be able to help with th4 groovy, but the real scripters on here are better placed to do that.
Can you provide exactly whst you've tried using each of the xml scraping methods you mention? There's no point me duplicating effort.
It shouldn't be strsightforward to extract the whole response the whole envelope, then it just needs a bit of tinkering to scrape thr payload from the soapbody.
I've just re-read what you've written. Are you saying you want to save the payload from the request or the response? It sounds like you want to save the request...
Ta
Rich
Cool, i might be able to help with th4 groovy, but the real scripters on here are better placed to do that.
Can you provide exactly whst you've tried using each of the xml scraping methods you mention? There's no point me duplicating effort.
It shouldn't be strsightforward to extract the whole response the whole envelope, then it just needs a bit of tinkering to scrape thr payload from the soapbody.
I've just re-read what you've written. Are you saying you want to save the payload from the request or the response? It sounds like you want to save the request...
Ta
Rich
Related Content
Recent Discussions
- 6 days agoruchisingh