You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Matthieu Riou <ma...@gmail.com> on 2007/07/30 18:10:18 UTC

Re: ODE fault - Exception: SOAP body does not contain expected part wrapper

(Forwarding to the mailing-list)

Could you send you message definition as well? The operation looks good but
it seems that the part name is missing (in rpc/lit the operation name is
used as a wrapper and then you have an element for each part).

Cheers,
Matthieu

On 7/30/07, anup.chandran@3ds.com <an...@3ds.com> wrote:
>
> Matthieu, Thierry,
>
> I have a similar issue however im using literal.
>
> <binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
>         <soap:binding style="rpc" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>         <operation name="initiate">
>            <soap:operation soapAction="http://sample.bpel.org/bpel/sample
> "/>
>            <input>
>                <soap:body use="literal"/>
>            </input>
>         </operation>
>     </binding>
>
>
> This is my request:
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/">
>   <!-- test soap message -->
>   <SOAP-ENV:Body>
>     <ns1:initiate xmlns:ns1="http://ode/bpel/unit-test.wsdl">
>         <input>Hello</input>
>     </ns1:initiate>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> I get the error :
>
> Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
> Part: name=payload
> elementName={
> http://sample.bpel.org/bpel/sample}HelloWorldRequest,Operation: nam
> e=initiate
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
> Part: name=payload
> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest)
> DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation:
> name=initiate
>
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
> Part: name=payload
> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
> service {
> http://sample.bpel.org/bpel/sample}MyHelloWorldService
> 11:10:05,503 DEBUG [ODEService] ODE routed to operation Operation:
> name=initiate
>
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
> Part: name=payload
> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
> service {
> http://sample.bpel.org/bpel/sample}MyHelloWorldService
> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
> wrapper:
> service {http://sample.bpel.org/bpel/sample}MyHelloWorldService port
> MyHelloWor
> ld wrapper initiate; nested exception is:
>         java.lang.IllegalArgumentException: SOAP body does not contain
> expected
> part wrapper: service {
> http://sample.bpel.org/bpel/sample}MyHelloWorldService po
> rt MyHelloWorld wrapper initiate
>
> How did you solve the issue you faced?
>
>
> Matthieu Riou-2 wrote:
> >
> > Hi Thierry,
> >
> > A couple of things:
> >
> > 1. As you mentioned, ODE only support literals. There are several issues
> > with encoded and it's prohibited by WS-BasicProfile. We usually try to
> > stick
> > to the profile to avoid interoperability issues.
> >
> > 2. ODE doesn't support SOAP 1.2 for now
> >
> > Cheers,
> > Matthieu
> >
> > On 6/8/07, Ciot, Thierry <th...@compuware.com> wrote:
> >>
> >> This rather long, I apologize in advance but it seems the best way to
> >> explain what I'm seeing.
> >>
> >> I have deployed one process and when I try to access it I get an
> >> exception: SOAP body does not contain expected part wrapper.
> >>
> >>
> >>
> >> Below is what I send (using SoapUI):
> >>
> >>
> >>
> >> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> >> xmlns:loan="http://loanRequest.thierry">
> >>
> >>    <soap:Header/>
> >>
> >>    <soap:Body>
> >>
> >>       <loan:requestLoan>
> >>
> >>          <amount>100</amount>
> >>
> >>          <lastName>x</lastName>
> >>
> >>          <firstName>y</firstName>
> >>
> >>       </loan:requestLoan>
> >>
> >>    </soap:Body>
> >>
> >> </soap:Envelope>
> >>
> >>
> >>
> >> And here is what I receive:
> >>
> >>
> >>
> >> <soapenv:Envelope
> >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> >>
> >>    <soapenv:Body>
> >>
> >>       <soapenv:Fault xmlns:java="java:package org.apache.ode.axis2">
> >>
> >>          <soapenv:Code>
> >>
> >>
> >> <soapenv:Value>java:org.apache.ode.axis2.OdeFault</soapenv:Value>
> >>
> >>          </soapenv:Code>
> >>
> >>          <soapenv:Reason>
> >>
> >>             <soapenv:Text xml:lang="en-US">An exception occured while
> >> invoking ODE.</soapenv:Text>
> >>
> >>          </soapenv:Reason>
> >>
> >>          <soapenv:Detail/>
> >>
> >>       </soapenv:Fault>
> >>
> >>    </soapenv:Body>
> >>
> >> </soapenv:Envelope>
> >>
> >>
> >>
> >> What I noticed that seems wring is that  the soap body does not
> >> correspond to what I have specified in the wsdl file.
> >>
> >>
> >>
> >> Here is what I specify:
> >>
> >>
> >>
> >> <wsdl:operation name="requestLoan">
> >>
> >>       <soap:operation soapAction="" style="rpc"/>
> >>
> >>       <wsdl:input>
> >>
> >>         <soap:body
> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >> use="encoded"/>
> >>
> >>       </wsdl:input>
> >>
> >>       <wsdl:output>
> >>
> >>         <soap:body
> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >> use="encoded"/>
> >>
> >>       </wsdl:output>
> >>
> >> </wsdl:operation>
> >>
> >>
> >>
> >>
> >>
> >> <wsdl:binding name="LoanRequestSOAP12Binding"
> >> type="tns:LoanRequestPortType">
> >>
> >> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
> >> style="document"/>
> >>
> >>       <wsdl:operation name="requestLoan">
> >>
> >>   <soap12:operation soapAction="" style="document"/>
> >>
> >>             <wsdl:input>
> >>
> >> <soap12:body use="literal"/>
> >>
> >> </wsdl:input>
> >>
> >>       <wsdl:output>
> >>
> >> <soap12:body use="literal"/>
> >>
> >> </wsdl:output>
> >>
> >> </wsdl:operation>
> >>
> >> </wsdl:binding>
> >>
> >>
> >>
> >> So it seems that even though I specified <soap:body
> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >> use="encoded"/> ODE implemented <soap12:body use="literal"/>
> >>
> >>
> >>
> >> I noticed that the HelloWorld2 example was using literal on both ends.
> >>
> >>
> >>
> >> Is ODE only supporting literal?
> >>
> >>
> >>
> >> Below is the stack trace in the log file.
> >>
> >>
> >>
> >> Thanks, Thierry.
> >>
> >>
> >>
> >> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
> >>
> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
> >> LoanRequestPort wrapper requestLoan; nested exception is:
> >>
> >>       java.lang.IllegalArgumentException: SOAP body does not contain
> >> expected part wrapper: service
> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
> >> wrapper requestLoan
> >>
> >>       at
> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
> (Soap
> >> MessageConverter.java:358)
> >>
> >>       at
> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
> (SoapMess
> >> ageConverter.java:292)
> >>
> >>       at
> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
> :11
> >> 8)
> >>
> >>       at
> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
> (ODEMes
> >> sageReceiver.java:68)
> >>
> >>       at
> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
> (ODEMessageReceiver
> >> .java:49)
> >>
> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
> :497)
> >>
> >>       at
> >>
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
> >> t(HTTPTransportUtils.java:328)
> >>
> >>       at
> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
> :254)
> >>
> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> >>
> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >>
> >>       at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (Applica
> >> tionFilterChain.java:269)
> >>
> >>       at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilt
> >> erChain.java:188)
> >>
> >>       at
> >> org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValv
> >> e.java:210)
> >>
> >>       at
> >> org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValv
> >> e.java:174)
> >>
> >>       at
> >> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java
> >> :127)
> >>
> >>       at
> >> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java
> >> :117)
> >>
> >>       at
> >> org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.
> >> java:108)
> >>
> >>       at
> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :1
> >> 51)
> >>
> >>       at
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :87
> >> 0)
> >>
> >>       at
> >>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> >> essConnection(Http11BaseProtocol.java:665)
> >>
> >>       at
> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint
> >> .java:528)
> >>
> >>       at
> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollow
> >> erWorkerThread.java:81)
> >>
> >>       at
> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool
> >> .java:685)
> >>
> >>       at java.lang.Thread.run(Unknown Source)
> >>
> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
> >> contain expected part wrapper: service
> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
> >> wrapper requestLoan
> >>
> >>       at
> >>
> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
> >> er(Messages.java:235)
> >>
> >>       ... 24 more
> >>
> >> 16:29:03,803 ERROR [ODEService] Exception occured while invoking ODE
> >>
> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
> >> LoanRequestPort wrapper requestLoan; nested exception is:
> >>
> >>       java.lang.IllegalArgumentException: SOAP body does not contain
> >> expected part wrapper: service
> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
> >> wrapper requestLoan
> >>
> >>       at
> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
> (Soap
> >> MessageConverter.java:358)
> >>
> >>       at
> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
> (SoapMess
> >> ageConverter.java:292)
> >>
> >>       at
> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
> :11
> >> 8)
> >>
> >>       at
> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
> (ODEMes
> >> sageReceiver.java:68)
> >>
> >>       at
> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
> (ODEMessageReceiver
> >> .java:49)
> >>
> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
> :497)
> >>
> >>       at
> >>
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
> >> t(HTTPTransportUtils.java:328)
> >>
> >>       at
> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
> :254)
> >>
> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> >>
> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >>
> >>       at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (Applica
> >> tionFilterChain.java:269)
> >>
> >>       at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilt
> >> erChain.java:188)
> >>
> >>       at
> >> org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValv
> >> e.java:210)
> >>
> >>       at
> >> org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValv
> >> e.java:174)
> >>
> >>       at
> >> org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java
> >> :127)
> >>
> >>       at
> >> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java
> >> :117)
> >>
> >>       at
> >> org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.
> >> java:108)
> >>
> >>       at
> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :1
> >> 51)
> >>
> >>       at
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :87
> >> 0)
> >>
> >>       at
> >>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> >> essConnection(Http11BaseProtocol.java:665)
> >>
> >>       at
> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint
> >> .java:528)
> >>
> >>       at
> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollow
> >> erWorkerThread.java:81)
> >>
> >>       at
> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool
> >> .java:685)
> >>
> >>       at java.lang.Thread.run(Unknown Source)
> >>
> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
> >> contain expected part wrapper: service
> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
> >> wrapper requestLoan
> >>
> >>       at
> >>
> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
> >> er(Messages.java:235)
> >>
> >>       ... 24 more
> >>
> >>
> >> The contents of this e-mail are intended for the named addressee only.
> It
> >> contains information that may be confidential. Unless you are the named
> >> addressee or an authorized designee, you may not copy or use it, or
> >> disclose
> >> it to anyone else. If you received it in error please notify us
> >> immediately
> >> and then destroy it.
> >>
> >
> >
> Quoted from:
>
> http://www.nabble.com/ODE-fault---Exception%3A-SOAP-body-does-not-contain-expected-part-wrapper-tf3892043.html#a11034155
>
>

