Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

soap:Header elements (implicit soap:Header) not present after proxy generation for json to soap to json

Not applicable

We've had this issue with this WSDL before with other proxy generation services and it ends up taking some extra work. So, this is likely possible here at Apigee as well, but I could just be missing how it's done. I searched for a while, but couldn't find the solution. Here is a snippet of the soap:header portion of a "valid" request to the service, taken from SoapUI:

   <soapenv:Header>
      <urn:password xsi:type="xsd:string">?</urn:password>
      <urn:accesskey xsi:type="xsd:string">?</urn:accesskey>
   </soapenv:Header>

The only way to get SoapUI to put the password and accesskey elements into the soapenv:Header body is to do this in the binding->operation->input element

        <soap:header message="tns:AuthenticationRequestHeaders" part="accesskey" use="encoded" />
        <soap:header message="tns:AuthenticationRequestHeaders" part="password" use="encoded" />

This doesn't seem to work here at Apigee. This is from the API Proxy, develop tab, build soap, for one of the WSDL services:

        <Payload contentType="text/xml">
            <soapenv:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="urn:OnForce_WorkOrder" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soapenv:encodingStyle="{encodingStyle}">
                <soapenv:Body>
                    <tns:WorkOrderGet>
                        <workorderid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="{type}">{workorderid}</workorderid>
                    </tns:WorkOrderGet>
                </soapenv:Body>
            </soapenv:Envelope>
        </Payload>

You can see there is no soapenv:Header section where password and accesskey would be accessible and available to populating with a value. The idea in this json to soap to json example would be to accept the accesskey and password through a json payload and inject them into the soapenv:Header element values.

A copy of the full WSDL is found here, but doesn't have the mods I've added into the binding->operation->input sections and extra complex types.

Thanks for any pointers and suggestions you can give.

1 5 4,744
5 REPLIES 5