sudzc generates wrong soap request

514 Views Asked by At

I tried to use Sudzc to generate my SOAP requests. But the generated requests are wrong. Below are the Sudzc generated soap request and the working SoapUI request of a very simple example request. Has anybody experienced the same problems?

Sudzc generated soap request:

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:sap-com:document:sap:soap:functions:mc-style">
    <soap:Body>
        <urn:ZcaptoSccMatDet>
            <IvMatnr>D300</IvMatnr>
        </urn:ZcaptoSccMatDet>
    </soap:Body>
</soap:Envelope>

Working SoapUI generated message:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap com:document:sap:soap:functions:mc-style">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:ZcaptoSccMatDet>
         <IvMatnr>D300</IvMatnr>
      </urn:ZcaptoSccMatDet>
   </soapenv:Body>
</soapenv:Envelope>
1

There are 1 best solutions below

0
On BEST ANSWER

Kay,

If you need to change the output to soapenv take a look at the (Sudzc generated) code in Soap.m. In particular, check out the createEnvelope method. You can update the hardcoded references in this method from soap to soapenv.