Re: ODE fault - Exception: SOAP body does not contain expected part wrapper

Posted by Anup Chandran <an...@3ds.com>.

This is the WSDL file :

<?xml version="1.0"?>
<definitions name="HelloWorld"
        targetNamespace="http://sample.bpel.org/bpel/sample"
        xmlns:tns="http://sample.bpel.org/bpel/sample"
        xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        >

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     TYPE DEFINITION - List of services participating in this BPEL process 
     The default output of the BPEL designer uses strings as input and 
     output to the BPEL Process. But you can define or import any XML 
     Schema type and us them as part of the message types.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <types>  
        <schema attributeFormDefault="unqualified" 
                elementFormDefault="qualified" 
                targetNamespace="http://sample.bpel.org/bpel/sample" 
                xmlns="http://www.w3.org/2001/XMLSchema"
                >
                
            <element name="HelloWorldRequest">
                <complexType>
                    <sequence>
                        <element name="input" type="string" />
                    </sequence>
                </complexType>
            </element>
                  
            <element name="HelloWorldResponse">
                <complexType>
                    <sequence>
                        <element name="result" type="string"/>
                    </sequence>
                </complexType>
            </element>
            
        </schema>
    </types>
  
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     MESSAGE TYPE DEFINITION - Definition of the message types used as 
     part of the port type defintions
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <message name="HelloWorldRequestMessage">
        <part name="payload" element="tns:HelloWorldRequest"/>
    </message>
    
    <message name="HelloWorldResponseMessage">
        <part name="payload" element="tns:HelloWorldResponse"/>
    </message>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PORT TYPE DEFINITION - A port type groups a set of operations into
     a logical service unit.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
    <!-- portType implemented by the HelloWorld BPEL process -->
    <portType name="MyHelloWorld">
        <operation name="initiate">
            <input message="tns:HelloWorldRequestMessage"/>
        </operation>
    </portType>

    <!-- portType implemented by the requester of HelloWorld BPEL process 
         for asynchronous callback purposes
         -->
    <portType name="HelloWorldCallback">
        <operation name="onResult">
            <input message="tns:HelloWorldResponseMessage"/>
        </operation>
    </portType>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PARTNER LINK TYPE DEFINITION
         the HelloWorld partnerLinkType binds the provider and
         requester portType into an asynchronous conversation.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <plnk:partnerLinkType name="MyHelloWorld">
        <plnk:role name="HelloWorldProvider" portType="tns:MyHelloWorld"/>
        <plnk:role name="HelloWorldRequester"
portType="tns:HelloWorldCallback"/>
    </plnk:partnerLinkType> 
    

<binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="initiate">
           <soap:operation soapAction="http://sample.bpel.org/bpel/sample"/>
           <input>
               <soap:body use="literal"/>
           </input>
        </operation>
    </binding>

<binding name="HelloWorldResponseSoapBinding" type="tns:HelloWorldCallback">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="onResult">
           <soap:operation soapAction="http://sample.bpel.org/bpel/sample"/>
           <input>
               <soap:body use="literal"/>
           </input>
        </operation>
    </binding>


    <service name="MyHelloWorldService">
        <documentation>Test service</documentation>
        <port name="MyHelloWorld" binding="tns:HelloWorldSoapBinding">
           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorld"/>
        </port>
    </service>

    <service name="MyHelloWorldResponderService">
        <documentation>Test service</documentation>
        <port name="HelloWorldCallbackPort"
binding="tns:HelloWorldResponseSoapBinding">
           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorldResponse"/>
        </port>
    </service>

</definitions>

The BPEL definition is :

<?xml version="1.0" encoding="UTF-8"?>
<bpws:process
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:tns="http://sample.bpel.org/bpel/sample" exitOnStandardFault="yes"
name="HelloWorld" suppressJoinFailure="yes"
targetNamespace="http://sample.bpel.org/bpel/sample">
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="HelloWorld.wsdl" namespace="http://sample.bpel.org/bpel/sample"/>
<bpws:partnerLinks>
<bpws:partnerLink myRole="HelloWorldProvider" name="client"
partnerLinkType="tns:MyHelloWorld" partnerRole="HelloWorldRequester"/>
</bpws:partnerLinks>
<bpws:variables>
<bpws:variable messageType="tns:HelloWorldRequestMessage" name="input"/>
<bpws:variable messageType="tns:HelloWorldResponseMessage" name="output"/>
</bpws:variables>
<bpws:sequence name="main">
<bpws:receive createInstance="yes" name="receiveInput" operation="initiate"
partnerLink="client" portType="tns:MyHelloWorld" variable="input"/>
<bpws:assign name="Assign" validate="no">
<bpws:copy>
<bpws:from><![CDATA[concat("Hello, " ,
$input.payload/tns:input)]]></bpws:from>
<bpws:to part="payload" variable="output">
<bpws:query
queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116"><![CDATA[/tns:result]]></bpws:query>
</bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:invoke inputVariable="output" name="callbackClient"
operation="onResult" partnerLink="client"
portType="tns:HelloWorldCallback"/>
</bpws:sequence>
</bpws:process>



