Note that there are some explanatory texts on larger screens.

plurals
  1. POMove namespace from SOAP envelope root to xml payload
    primarykey
    data
    text
    <p>I've got a soap envelope that is returned from a encoded RPC PHP service that I wrote that declares a namespace in the root node of the SOAP envelope. However, I want that namespace to be in the root node of the xml payload in the SOAP body. Basically, I want this:</p> <pre><code>&lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://sample.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org /soap/encoding/"&gt; &lt;SOAP-ENV:Body&gt; &lt;ns1:ServiceResponse&gt; &lt;outgoingVar1&gt;true&lt;/outgoingVar1&gt; &lt;/ns1:ServiceResponse&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>to become this:</p> <pre><code>&lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org /2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP- ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;SOAP-ENV:Body&gt; &lt;ServiceResponse xmlns="http://sample.com"&gt; &lt;outgoingVar1&gt;true&lt;/outgoingVar1&gt; &lt;/ServiceResponse&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>and here is my annotated (left out trivial namespace declarations) WSDL as it stands right now:</p> <pre><code>&lt;wsdl:definitions name="IJLSoapResponse" targetNamespace="http://casey.com" tns="http://casey.com" xmlns:samp="http://sample.com" ...&gt; &lt;wsdl:types&gt; &lt;xsd:schema targetNamespace="http://casey.com" ...&gt; &lt;xsd:element name="incomingVar1" type="xsd:string" nillable="true"/&gt; &lt;xsd:element name="incomingVar2" type="xsd:string" nillable="true"/&gt; &lt;/xsd:schema&gt; &lt;xsd:schema targetNamespace="http://sample.com" ...&gt; &lt;xsd:element name="outgoingVar1" type="xsd:boolean" nillable="true"/&gt; &lt;/xsd:schema&gt; &lt;/wsdl:types&gt; &lt;wsdl:message name="ServiceInput"&gt; &lt;wsdl:part name="incomingVar1" element="tns:incomingVar1"/&gt; &lt;wsdl:part name="incomingVar2" element="tns:incomingVar2"/&gt; &lt;/wsdl:message&gt; &lt;wsdl:message name="ServiceOutput"&gt; &lt;wsdl:part name="outgoingVar1" element="samp:outgoingVar1"/&gt; &lt;/wsdl:message&gt; &lt;wsdl:portType name="ServicePortType"&gt; &lt;wsdl:operation name="ServiceMessage" parameterOrder="incomingVar1 incomingVar2"&gt; &lt;wsdl:input name="ServiceMessageRequest" message="tns:ServiceInput"/&gt; &lt;wsdl:output name="ServiceMessageResponse" message="tns:ServiceOutput"/&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:portType&gt; &lt;wsdl:binding name="ServiceBinding" type="tns:ServicePortType"&gt; &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt; &lt;wsdl:operation name="ServiceMessage"&gt; &lt;soap:operation soapAction="http://casey.com/soap/Service"/&gt; &lt;wsdl:input name="ServiceRequest"&gt; &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://casey.com"/&gt; &lt;/wsdl:input&gt; &lt;wsdl:output name="ServiceResponse"&gt; &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://sample.com"/&gt; &lt;/wsdl:output&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:binding&gt; &lt;wsdl:service name="ServiceService"&gt; &lt;wsdl:port name="ServicePort" binding="tns:ServiceBinding"&gt; &lt;soap:address location="http://casey.com/soap/Service"/&gt; &lt;/wsdl:port&gt; &lt;/wsdl:service&gt; &lt;/wsdl:definitions&gt; </code></pre> <p>Is there something in the WSDL that can be changed in order to force that namespace into the payload? I've tried moving it around to several different places to no avail. Thanks for your help.</p> <p>PS If you see something wrong with the WSDl as far as it not being validating or something similar, just disregard it...the original validates/deploys/works fine. I'm more worried about where I can put the namespace. Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload