Contributions
Re: Write SOAP Body to File for Mock Service
Richie OK, an update. I have been able to get hold of the Request i.e. the SOAP Envelope using the following... def request = mockRequest.getRequestContent() Now I need to extract the payload inside the SOAP Body. That's what I need help on now.1.9KViews0likes4CommentsRe: Write SOAP Body to File for Mock Service
Richie Apologies for the delay. What I want to get is the Request which contains the Soap Envelope inside is the Soap Body and inside this is the payload message Its the payload message inside the Soap Body I want to save off to a file. I have tried the following... def req = new XmlHolder(messageExchange.requestContent) def req = new XmlHolder(mockRequest.requestContent) def req = new XmlHolder(context.request) def req = new XmlSlurper(messageExchange.requestContent) def req = new XmlSlurper(mockRequest.requestContent) def req = new XmlSlurper(context.request) ...but I get either an error or null returned.1.9KViews0likes5CommentsRe: Write SOAP Body to File for Mock Service
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 Stewart2KViews0likes7CommentsWrite SOAP Body to File for Mock Service
I have a Mock Service running in SOAPUI and I want to get the message inside the SOAP Body for the Request and write it out to a file. I have tried many methods but just can't seem to get the SOAP Body. I can get the Request which is the SOAP Envelope but get stuck here. I am writing some groovy script in the OnRequest Script for the Mock Service, not sure if this is the right place. Any help would be most appreciated.2.1KViews0likes9Comments