I also tried this request message :

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <!-- test soap message -->
  <SOAP-ENV:Body>
    <ns1:initiate xmlns:ns1="http://ode/bpel/unit-test.wsdl">
       
<payload><HelloWorldRequest><input>Hello</input></HelloWorldRequest></payload>
    </ns1:initiate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The Error I see is :

style=ONE_WAY,0
Input: name=null
Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
service {
http://sample.bpel.org/bpel/sample}MyHelloWorldService
ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
wrapper:
 service {http://sample.bpel.org/bpel/sample}MyHelloWorldService port
MyHelloWor
ld wrapper initiate; nested exception is:
        java.lang.IllegalArgumentException: SOAP body does not contain
expected
part wrapper: service
{http://sample.bpel.org/bpel/sample}MyHelloWorldService po
rt MyHelloWorld wrapper initiate
        at
org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(S
oapMessageConverter.java:358)
        at
org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapM
essageConverter.java:292)
        at
org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
:118)
        at
org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODE
MessageReceiver.java:68)
        at
org.apache.ode.axis2.hooks.ODEMessageReceiver.receive(ODEMessageRecei
ver.java:62)



Matthieu Riou-2 wrote:
> 
> (Forwarding to the mailing-list)
> 
> Could you send you message definition as well? The operation looks good
> but
> it seems that the part name is missing (in rpc/lit the operation name is
> used as a wrapper and then you have an element for each part).
> 
> Cheers,
> Matthieu
> 
> On 7/30/07, anup.chandran@3ds.com <an...@3ds.com> wrote:
>>
>> Matthieu, Thierry,
>>
>> I have a similar issue however im using literal.
>>
>> <binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
>>         <soap:binding style="rpc" transport="
>> http://schemas.xmlsoap.org/soap/http"/>
>>         <operation name="initiate">
>>            <soap:operation soapAction="http://sample.bpel.org/bpel/sample
>> "/>
>>            <input>
>>                <soap:body use="literal"/>
>>            </input>
>>         </operation>
>>     </binding>
>>
>>
>> This is my request:
>> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
>> http://schemas.xmlsoap.org/soap/envelope/">
>>   <!-- test soap message -->
>>   <SOAP-ENV:Body>
>>     <ns1:initiate xmlns:ns1="http://ode/bpel/unit-test.wsdl">
>>         <input>Hello</input>
>>     </ns1:initiate>
>>   </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>>
>> I get the error :
>>
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={
>> http://sample.bpel.org/bpel/sample}HelloWorldRequest,Operation: nam
>> e=initiate
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest)
>> DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation:
>> name=initiate
>>
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
>> service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService
>> 11:10:05,503 DEBUG [ODEService] ODE routed to operation Operation:
>> name=initiate
>>
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
>> service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService
>> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
>> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
>> wrapper:
>> service {http://sample.bpel.org/bpel/sample}MyHelloWorldService port
>> MyHelloWor
>> ld wrapper initiate; nested exception is:
>>         java.lang.IllegalArgumentException: SOAP body does not contain
>> expected
>> part wrapper: service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService po
>> rt MyHelloWorld wrapper initiate
>>
>> How did you solve the issue you faced?
>>
>>
>> Matthieu Riou-2 wrote:
>> >
>> > Hi Thierry,
>> >
>> > A couple of things:
>> >
>> > 1. As you mentioned, ODE only support literals. There are several
>> issues
>> > with encoded and it's prohibited by WS-BasicProfile. We usually try to
>> > stick
>> > to the profile to avoid interoperability issues.
>> >
>> > 2. ODE doesn't support SOAP 1.2 for now
>> >
>> > Cheers,
>> > Matthieu
>> >
>> > On 6/8/07, Ciot, Thierry <th...@compuware.com> wrote:
>> >>
>> >> This rather long, I apologize in advance but it seems the best way to
>> >> explain what I'm seeing.
>> >>
>> >> I have deployed one process and when I try to access it I get an
>> >> exception: SOAP body does not contain expected part wrapper.
>> >>
>> >>
>> >>
>> >> Below is what I send (using SoapUI):
>> >>
>> >>
>> >>
>> >> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
>> >> xmlns:loan="http://loanRequest.thierry">
>> >>
>> >>    <soap:Header/>
>> >>
>> >>    <soap:Body>
>> >>
>> >>       <loan:requestLoan>
>> >>
>> >>          <amount>100</amount>
>> >>
>> >>          <lastName>x</lastName>
>> >>
>> >>          <firstName>y</firstName>
>> >>
>> >>       </loan:requestLoan>
>> >>
>> >>    </soap:Body>
>> >>
>> >> </soap:Envelope>
>> >>
>> >>
>> >>
>> >> And here is what I receive:
>> >>
>> >>
>> >>
>> >> <soapenv:Envelope
>> >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>> >>
>> >>    <soapenv:Body>
>> >>
>> >>       <soapenv:Fault xmlns:java="java:package org.apache.ode.axis2">
>> >>
>> >>          <soapenv:Code>
>> >>
>> >>
>> >> <soapenv:Value>java:org.apache.ode.axis2.OdeFault</soapenv:Value>
>> >>
>> >>          </soapenv:Code>
>> >>
>> >>          <soapenv:Reason>
>> >>
>> >>             <soapenv:Text xml:lang="en-US">An exception occured while
>> >> invoking ODE.</soapenv:Text>
>> >>
>> >>          </soapenv:Reason>
>> >>
>> >>          <soapenv:Detail/>
>> >>
>> >>       </soapenv:Fault>
>> >>
>> >>    </soapenv:Body>
>> >>
>> >> </soapenv:Envelope>
>> >>
>> >>
>> >>
>> >> What I noticed that seems wring is that  the soap body does not
>> >> correspond to what I have specified in the wsdl file.
>> >>
>> >>
>> >>
>> >> Here is what I specify:
>> >>
>> >>
>> >>
>> >> <wsdl:operation name="requestLoan">
>> >>
>> >>       <soap:operation soapAction="" style="rpc"/>
>> >>
>> >>       <wsdl:input>
>> >>
>> >>         <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/>
>> >>
>> >>       </wsdl:input>
>> >>
>> >>       <wsdl:output>
>> >>
>> >>         <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/>
>> >>
>> >>       </wsdl:output>
>> >>
>> >> </wsdl:operation>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> <wsdl:binding name="LoanRequestSOAP12Binding"
>> >> type="tns:LoanRequestPortType">
>> >>
>> >> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
>> >> style="document"/>
>> >>
>> >>       <wsdl:operation name="requestLoan">
>> >>
>> >>   <soap12:operation soapAction="" style="document"/>
>> >>
>> >>             <wsdl:input>
>> >>
>> >> <soap12:body use="literal"/>
>> >>
>> >> </wsdl:input>
>> >>
>> >>       <wsdl:output>
>> >>
>> >> <soap12:body use="literal"/>
>> >>
>> >> </wsdl:output>
>> >>
>> >> </wsdl:operation>
>> >>
>> >> </wsdl:binding>
>> >>
>> >>
>> >>
>> >> So it seems that even though I specified <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/> ODE implemented <soap12:body use="literal"/>
>> >>
>> >>
>> >>
>> >> I noticed that the HelloWorld2 example was using literal on both ends.
>> >>
>> >>
>> >>
>> >> Is ODE only supporting literal?
>> >>
>> >>
>> >>
>> >> Below is the stack trace in the log file.
>> >>
>> >>
>> >>
>> >> Thanks, Thierry.
>> >>
>> >>
>> >>
>> >> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
>> >>
>> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
>> part
>> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
>> >> LoanRequestPort wrapper requestLoan; nested exception is:
>> >>
>> >>       java.lang.IllegalArgumentException: SOAP body does not contain
>> >> expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
>> (Soap
>> >> MessageConverter.java:358)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
>> (SoapMess
>> >> ageConverter.java:292)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
>> :11
>> >> 8)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
>> (ODEMes
>> >> sageReceiver.java:68)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
>> (ODEMessageReceiver
>> >> .java:49)
>> >>
>> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
>> :497)
>> >>
>> >>       at
>> >>
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>> >> t(HTTPTransportUtils.java:328)
>> >>
>> >>       at
>> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
>> :254)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (Applica
>> >> tionFilterChain.java:269)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilt
>> >> erChain.java:188)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardWrapperValve.invoke
>> (StandardWrapperValv
>> >> e.java:210)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardContextValve.invoke
>> (StandardContextValv
>> >> e.java:174)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardHostValve.invoke(
>> StandardHostValve.java
>> >> :127)
>> >>
>> >>       at
>> >> org.apache.catalina.valves.ErrorReportValve.invoke(
>> ErrorReportValve.java
>> >> :117)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardEngineValve.invoke
>> (StandardEngineValve.
>> >> java:108)
>> >>
>> >>       at
>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :1
>> >> 51)
>> >>
>> >>       at
>> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>> :87
>> >> 0)
>> >>
>> >>       at
>> >>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>> >> essConnection(Http11BaseProtocol.java:665)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
>> (PoolTcpEndpoint
>> >> .java:528)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
>> (LeaderFollow
>> >> erWorkerThread.java:81)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
>> (ThreadPool
>> >> .java:685)
>> >>
>> >>       at java.lang.Thread.run(Unknown Source)
>> >>
>> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
>> >> contain expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >>
>> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
>> >> er(Messages.java:235)
>> >>
>> >>       ... 24 more
>> >>
>> >> 16:29:03,803 ERROR [ODEService] Exception occured while invoking ODE
>> >>
>> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
>> part
>> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
>> >> LoanRequestPort wrapper requestLoan; nested exception is:
>> >>
>> >>       java.lang.IllegalArgumentException: SOAP body does not contain
>> >> expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
>> (Soap
>> >> MessageConverter.java:358)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
>> (SoapMess
>> >> ageConverter.java:292)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
>> :11
>> >> 8)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
>> (ODEMes
>> >> sageReceiver.java:68)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
>> (ODEMessageReceiver
>> >> .java:49)
>> >>
>> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
>> :497)
>> >>
>> >>       at
>> >>
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>> >> t(HTTPTransportUtils.java:328)
>> >>
>> >>       at
>> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
>> :254)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (Applica
>> >> tionFilterChain.java:269)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilt
>> >> erChain.java:188)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardWrapperValve.invoke
>> (StandardWrapperValv
>> >> e.java:210)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardContextValve.invoke
>> (StandardContextValv
>> >> e.java:174)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardHostValve.invoke(
>> StandardHostValve.java
>> >> :127)
>> >>
>> >>       at
>> >> org.apache.catalina.valves.ErrorReportValve.invoke(
>> ErrorReportValve.java
>> >> :117)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardEngineValve.invoke
>> (StandardEngineValve.
>> >> java:108)
>> >>
>> >>       at
>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :1
>> >> 51)
>> >>
>> >>       at
>> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>> :87
>> >> 0)
>> >>
>> >>       at
>> >>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>> >> essConnection(Http11BaseProtocol.java:665)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
>> (PoolTcpEndpoint
>> >> .java:528)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
>> (LeaderFollow
>> >> erWorkerThread.java:81)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
>> (ThreadPool
>> >> .java:685)
>> >>
>> >>       at java.lang.Thread.run(Unknown Source)
>> >>
>> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
>> >> contain expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >>
>> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
>> >> er(Messages.java:235)
>> >>
>> >>       ... 24 more
>> >>
>> >>
>> >> The contents of this e-mail are intended for the named addressee only.
>> It
>> >> contains information that may be confidential. Unless you are the
>> named
>> >> addressee or an authorized designee, you may not copy or use it, or
>> >> disclose
>> >> it to anyone else. If you received it in error please notify us
>> >> immediately
>> >> and then destroy it.
>> >>
>> >
>> >
>> Quoted from:
>>
>> http://www.nabble.com/ODE-fault---Exception%3A-SOAP-body-does-not-contain-expected-part-wrapper-tf3892043.html#a11034155
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-ODE-fault---Exception%3A-SOAP-body-does-not-contain-expected-part-wrapper-tf4171190.html#a11879181
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: ODE fault - Exception: SOAP body does not contain expected part wrapper

