You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by "Laydier, Sabine" <sa...@eads.com> on 2008/07/23 16:59:29 UTC

SOAP envelope namespace : version mismatch

Hello,

 

I am currently developing my first business process using ODE 1.2 as jbi
component in servicemix 3.2.1.

This is a very simple process copying data from one message to another and
invoking a web service.

My problem is the following: the envelope namespace sent to my web service
doesn't match to the one expected and I get a VersionMismatch fault from it.

 

Here is the message sent by ode/smix:

<?xml version='1.0' encoding='UTF-8'?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

    <env:Body>

       <Test2In xmlns="http://mycompany.net/jws/test/schema/in2/">          

          <text xmlns="">some text</text>      

       </Test2In>

    </env:Body>

</env:Envelope>

 

Here is the message I get from my web service:

<?xml version="1.0" ?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

   <S:Body>

      <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">

         <faultcode>ns2:VersionMismatch</faultcode>

         <faultstring>Couldn't create SOAP message. Expecting Envelope in
namespace http://schemas.xmlsoap.org/soap/envelope/, but got
http://www.w3.org/2003/05/soap-envelope </faultstring>

      </ns2:Fault>    

   </S:Body>

</S:Envelope>

 

Is there a way to get the right namespace generated?

 

Please find below the WSDL of my test web service:

<?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 

            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

            xmlns:in2="http://mycompany.net/jws/test/schema/in2/"

            xmlns:out2="http://mycompany.net/jws/test/schema/out2/" 

            xmlns:smix="http://servicemix.org/wsdl/jbi/"

            xmlns:jws="http://mycompany.net/jws/test/" 

            targetNamespace="http://mycompany.net/jws/test/">

            <types>

                        <schema
targetNamespace="http://mycompany.net/jws/test/schema/in2/"

 
xmlns="http://www.w3.org/2000/10/XMLSchema">

                                   <element name="Test2In">

                                               <complexType>

                                                           <all>

 
<element name="text" type="string" />

                                                           </all>

                                               </complexType>

                                   </element>

                        </schema>

                        <schema
targetNamespace="http://mycompany.net/jws/test/schema/out2/"

 
xmlns="http://www.w3.org/2000/10/XMLSchema">

                                   <element name="Test2Out">

                                               <complexType>

                                                           <all>

 
<element name="text" type="string" />

                                                           </all>

                                               </complexType>

                                   </element>

                        </schema>

            </types>

 

            <message name="MsgTest2In">

                        <part name="parameter" element="in2:Test2In" />

            </message>

            <message name="MsgTest2Out">

                        <part name="parameter" element="out2:Test2Out" />

            </message>

 

            <portType name="PTTest">

                        <operation name="invoke2">

                                   <input message="jws:MsgTest2In" />

                                   <output message="jws:MsgTest2Out" />

                        </operation>

            </portType>

 

            <binding name="BITestSOAP" type="jws:PTTest">

                        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />

                        <operation name="invoke2">

                                   <soap:operation soapAction="urn:#invoke2"
/>

                                   <input>

                                               <soap:body use="literal" />

                                   </input>

                                   <output>

                                               <soap:body use="literal" />

                                   </output>

                        </operation>

            </binding>

 

            <service name="TestWS">

                        <port name="PTTest" binding="jws:BITestSOAP">

                                   <soap:address
location="http://localhost:7000/TestBeanService/TestBean" />

                                   <smix:endpoint role="provider"
defaultMep="in-out" />

                        </port>

            </service>

</definitions>

 

Thanks,

 

Sabine


Re: SOAP envelope namespace : version mismatch

Posted by Alex Boisvert <bo...@intalio.com>.
Hi Sabine,

It appears you have a mismatch between SOAP 1.1 and SOAP 1.2 formats.  Your
process sends a SOAP 1.2 message but the receiver is expecting SOAP 1.1.

You can configure the ServiceMix HTTP binding to use SOAP 1.1, see
http://servicemix.apache.org/servicemix-http.html

alex


On Wed, Jul 23, 2008 at 7:59 AM, Laydier, Sabine <sa...@eads.com>
wrote:

