Forum Discussion
Wow, a reply, thank you! Script Dispatcher, I'd have to search on that. Below is my script from the OnRequestScript tab. It accepts a mock request, reads it, parses out a message ID and uses that to simply write a file to disk using messageId in the file name. See anything? I uses log.info statements to see the the full request on attempt 1, but truncation on attempt 2, time and again.
//Directory where the SOAP request XML is stored in the file system with messageId as the file name.
def soapRequestFilePath = "D:/aisIntegrationTesting/inbound/";
def requestObject = mockRequest.getRequestXmlObject().toString();
//Parse the SOAP request XML file to get the messageID.
def xmlRequest = new XmlSlurper().parseText(requestObject);
def messageId = xmlRequest.Body.DocumentExchangeInput.exchangeEnvelope.@messageID;
log.info ("messageId : $messageId");
def fileName = new File("$soapRequestFilePath"+"$messageId"+".xml");
fileName.write(requestObject);
Related Content
- 8 years ago
- 9 years ago
Recent Discussions
- 11 days ago