Posted by Anup Chandran <an...@3ds.com>.
This is the WSDL file :

<?xml version="1.0"?>
<definitions name="HelloWorld"
        targetNamespace="http://sample.bpel.org/bpel/sample"
        xmlns:tns="http://sample.bpel.org/bpel/sample"
        xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        >

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     TYPE DEFINITION - List of services participating in this BPEL process 
     The default output of the BPEL designer uses strings as input and 
     output to the BPEL Process. But you can define or import any XML 
     Schema type and us them as part of the message types.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <types>  
        <schema attributeFormDefault="unqualified" 
                elementFormDefault="qualified" 
                targetNamespace="http://sample.bpel.org/bpel/sample" 
                xmlns="http://www.w3.org/2001/XMLSchema"
                >
                
            <element name="HelloWorldRequest">
                <complexType>
                    <sequence>
                        <element name="input" type="string" />
                    </sequence>
                </complexType>
            </element>
                  
            <element name="HelloWorldResponse">
                <complexType>
                    <sequence>
                        <element name="result" type="string"/>
                    </sequence>
                </complexType>
            </element>
            
        </schema>
    </types>
  
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     MESSAGE TYPE DEFINITION - Definition of the message types used as 
     part of the port type defintions
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <message name="HelloWorldRequestMessage">
        <part name="payload" element="tns:HelloWorldRequest"/>
    </message>
    
    <message name="HelloWorldResponseMessage">
        <part name="payload" element="tns:HelloWorldResponse"/>
    </message>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PORT TYPE DEFINITION - A port type groups a set of operations into
     a logical service unit.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
    <!-- portType implemented by the HelloWorld BPEL process -->
    <portType name="MyHelloWorld">
        <operation name="initiate">
            <input message="tns:HelloWorldRequestMessage"/>
        </operation>
    </portType>

    <!-- portType implemented by the requester of HelloWorld BPEL process 
         for asynchronous callback purposes
         -->
    <portType name="HelloWorldCallback">
        <operation name="onResult">
            <input message="tns:HelloWorldResponseMessage"/>
        </operation>
    </portType>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     PARTNER LINK TYPE DEFINITION
         the HelloWorld partnerLinkType binds the provider and
         requester portType into an asynchronous conversation.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    
    <plnk:partnerLinkType name="MyHelloWorld">
        <plnk:role name="HelloWorldProvider" portType="tns:MyHelloWorld"/>
        <plnk:role name="HelloWorldRequester"
portType="tns:HelloWorldCallback"/>
    </plnk:partnerLinkType> 
    

<binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="initiate">
           <soap:operation soapAction="http://sample.bpel.org/bpel/sample"/>
           <input>
               <soap:body use="literal"/>
           </input>
        </operation>
    </binding>

<binding name="HelloWorldResponseSoapBinding" type="tns:HelloWorldCallback">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="onResult">
           <soap:operation soapAction="http://sample.bpel.org/bpel/sample"/>
           <input>
               <soap:body use="literal"/>
           </input>
        </operation>
    </binding>


    <service name="MyHelloWorldService">
        <documentation>Test service</documentation>
        <port name="MyHelloWorld" binding="tns:HelloWorldSoapBinding">
           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorld"/>
        </port>
    </service>

    <service name="MyHelloWorldResponderService">
        <documentation>Test service</documentation>
        <port name="HelloWorldCallbackPort"
binding="tns:HelloWorldResponseSoapBinding">
           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorldResponse"/>
        </port>
    </service>

</definitions>

The BPEL definition is :