> Hello,
>
>
>
> I am currently developing my first business process using ODE 1.2 as jbi
> component in servicemix 3.2.1.
>
> This is a very simple process copying data from one message to another and
> invoking a web service.
>
> My problem is the following: the envelope namespace sent to my web service
> doesn't match to the one expected and I get a VersionMismatch fault from
> it.
>
>
>
> Here is the message sent by ode/smix:
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
>
>    <env:Body>
>
>       <Test2In xmlns="http://mycompany.net/jws/test/schema/in2/">
>
>          <text xmlns="">some text</text>
>
>       </Test2In>
>
>    </env:Body>
>
> </env:Envelope>
>
>
>
> Here is the message I get from my web service:
>
> <?xml version="1.0" ?>
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
>
>   <S:Body>
>
>      <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
>
>         <faultcode>ns2:VersionMismatch</faultcode>
>
>         <faultstring>Couldn't create SOAP message. Expecting Envelope in
> namespace http://schemas.xmlsoap.org/soap/envelope/, but got
> http://www.w3.org/2003/05/soap-envelope </faultstring>
>
>      </ns2:Fault>
>
>   </S:Body>
>
> </S:Envelope>
>
>
>
> Is there a way to get the right namespace generated?
>
>
>
> Please find below the WSDL of my test web service:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
>
>            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>            xmlns:in2="http://mycompany.net/jws/test/schema/in2/"
>
>            xmlns:out2="http://mycompany.net/jws/test/schema/out2/"
>
>            xmlns:smix="http://servicemix.org/wsdl/jbi/"
>
>            xmlns:jws="http://mycompany.net/jws/test/"
>
>            targetNamespace="http://mycompany.net/jws/test/">
>
>            <types>
>
>                        <schema
> targetNamespace="http://mycompany.net/jws/test/schema/in2/"
>
>
> xmlns="http://www.w3.org/2000/10/XMLSchema">
>
>                                   <element name="Test2In">
>
>                                               <complexType>
>
>                                                           <all>
>
>
> <element name="text" type="string" />
>
>                                                           </all>
>
>                                               </complexType>
>
>                                   </element>
>
>                        </schema>
>
>                        <schema
> targetNamespace="http://mycompany.net/jws/test/schema/out2/"
>
>
> xmlns="http://www.w3.org/2000/10/XMLSchema">
>
>                                   <element name="Test2Out">
>
>                                               <complexType>
>
>                                                           <all>
>
>
> <element name="text" type="string" />
>
>                                                           </all>
>
>                                               </complexType>
>
>                                   </element>
>
>                        </schema>
>
>            </types>
>
>
>
>            <message name="MsgTest2In">
>
>                        <part name="parameter" element="in2:Test2In" />
>
>            </message>
>
>            <message name="MsgTest2Out">
>
>                        <part name="parameter" element="out2:Test2Out" />
>
>            </message>
>
>
>
>            <portType name="PTTest">
>
>                        <operation name="invoke2">
>
>                                   <input message="jws:MsgTest2In" />
>
>                                   <output message="jws:MsgTest2Out" />
>
>                        </operation>
>
>            </portType>
>
>
>
>            <binding name="BITestSOAP" type="jws:PTTest">
>
>                        <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>
>                        <operation name="invoke2">
>
>                                   <soap:operation soapAction="urn:#invoke2"
> />
>
>                                   <input>
>
>                                               <soap:body use="literal" />
>
>                                   </input>
>
>                                   <output>
>
>                                               <soap:body use="literal" />
>
>                                   </output>
>
>                        </operation>
>
>            </binding>
>
>
>
>            <service name="TestWS">
>
>                        <port name="PTTest" binding="jws:BITestSOAP">
>
>                                   <soap:address
> location="http://localhost:7000/TestBeanService/TestBean" />
>
>                                   <smix:endpoint role="provider"
> defaultMep="in-out" />
>
>                        </port>
>
>            </service>
>
> </definitions>
>
>
>
> Thanks,
>
>
>
> Sabine
>
>

Re: SOAP envelope namespace : version mismatch

Posted by Matthieu Riou <ma...@offthelip.org>.
On Wed, Jul 23, 2008 at 7:59 AM, Laydier, Sabine <sa...@eads.com>
wrote:

