Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
957 views
in Technique[技术] by (71.8m points)

groovy - How to modify soap request to match the wsdl architecture of mock server in SOAPUI?

I created a mocker server for an endpoint I am trying to mock using the open source soapui. A request that is sent to my mock server but it doesn't match the request body create by the wsdl. I do not have control over the sent request. Is there a way to change to incoming request body in soapui to match the architecture of the wsdl?

Example Request body:

<AddressSearch><city>SALEM</city><state>MA</state><DelvZIPCode /><primaryNbr>123</primaryNbr><StrName>S</StrName><ReturnOptions>S</ReturnOptions><SecNbr /><RequestID>3996025602510120161159</RequestID><MaxRecord>1000</MaxRecord><RelCntl /></AddressSearch>

Example of Expected Request body by SoupUI:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:def="http://DefaultNamespace">
   <soapenv:Header/>
   <soapenv:Body>
      <def:AddressSearch soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <DelvZIPCode xsi:type="xsd:string">?</DelvZIPCode>
         <city xsi:type="xsd:string">?</city>
         <state xsi:type="xsd:string">?</state>
         <primaryNbr xsi:type="xsd:string">?</primaryNbr>
         <StrName xsi:type="xsd:string">?</StrName>
         <SecNbr xsi:type="xsd:string">?</SecNbr>
         <ReturnOptions xsi:type="xsd:string">?</ReturnOptions>
         <RequestID xsi:type="xsd:string">?</RequestID>
         <MaxRecord xsi:type="xsd:string">?</MaxRecord>
         <RelCntl xsi:type="xsd:string">?</RelCntl>
      </def:AddressSearch>
   </soapenv:Body>
</soapenv:Envelope>
question from:https://stackoverflow.com/questions/66056089/how-to-modify-soap-request-to-match-the-wsdl-architecture-of-mock-server-in-soap

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...