<?xml version="1.0" encoding="UTF-8"?>
<bpws:process
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:tns="http://sample.bpel.org/bpel/sample" exitOnStandardFault="yes"
name="HelloWorld" suppressJoinFailure="yes"
targetNamespace="http://sample.bpel.org/bpel/sample">
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="HelloWorld.wsdl" namespace="http://sample.bpel.org/bpel/sample"/>
<bpws:partnerLinks>
<bpws:partnerLink myRole="HelloWorldProvider" name="client"
partnerLinkType="tns:MyHelloWorld" partnerRole="HelloWorldRequester"/>
</bpws:partnerLinks>
<bpws:variables>
<bpws:variable messageType="tns:HelloWorldRequestMessage" name="input"/>
<bpws:variable messageType="tns:HelloWorldResponseMessage" name="output"/>
</bpws:variables>
<bpws:sequence name="main">
<bpws:receive createInstance="yes" name="receiveInput" operation="initiate"
partnerLink="client" portType="tns:MyHelloWorld" variable="input"/>
<bpws:assign name="Assign" validate="no">
<bpws:copy>
<bpws:from><![CDATA[concat("Hello, " ,
$input.payload/tns:input)]]></bpws:from>
<bpws:to part="payload" variable="output">
<bpws:query
queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116"><![CDATA[/tns:result]]></bpws:query>
</bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:invoke inputVariable="output" name="callbackClient"
operation="onResult" partnerLink="client"
portType="tns:HelloWorldCallback"/>
</bpws:sequence>
</bpws:process>



I also tried this request message :

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <!-- test soap message -->
  <SOAP-ENV:Body>
    <ns1:initiate xmlns:ns1="http://sample.bpel.org/bpel/sample">
       
<payload><HelloWorldRequest><input>Hello</input></HelloWorldRequest></payload>
    </ns1:initiate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The Error I see is :

style=ONE_WAY,0
Input: name=null
Message: name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
service {
http://sample.bpel.org/bpel/sample}MyHelloWorldService
ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
wrapper:
 service {http://sample.bpel.org/bpel/sample}MyHelloWorldService port
MyHelloWor
ld wrapper initiate; nested exception is:
        java.lang.IllegalArgumentException: SOAP body does not contain
expected
part wrapper: service
{http://sample.bpel.org/bpel/sample}MyHelloWorldService po
rt MyHelloWorld wrapper initiate
        at
org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(S
oapMessageConverter.java:358)
        at
org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapM
essageConverter.java:292)
        at
org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
:118)
        at
org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODE
MessageReceiver.java:68)
        at
org.apache.ode.axis2.hooks.ODEMessageReceiver.receive(ODEMessageRecei
ver.java:62)