> Hello,
>
>
>
> I am currently developing my first business process using ODE 1.2 as jbi
> component in servicemix 3.2.1.
>
> This is a very simple process copying data from one message to another and
> invoking a web service.
>
> My problem is the following: the envelope namespace sent to my web service
> doesn't match to the one expected and I get a VersionMismatch fault from
> it.
>
>
Your WSDL document seems to use SOAP 1.1 but in your message, the namespace
is the SOAP 1.2 one. That's probably why the Servicemix binding component
decides to reply with a SOAP 1.1 message (I believe ODE is only forging the
body of the message in ServiceMix).

Cheers,
Matthieu


>
>
> Here is the message sent by ode/smix:
>
> <?xml version='1.0' encoding='UTF-8'?>
>
> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
>
>    <env:Body>
>
>       <Test2In xmlns="http://mycompany.net/jws/test/schema/in2/">
>
>          <text xmlns="">some text</text>
>
>       </Test2In>
>
>    </env:Body>
>
> </env:Envelope>
>
>
>
> Here is the message I get from my web service:
>
> <?xml version="1.0" ?>
>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
>
>   <S:Body>
>
>      <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
>
>         <faultcode>ns2:VersionMismatch</faultcode>
>
>         <faultstring>Couldn't create SOAP message. Expecting Envelope in
> namespace http://schemas.xmlsoap.org/soap/envelope/, but got
> http://www.w3.org/2003/05/soap-envelope </faultstring>
>
>      </ns2:Fault>
>
>   </S:Body>
>
> </S:Envelope>
>
>
>
> Is there a way to get the right namespace generated?
>
>
>
> Please find below the WSDL of my test web service:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
>
>            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>            xmlns:in2="http://mycompany.net/jws/test/schema/in2/"
>
>            xmlns:out2="http://mycompany.net/jws/test/schema/out2/"
>
>            xmlns:smix="http://servicemix.org/wsdl/jbi/"
>
>            xmlns:jws="http://mycompany.net/jws/test/"
>
>            targetNamespace="http://mycompany.net/jws/test/">
>
>            <types>
>
>                        <schema
> targetNamespace="http://mycompany.net/jws/test/schema/in2/"
>
>
> xmlns="http://www.w3.org/2000/10/XMLSchema">
>
>                                   <element name="Test2In">
>
>                                               <complexType>
>
>                                                           <all>
>
>
> <element name="text" type="string" />
>
>                                                           </all>
>
>                                               </complexType>
>
>                                   </element>
>
>                        </schema>
>
>                        <schema
> targetNamespace="http://mycompany.net/jws/test/schema/out2/"
>
>
> xmlns="http://www.w3.org/2000/10/XMLSchema">
>
>                                   <element name="Test2Out">
>
>                                               <complexType>
>
>                                                           <all>
>
>
> <element name="text" type="string" />
>
>                                                           </all>
>
>                                               </complexType>
>
>                                   </element>
>
>                        </schema>
>
>            </types>
>
>
>
>            <message name="MsgTest2In">
>
>                        <part name="parameter" element="in2:Test2In" />
>
>            </message>
>
>            <message name="MsgTest2Out">
>
>                        <part name="parameter" element="out2:Test2Out" />
>
>            </message>
>
>
>
>            <portType name="PTTest">
>
>                        <operation name="invoke2">
>
>                                   <input message="jws:MsgTest2In" />
>
>                                   <output message="jws:MsgTest2Out" />
>
>                        </operation>
>
>            </portType>
>
>
>
>            <binding name="BITestSOAP" type="jws:PTTest">
>
>                        <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>
>                        <operation name="invoke2">
>
>                                   <soap:operation soapAction="urn:#invoke2"
> />
>
>                                   <input>
>
>                                               <soap:body use="literal" />
>
>                                   </input>
>
>                                   <output>
>
>                                               <soap:body use="literal" />
>
>                                   </output>
>
>                        </operation>
>
>            </binding>
>
>
>
>            <service name="TestWS">
>
>                        <port name="PTTest" binding="jws:BITestSOAP">
>
>                                   <soap:address
> location="http://localhost:7000/TestBeanService/TestBean" />
>
>                                   <smix:endpoint role="provider"
> defaultMep="in-out" />
>
>                        </port>
>
>            </service>
>
> </definitions>
>
>
>
> Thanks,
>
>
>
> Sabine
>
>