Matthieu Riou-2 wrote:
> 
> (Forwarding to the mailing-list)
> 
> Could you send you message definition as well? The operation looks good
> but
> it seems that the part name is missing (in rpc/lit the operation name is
> used as a wrapper and then you have an element for each part).
> 
> Cheers,
> Matthieu
> 
> On 7/30/07, anup.chandran@3ds.com <an...@3ds.com> wrote:
>>
>> Matthieu, Thierry,
>>
>> I have a similar issue however im using literal.
>>
>> <binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
>>         <soap:binding style="rpc" transport="
>> http://schemas.xmlsoap.org/soap/http"/>
>>         <operation name="initiate">
>>            <soap:operation soapAction="http://sample.bpel.org/bpel/sample
>> "/>
>>            <input>
>>                <soap:body use="literal"/>
>>            </input>
>>         </operation>
>>     </binding>
>>
>>
>> This is my request:
>> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
>> http://schemas.xmlsoap.org/soap/envelope/">
>>   <!-- test soap message -->
>>   <SOAP-ENV:Body>
>>     <ns1:initiate xmlns:ns1="http://sample.bpel.org/bpel/sample">
>>         <input>Hello</input>
>>     </ns1:initiate>
>>   </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>>
>> I get the error :
>>
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={
>> http://sample.bpel.org/bpel/sample}HelloWorldRequest,Operation: nam
>> e=initiate
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest)
>> DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation:
>> name=initiate
>>
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
>> service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService
>> 11:10:05,503 DEBUG [ODEService] ODE routed to operation Operation:
>> name=initiate
>>
>> style=ONE_WAY,0
>> Input: name=null
>> Message:
>> name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
>> Part: name=payload
>> elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest from
>> service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService
>> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
>> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
>> wrapper:
>> service {http://sample.bpel.org/bpel/sample}MyHelloWorldService port
>> MyHelloWor
>> ld wrapper initiate; nested exception is:
>>         java.lang.IllegalArgumentException: SOAP body does not contain
>> expected
>> part wrapper: service {
>> http://sample.bpel.org/bpel/sample}MyHelloWorldService po
>> rt MyHelloWorld wrapper initiate
>>
>> How did you solve the issue you faced?
>>
>>
>> Matthieu Riou-2 wrote:
>> >
>> > Hi Thierry,
>> >
>> > A couple of things:
>> >
>> > 1. As you mentioned, ODE only support literals. There are several
>> issues
>> > with encoded and it's prohibited by WS-BasicProfile. We usually try to
>> > stick
>> > to the profile to avoid interoperability issues.
>> >
>> > 2. ODE doesn't support SOAP 1.2 for now
>> >
>> > Cheers,
>> > Matthieu
>> >
>> > On 6/8/07, Ciot, Thierry <th...@compuware.com> wrote:
>> >>
>> >> This rather long, I apologize in advance but it seems the best way to
>> >> explain what I'm seeing.
>> >>
>> >> I have deployed one process and when I try to access it I get an
>> >> exception: SOAP body does not contain expected part wrapper.
>> >>
>> >>
>> >>
>> >> Below is what I send (using SoapUI):
>> >>
>> >>
>> >>
>> >> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
>> >> xmlns:loan="http://loanRequest.thierry">
>> >>
>> >>    <soap:Header/>
>> >>
>> >>    <soap:Body>
>> >>
>> >>       <loan:requestLoan>
>> >>
>> >>          <amount>100</amount>
>> >>
>> >>          <lastName>x</lastName>
>> >>
>> >>          <firstName>y</firstName>
>> >>
>> >>       </loan:requestLoan>
>> >>
>> >>    </soap:Body>
>> >>
>> >> </soap:Envelope>
>> >>
>> >>
>> >>
>> >> And here is what I receive:
>> >>
>> >>
>> >>
>> >> <soapenv:Envelope
>> >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>> >>
>> >>    <soapenv:Body>
>> >>
>> >>       <soapenv:Fault xmlns:java="java:package org.apache.ode.axis2">
>> >>
>> >>          <soapenv:Code>
>> >>
>> >>
>> >> <soapenv:Value>java:org.apache.ode.axis2.OdeFault</soapenv:Value>
>> >>
>> >>          </soapenv:Code>
>> >>
>> >>          <soapenv:Reason>
>> >>
>> >>             <soapenv:Text xml:lang="en-US">An exception occured while
>> >> invoking ODE.</soapenv:Text>
>> >>
>> >>          </soapenv:Reason>
>> >>
>> >>          <soapenv:Detail/>
>> >>
>> >>       </soapenv:Fault>
>> >>
>> >>    </soapenv:Body>
>> >>
>> >> </soapenv:Envelope>
>> >>
>> >>
>> >>
>> >> What I noticed that seems wring is that  the soap body does not
>> >> correspond to what I have specified in the wsdl file.
>> >>
>> >>
>> >>
>> >> Here is what I specify:
>> >>
>> >>
>> >>
>> >> <wsdl:operation name="requestLoan">
>> >>
>> >>       <soap:operation soapAction="" style="rpc"/>
>> >>
>> >>       <wsdl:input>
>> >>
>> >>         <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/>
>> >>
>> >>       </wsdl:input>
>> >>
>> >>       <wsdl:output>
>> >>
>> >>         <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/>
>> >>
>> >>       </wsdl:output>
>> >>
>> >> </wsdl:operation>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> <wsdl:binding name="LoanRequestSOAP12Binding"
>> >> type="tns:LoanRequestPortType">
>> >>
>> >> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
>> >> style="document"/>
>> >>
>> >>       <wsdl:operation name="requestLoan">
>> >>
>> >>   <soap12:operation soapAction="" style="document"/>
>> >>
>> >>             <wsdl:input>
>> >>
>> >> <soap12:body use="literal"/>
>> >>
>> >> </wsdl:input>
>> >>
>> >>       <wsdl:output>
>> >>
>> >> <soap12:body use="literal"/>
>> >>
>> >> </wsdl:output>
>> >>
>> >> </wsdl:operation>
>> >>
>> >> </wsdl:binding>
>> >>
>> >>
>> >>
>> >> So it seems that even though I specified <soap:body
>> >> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> >> use="encoded"/> ODE implemented <soap12:body use="literal"/>
>> >>
>> >>
>> >>
>> >> I noticed that the HelloWorld2 example was using literal on both ends.
>> >>
>> >>
>> >>
>> >> Is ODE only supporting literal?
>> >>
>> >>
>> >>
>> >> Below is the stack trace in the log file.
>> >>
>> >>
>> >>
>> >> Thanks, Thierry.
>> >>
>> >>
>> >>
>> >> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
>> >>
>> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
>> part
>> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
>> >> LoanRequestPort wrapper requestLoan; nested exception is:
>> >>
>> >>       java.lang.IllegalArgumentException: SOAP body does not contain
>> >> expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
>> (Soap
>> >> MessageConverter.java:358)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
>> (SoapMess
>> >> ageConverter.java:292)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
>> :11
>> >> 8)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
>> (ODEMes
>> >> sageReceiver.java:68)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
>> (ODEMessageReceiver
>> >> .java:49)
>> >>
>> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
>> :497)
>> >>
>> >>       at
>> >>
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>> >> t(HTTPTransportUtils.java:328)
>> >>
>> >>       at
>> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
>> :254)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (Applica
>> >> tionFilterChain.java:269)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilt
>> >> erChain.java:188)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardWrapperValve.invoke
>> (StandardWrapperValv
>> >> e.java:210)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardContextValve.invoke
>> (StandardContextValv
>> >> e.java:174)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardHostValve.invoke(
>> StandardHostValve.java
>> >> :127)
>> >>
>> >>       at
>> >> org.apache.catalina.valves.ErrorReportValve.invoke(
>> ErrorReportValve.java
>> >> :117)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardEngineValve.invoke
>> (StandardEngineValve.
>> >> java:108)
>> >>
>> >>       at
>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :1
>> >> 51)
>> >>
>> >>       at
>> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>> :87
>> >> 0)
>> >>
>> >>       at
>> >>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>> >> essConnection(Http11BaseProtocol.java:665)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
>> (PoolTcpEndpoint
>> >> .java:528)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
>> (LeaderFollow
>> >> erWorkerThread.java:81)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
>> (ThreadPool
>> >> .java:685)
>> >>
>> >>       at java.lang.Thread.run(Unknown Source)
>> >>
>> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
>> >> contain expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >>
>> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
>> >> er(Messages.java:235)
>> >>
>> >>       ... 24 more
>> >>
>> >> 16:29:03,803 ERROR [ODEService] Exception occured while invoking ODE
>> >>
>> >> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
>> part
>> >> wrapper: service {http://loanRequest.thierry}LoanRequestService port
>> >> LoanRequestPort wrapper requestLoan; nested exception is:
>> >>
>> >>       java.lang.IllegalArgumentException: SOAP body does not contain
>> >> expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
>> (Soap
>> >> MessageConverter.java:358)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
>> (SoapMess
>> >> ageConverter.java:292)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java
>> :11
>> >> 8)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic
>> (ODEMes
>> >> sageReceiver.java:68)
>> >>
>> >>       at
>> >> org.apache.ode.axis2.hooks.ODEMessageReceiver.receive
>> (ODEMessageReceiver
>> >> .java:49)
>> >>
>> >>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java
>> :497)
>> >>
>> >>       at
>> >>
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>> >> t(HTTPTransportUtils.java:328)
>> >>
>> >>       at
>> >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java
>> :254)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> >>
>> >>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
>> (Applica
>> >> tionFilterChain.java:269)
>> >>
>> >>       at
>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter
>> (ApplicationFilt
>> >> erChain.java:188)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardWrapperValve.invoke
>> (StandardWrapperValv
>> >> e.java:210)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardContextValve.invoke
>> (StandardContextValv
>> >> e.java:174)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardHostValve.invoke(
>> StandardHostValve.java
>> >> :127)
>> >>
>> >>       at
>> >> org.apache.catalina.valves.ErrorReportValve.invoke(
>> ErrorReportValve.java
>> >> :117)
>> >>
>> >>       at
>> >> org.apache.catalina.core.StandardEngineValve.invoke
>> (StandardEngineValve.
>> >> java:108)
>> >>
>> >>       at
>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>> :1
>> >> 51)
>> >>
>> >>       at
>> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>> :87
>> >> 0)
>> >>
>> >>       at
>> >>
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>> >> essConnection(Http11BaseProtocol.java:665)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
>> (PoolTcpEndpoint
>> >> .java:528)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
>> (LeaderFollow
>> >> erWorkerThread.java:81)
>> >>
>> >>       at
>> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
>> (ThreadPool
>> >> .java:685)
>> >>
>> >>       at java.lang.Thread.run(Unknown Source)
>> >>
>> >> Caused by: java.lang.IllegalArgumentException: SOAP body does not
>> >> contain expected part wrapper: service
>> >> {http://loanRequest.thierry}LoanRequestService port LoanRequestPort
>> >> wrapper requestLoan
>> >>
>> >>       at
>> >>
>> org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
>> >> er(Messages.java:235)
>> >>
>> >>       ... 24 more
>> >>
>> >>
>> >> The contents of this e-mail are intended for the named addressee only.
>> It
>> >> contains information that may be confidential. Unless you are the
>> named
>> >> addressee or an authorized designee, you may not copy or use it, or
>> >> disclose
>> >> it to anyone else. If you received it in error please notify us
>> >> immediately
>> >> and then destroy it.
>> >>
>> >
>> >
>> Quoted from:
>>
>> http://www.nabble.com/ODE-fault---Exception%3A-SOAP-body-does-not-contain-expected-part-wrapper-tf3892043.html#a11034155
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-ODE-fault---Exception%3A-SOAP-body-does-not-contain-expected-part-wrapper-tf4171190.html#a11879181
Sent from the Apache Ode User mailing list archive at Nabble.com.


RE: ODE fault - Exception: SOAP body does not contain expected part wrapper

Posted by CHANDRAN Anup <An...@3ds.com>.
Matthieu,

 

My WSDL is :

 

<?xml version="1.0"?>

<definitions name="HelloWorld"

        targetNamespace="http://sample.bpel.org/bpel/sample"

        xmlns:tns="http://sample.bpel.org/bpel/sample"

        xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"

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

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

        >

 

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     TYPE DEFINITION - List of services participating in this BPEL
process 

     The default output of the BPEL designer uses strings as input and 

     output to the BPEL Process. But you can define or import any XML 

     Schema type and us them as part of the message types.

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    

    <types>  

        <schema attributeFormDefault="unqualified" 

                elementFormDefault="qualified" 

                targetNamespace="http://sample.bpel.org/bpel/sample" 

                xmlns="http://www.w3.org/2001/XMLSchema"

                >

                

            <element name="HelloWorldRequest">

                <complexType>

                    <sequence>

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

                    </sequence>

                </complexType>

            </element>

                  

            <element name="HelloWorldResponse">

                <complexType>

                    <sequence>

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

                    </sequence>

                </complexType>

            </element>

            

        </schema>

    </types>

  

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     MESSAGE TYPE DEFINITION - Definition of the message types used as 

     part of the port type defintions

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    

    <message name="HelloWorldRequestMessage">

        <part name="payload" element="tns:HelloWorldRequest"/>

    </message>

    

    <message name="HelloWorldResponseMessage">

        <part name="payload" element="tns:HelloWorldResponse"/>

    </message>

 

 

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     PORT TYPE DEFINITION - A port type groups a set of operations into

     a logical service unit.

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->

    <!-- portType implemented by the HelloWorld BPEL process -->

    <portType name="MyHelloWorld">

        <operation name="initiate">

            <input message="tns:HelloWorldRequestMessage"/>

        </operation>

    </portType>

 

    <!-- portType implemented by the requester of HelloWorld BPEL
process 

         for asynchronous callback purposes

         -->

    <portType name="HelloWorldCallback">

        <operation name="onResult">

            <input message="tns:HelloWorldResponseMessage"/>

        </operation>

    </portType>

 

 

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     PARTNER LINK TYPE DEFINITION

         the HelloWorld partnerLinkType binds the provider and

         requester portType into an asynchronous conversation.

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->    

    <plnk:partnerLinkType name="MyHelloWorld">

        <plnk:role name="HelloWorldProvider"
portType="tns:MyHelloWorld"/>

        <plnk:role name="HelloWorldRequester"
portType="tns:HelloWorldCallback"/>

    </plnk:partnerLinkType> 

    

 

<binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">

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

        <operation name="initiate">

           <soap:operation
soapAction="http://sample.bpel.org/bpel/sample"/>

           <input>

               <soap:body use="literal"/>

           </input>

        </operation>

    </binding>

 

<binding name="HelloWorldResponseSoapBinding"
type="tns:HelloWorldCallback">

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

        <operation name="onResult">

           <soap:operation
soapAction="http://sample.bpel.org/bpel/sample"/>

           <input>

               <soap:body use="literal"/>

           </input>

        </operation>

    </binding>

 

 

    <service name="MyHelloWorldService">

        <documentation>Test service</documentation>

        <port name="MyHelloWorld" binding="tns:HelloWorldSoapBinding">

           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorld"/>

        </port>

    </service>

 

    <service name="MyHelloWorldResponderService">

        <documentation>Test service</documentation>

        <port name="HelloWorldCallbackPort"
binding="tns:HelloWorldResponseSoapBinding">

           <soap:address
location="http://localhost:8080/ode/processes/myhelloWorldResponse"/>

        </port>

    </service>

 

</definitions>

 

 

The BPEL Definition is : 

 

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

<bpws:process
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:tns="http://sample.bpel.org/bpel/sample" exitOnStandardFault="yes"
name="HelloWorld" suppressJoinFailure="yes"
targetNamespace="http://sample.bpel.org/bpel/sample">

<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="HelloWorld.wsdl"
namespace="http://sample.bpel.org/bpel/sample"/>

<bpws:partnerLinks>

<bpws:partnerLink myRole="HelloWorldProvider" name="client"
partnerLinkType="tns:MyHelloWorld" partnerRole="HelloWorldRequester"/>

</bpws:partnerLinks>

<bpws:variables>

<bpws:variable messageType="tns:HelloWorldRequestMessage" name="input"/>

<bpws:variable messageType="tns:HelloWorldResponseMessage"
name="output"/>

</bpws:variables>

<bpws:sequence name="main">

<bpws:receive createInstance="yes" name="receiveInput"
operation="initiate" partnerLink="client" portType="tns:MyHelloWorld"
variable="input"/>

<bpws:assign name="Assign" validate="no">

<bpws:copy>

<bpws:from><![CDATA[concat("Hello, " ,
$input.payload/tns:input)]]></bpws:from>

<bpws:to part="payload" variable="output">

<bpws:query
queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116"><![CDATA[/t
ns:result]]></bpws:query>

</bpws:to>

</bpws:copy>

</bpws:assign>

<bpws:invoke inputVariable="output" name="callbackClient"
operation="onResult" partnerLink="client"
portType="tns:HelloWorldCallback"/>

</bpws:sequence>

</bpws:process>

 

 

My test request message is :

 

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

  <!-- test soap message -->

  <SOAP-ENV:Body>

    <ns1:initiate xmlns:ns1="http://ode/bpel/unit-test.wsdl">

        <input>Hello</input>

    </ns1:initiate>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

 

Regards

 

________________________________

From: Matthieu Riou [mailto:matthieu.riou@gmail.com] 
Sent: Monday, July 30, 2007 12:10 PM
To: CHANDRAN Anup; user@ode.apache.org
Subject: Re: ODE fault - Exception: SOAP body does not contain expected
part wrapper

 

(Forwarding to the mailing-list)

Could you send you message definition as well? The operation looks good
but it seems that the part name is missing (in rpc/lit the operation
name is used as a wrapper and then you have an element for each part). 

Cheers,
Matthieu

On 7/30/07, anup.chandran@3ds.com <anup.chandran@3ds.com > wrote:

Matthieu, Thierry,

I have a similar issue however im using literal. 

<binding name="HelloWorldSoapBinding" type="tns:MyHelloWorld">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http "/>
        <operation name="initiate">
           <soap:operation
soapAction="http://sample.bpel.org/bpel/sample"/>
           <input> 
               <soap:body use="literal"/>
           </input>
        </operation>
    </binding>


This is my request:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
  <!-- test soap message -->
  <SOAP-ENV:Body>
    <ns1:initiate xmlns:ns1=" http://ode/bpel/unit-test.wsdl
<http://ode/bpel/unit-test.wsdl> ">
        <input>Hello</input>
    </ns1:initiate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I get the error :

Message: name={
http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequestMessage> 
Part: name=payload
elementName={
http://sample.bpel.org/bpel/sample}HelloWorldRequest,Operation
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequest,Operation> : nam
e=initiate
style=ONE_WAY,0
Input: name=null
Message:
name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequestMessage> 
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequest> )
DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation:
name=initiate 

style=ONE_WAY,0
Input: name=null
Message:
name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequestMessage> 
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequest>  from service {
http://sample.bpel.org/bpel/sample}MyHelloWorldService
<http://sample.bpel.org/bpel/sample%7dMyHelloWorldService> 
11:10:05,503 DEBUG [ODEService] ODE routed to operation Operation:
name=initiate

style=ONE_WAY,0
Input: name=null
Message:
name={http://sample.bpel.org/bpel/sample}HelloWorldRequestMessage
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequestMessage> 
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloWorldRequest
<http://sample.bpel.org/bpel/sample%7dHelloWorldRequest>  from service {
http://sample.bpel.org/bpel/sample}MyHelloWorldService
<http://sample.bpel.org/bpel/sample%7dMyHelloWorldService> 
ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
wrapper:
service { http://sample.bpel.org/bpel/sample}MyHelloWorldService
<http://sample.bpel.org/bpel/sample%7dMyHelloWorldService>  port
MyHelloWor
ld wrapper initiate; nested exception is:
        java.lang.IllegalArgumentException : SOAP body does not contain
expected
part wrapper: service
{http://sample.bpel.org/bpel/sample}MyHelloWorldService
<http://sample.bpel.org/bpel/sample%7dMyHelloWorldService>  po
rt MyHelloWorld wrapper initiate 

How did you solve the issue you faced?


Matthieu Riou-2 wrote:
>
> Hi Thierry,
>
> A couple of things:
>
> 1. As you mentioned, ODE only support literals. There are several
issues 
> with encoded and it's prohibited by WS-BasicProfile. We usually try to
> stick
> to the profile to avoid interoperability issues.
>
> 2. ODE doesn't support SOAP 1.2 for now
> 
> Cheers,
> Matthieu
>
> On 6/8/07, Ciot, Thierry <th...@compuware.com> wrote:
>>
>> This rather long, I apologize in advance but it seems the best way to

>> explain what I'm seeing.
>>
>> I have deployed one process and when I try to access it I get an
>> exception: SOAP body does not contain expected part wrapper.
>>
>> 
>>
>> Below is what I send (using SoapUI):
>>
>>
>>
>> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope "
>> xmlns:loan="http://loanRequest.thierry">
>>
>>    <soap:Header/>
>>
>>    <soap:Body>
>> 
>>       <loan:requestLoan>
>>
>>          <amount>100</amount>
>>
>>          <lastName>x</lastName>
>>
>>          <firstName>y</firstName> 
>>
>>       </loan:requestLoan>
>>
>>    </soap:Body>
>>
>> </soap:Envelope>
>>
>>
>>
>> And here is what I receive: 
>>
>>
>>
>> <soapenv:Envelope
>> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>>
>>    <soapenv:Body>
>>
>>       <soapenv:Fault xmlns:java="java:package org.apache.ode.axis2">
>>
>>          <soapenv:Code>
>>
>>
>> <soapenv:Value>java:org.apache.ode.axis2.OdeFault</soapenv:Value>
>>
>>          </soapenv:Code>
>>
>>          <soapenv:Reason>
>>
>>             <soapenv:Text xml:lang="en-US">An exception occured while

>> invoking ODE.</soapenv:Text>
>>
>>          </soapenv:Reason>
>>
>>          <soapenv:Detail/>
>>
>>       </soapenv:Fault>
>> 
>>    </soapenv:Body>
>>
>> </soapenv:Envelope>
>>
>>
>>
>> What I noticed that seems wring is that  the soap body does not
>> correspond to what I have specified in the wsdl file. 
>>
>>
>>
>> Here is what I specify:
>>
>>
>>
>> <wsdl:operation name="requestLoan">
>>
>>       <soap:operation soapAction="" style="rpc"/> 
>>
>>       <wsdl:input>
>>
>>         <soap:body
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
>> use="encoded"/>
>>
>>       </wsdl:input>
>>
>>       <wsdl:output>
>>
>>         <soap:body
>> encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
>> use="encoded"/>
>>
>>       </wsdl:output>
>>
>> </wsdl:operation> 
>>
>>
>>
>>
>>
>> <wsdl:binding name="LoanRequestSOAP12Binding"
>> type="tns:LoanRequestPortType">
>>
>> <soap12:binding transport=" http://schemas.xmlsoap.org/soap/http"
>> style="document"/>
>>
>>       <wsdl:operation name="requestLoan">
>>
>>   <soap12:operation soapAction="" style="document"/>
>>
>>             <wsdl:input>
>>
>> <soap12:body use="literal"/> 
>>
>> </wsdl:input>
>>
>>       <wsdl:output>
>>
>> <soap12:body use="literal"/>
>>
>> </wsdl:output>
>>
>> </wsdl:operation>
>>
>> </wsdl:binding>
>>
>>
>>
>> So it seems that even though I specified <soap:body
>> encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> "
>> use="encoded"/> ODE implemented <soap12:body use="literal"/>
>>
>>
>>
>> I noticed that the HelloWorld2 example was using literal on both
ends. 
>>
>>
>>
>> Is ODE only supporting literal?
>>
>>
>>
>> Below is the stack trace in the log file.
>>
>>
>>
>> Thanks, Thierry. 
>>
>>
>>
>> ERROR - GeronimoLog.error(108) | Exception occured while invoking ODE
>>
>> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
part
>> wrapper: service { http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService>  port
>> LoanRequestPort wrapper requestLoan; nested exception is:
>>
>>       java.lang.IllegalArgumentException : SOAP body does not contain
>> expected part wrapper: service
>> {http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService>  port LoanRequestPort
>> wrapper requestLoan 
>>
>>       at
>>
org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(Soap
>> MessageConverter.java:358)
>>
>>       at
>> org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest
(SoapMess
>> ageConverter.java:292)
>>
>>       at
>>
org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:11
>> 8)
>>
>>       at
>>
org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMes
>> sageReceiver.java:68)
>>
>>       at
>>
org.apache.ode.axis2.hooks.ODEMessageReceiver.receive(ODEMessageReceiver

>> .java:49)
>>
>>       at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)
>>
>>       at
>>
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques

>> t(HTTPTransportUtils.java:328)
>>
>>       at
>>
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
>>
>>       at javax.servlet.http.HttpServlet.service
(HttpServlet.java:710)
>>
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>>       at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(Applica
>> tionFilterChain.java:269)
>>
>>       at
>>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>> erChain.java:188)
>>
>>       at 
>>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>> e.java:210)
>>
>>       at
>>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv

>> e.java:174)
>>
>>       at
>>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>> :127)
>>
>>       at
>> org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java
>> :117)
>>
>>       at
>>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>> java:108)
>>
>>       at
>>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>> 51)
>>
>>       at
>>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
>> 0) 
>>
>>       at
>>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
>> essConnection(Http11BaseProtocol.java:665)
>>
>>       at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint
>> .java:528)
>>
>>       at
>>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
>> erWorkerThread.java:81)
>>
>>       at 
>>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>> .java:685)
>>
>>       at java.lang.Thread.run(Unknown Source)
>>
>> Caused by: java.lang.IllegalArgumentException : SOAP body does not
>> contain expected part wrapper: service
>> {http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService>  port LoanRequestPort
>> wrapper requestLoan 
>>
>>       at
>>
org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp
>> er(Messages.java:235)
>>
>>       ... 24 more
>>
>> 16:29:03,803 ERROR [ODEService] Exception occured while invoking ODE 
>>
>> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
part
>> wrapper: service {http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService> port
>> LoanRequestPort wrapper requestLoan; nested exception is:
>>
>>       java.lang.IllegalArgumentException: SOAP body does not contain
>> expected part wrapper: service
>> { http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService>  port LoanRequestPort
>> wrapper requestLoan
>>
>>       at
>> org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts
(Soap
>> MessageConverter.java:358)
>>
>>       at
>>
org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMess
>> ageConverter.java:292)
>>
>>       at 
>>
org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:11
>> 8)
>>
>>       at
>>
org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMes
>> sageReceiver.java:68)
>>
>>       at
>>
org.apache.ode.axis2.hooks.ODEMessageReceiver.receive(ODEMessageReceiver
>> .java:49)
>>
>>       at org.apache.axis2.engine.AxisEngine.receive
(AxisEngine.java:497)
>>
>>       at
>>
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
>> t(HTTPTransportUtils.java:328)
>>
>>       at
>>
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
>>
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>>
>>       at javax.servlet.http.HttpServlet.service
(HttpServlet.java:803)
>>
>>       at
>>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>> tionFilterChain.java:269)
>>
>>       at
>>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>> erChain.java:188)
>>
>>       at
>>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>> e.java:210)
>>
>>       at
>>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>> e.java:174)
>>
>>       at
>> org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java
>> :127)
>>
>>       at
>>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>> :117)
>>
>>       at
>>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>> java:108)
>>
>>       at
>>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>> 51) 
>>
>>       at
>>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
>> 0)
>>
>>       at
>>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc

>> essConnection(Http11BaseProtocol.java:665)
>>
>>       at
>>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
>> .java:528)
>>
>>       at 
>>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
>> erWorkerThread.java:81)
>>
>>       at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool
>> .java:685)
>>
>>       at java.lang.Thread.run(Unknown Source)
>>
>> Caused by: java.lang.IllegalArgumentException: SOAP body does not
>> contain expected part wrapper: service 
>> {http://loanRequest.thierry}LoanRequestService
<http://loanRequest.thierry%7dLoanRequestService>  port LoanRequestPort
>> wrapper requestLoan
>>
>>       at
>>
org.apache.ode.axis2.Messages.msgSoapBodyDoesNotContainExpectedPartWrapp

>> er(Messages.java:235)
>>
>>       ... 24 more
>>
>>
>> The contents of this e-mail are intended for the named addressee
only. It
>> contains information that may be confidential. Unless you are the
named 
>> addressee or an authorized designee, you may not copy or use it, or
>> disclose
>> it to anyone else. If you received it in error please notify us
>> immediately
>> and then destroy it. 
>>
>
>
Quoted from:
http://www.nabble.com/ODE-fault---Exception%3A-SOAP-body-does-not-contai
n-expected-part-wrapper-tf3892043.html#a11034155