You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Bernd Winterstein <be...@googlemail.com> on 2008/05/05 11:53:17 UTC

sendsoap question

Hi I have the following wsdl implemented as a BPEL process
When i Send the following soap file with sendsoap i always get an error
Any ideas? I thought I did the same as in the HelloWorld example.


?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
">
  <!-- test soap message -->
  <SOAP-ENV:Body>

    <ns1:talkNonsense xmlns:ns1="http://winterstein-it.de/NonseService/">
        <parameters xmlns="">Hello</parameters>
    </ns1:talkNonsense>

  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Caused by: org.apache.ode.axis2.OdeFault: Unexpected element in SOAP body:
message {http://winterstein-it.de/NonseService/}talkNonsense element {
http://www.w3.org/2001/XMLSchema}string.
    at
org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:408)
    at
org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMessageConverter.java:314)
    at
org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:106)
    ... 20 more
Caused by: java.lang.IllegalArgumentException: Unexpected element in SOAP
body: message {http://winterstein-it.de/NonseService/}talkNonsense element {
http://www.w3.org/2001/XMLSchema}string.
    at
org.apache.ode.axis2.Messages.msgUnexpectedElementInSOAPBody(Messages.java:202)
    ... 23 more




<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://winterstein-it.de/NonseService/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
    targetNamespace="http://winterstein-it.de/NonseService/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">


    <wsdl:types>
        <xsd:schema targetNamespace="http://winterstein-it.de/NonseService/
">
            <xsd:element name="NonseOp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="test" type="xsd:string" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="nonseOpMsg">
        <wsdl:part name="parameters" element="xsd:string"/>
    </wsdl:message>

    <wsdl:portType name="NonseService">
        <wsdl:operation name="talkNonsense">
            <wsdl:input message="tns:nonseOpMsg" />
            <wsdl:output message="tns:nonseOpMsg" />
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="talkNonsense">
            <soap:operation soapAction=""/>
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="NonseService">
        <wsdl:port binding="tns:NonseServiceSOAP"
            name="NonseServiceSOAP">
            <soap:address location="
http://localhost:8080/ode/processes/nonse" />
        </wsdl:port>
    </wsdl:service>

    <plnk:partnerLinkType name="NonseServicePartnerLinkType">
        <plnk:role name="client" portType="tns:NonseService" />
        <plnk:role name="nonseImplementor" portType="tns:NonseService" />
    </plnk:partnerLinkType>

</wsdl:definitions>

Re: sendsoap question

Posted by Matthieu Riou <ma...@offthelip.org>.
On Mon, May 5, 2008 at 10:36 PM, Bernd Winterstein <
bernd.winterstein@googlemail.com> wrote:

> Still the same:
>
> Caused by: java.lang.IllegalArgumentException: Unexpected element in SOAP
> body: message {http://winterstein-it.de/NonseService/}NonseOp<http://winterstein-it.de/NonseService/%7DNonseOp>element {
> http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> .
>

A couple questions:

1. Which service throws this? It doesn't look like ODE.
2. It seems that you have an element named 'string' in your message, do you?

Matthieu


>
>
> 2008/5/5 Matthieu Riou <ma...@offthelip.org>:
>
> > The schema used in your WSDL document seems to indicate that the type of
> > your message is an element containing a test sub-element (and not
> > parameter)
> > which has a string type so your message should probably be:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
> >       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >       xmlns:ns="http://winterstein-it.de/NonseService/">
> >   <soapenv:Body>
> >      <ns:NonseOp>
> >           <ns:test>
> >          Hello
> >          </ns:test>
> >       </ns:NonseOp>
> >  </soapenv:Body>
> >
> > </soapenv:Envelope>
> >
> > Cheers,
> > Matthieu
> >
> > On Mon, May 5, 2008 at 8:11 AM, Bernd Winterstein <
> > bernd.winterstein@googlemail.com> wrote:
> >
> > > There was an error in the soapaction specified in the wsdl.
> > > My problem is that I cannot send a message via sendsoap when using
> > > document/literal. Everything I try to send results in an error. Even
> the
> > > eclipse Webservice tester does not work. I always get an error like
> > > "Unexpected element in SOAP body: message {
> > > http://winterstein-it.de/NonseService/}NonseOp<http://winterstein-it.de/NonseService/%7DNonseOp>
> <http://winterstein-it.de/NonseService/%7DNonseOp>
> > <http://winterstein-it.de/NonseService/%7DNonseOp>element {
> > > http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> <http://www.w3.org/2001/XMLSchema%7Dstring>
> > <http://www.w3.org/2001/XMLSchema%7Dstring>
> > > ."
> > > I tried everything.
> > >
> > > ./../apache-ode-war-1.1.1/bin/sendsoap
> > > http://localhost:8080/ode/processes/nonse testRequest.xml -a
> > > http://winterstein-it.de/NonseService/talkNonsense
> > >
> > > Message:
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
> > >        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > >        xmlns:ns="http://winterstein-it.de/NonseService/">
> > >    <soapenv:Body>
> > >       <ns:NonseOp>
> > >           <ns:parameter>
> > >           Hello
> > >           </ns:parameter>
> > >       </ns:NonseOp>
> > >  </soapenv:Body>
> > >
> > > </soapenv:Envelope>
> > >
> > >
> > > WSDL:
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >    xmlns:tns="http://winterstein-it.de/NonseService/"
> > >    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
> > >    targetNamespace="http://winterstein-it.de/NonseService/"
> > >    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
> > >
> > >
> > >    <wsdl:types>
> > >        <xsd:schema targetNamespace="
> > http://winterstein-it.de/NonseService/
> > > ">
> > >            <xsd:element name="NonseOp">
> > >                <xsd:complexType>
> > >                    <xsd:sequence>
> > >                        <xsd:element name="test" type="xsd:string" />
> > >                    </xsd:sequence>
> > >                </xsd:complexType>
> > >            </xsd:element>
> > >        </xsd:schema>
> > >    </wsdl:types>
> > >
> > >    <wsdl:message name="nonseOpMsg">
> > >         <wsdl:part name="parameters" element="tns:NonseOp"/>
> > >     </wsdl:message>
> > >
> > >    <wsdl:portType name="NonseService">
> > >        <wsdl:operation name="talkNonsense">
> > >            <wsdl:input message="tns:nonseOpMsg" />
> > >            <wsdl:output message="tns:nonseOpMsg" />
> > >        </wsdl:operation>
> > >    </wsdl:portType>
> > >
> > >    <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
> > >        <soap:binding style="document" transport="
> > > http://schemas.xmlsoap.org/soap/http" />
> > >        <wsdl:operation name="talkNonsense">
> > >            <soap:operation soapAction="
> > > http://winterstein-it.de/NonseService/talkNonsense"/>
> > >             <wsdl:input>
> > >                <soap:body use="literal" />
> > >            </wsdl:input>
> > >            <wsdl:output>
> > >                <soap:body use="literal" />
> > >            </wsdl:output>
> > >        </wsdl:operation>
> > >    </wsdl:binding>
> > >
> > >    <wsdl:service name="NonseService">
> > >        <wsdl:port binding="tns:NonseServiceSOAP"
> > >            name="NonseServiceSOAP">
> > >            <soap:address location="
> > > http://localhost:8080/ode/processes/nonse" />
> > >        </wsdl:port>
> > >    </wsdl:service>
> > >
> > >    <plnk:partnerLinkType name="NonseServicePartnerLinkType">
> > >        <plnk:role name="client" portType="tns:NonseService" />
> > >        <plnk:role name="nonseImplementor" portType="tns:NonseService"
> />
> > >    </plnk:partnerLinkType>
> > >
> > > </wsdl:definitions>
> > >
> > > BPEL:
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <bpws:process exitOnStandardFault="yes"
> > >    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
> > >    name="NonseProcess" suppressJoinFailure="yes"
> > >    targetNamespace="http://winterstein-it.de/NonseProcess/"
> > >    xmlns:bpws="
> http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> > >    xmlns:ns="http://winterstein-it.de/NonseService/"
> > >    xmlns:tns="http://winterstein-it.de/NonseProcess/"
> > >     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > >
> > >     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
> > >        location="NonseService.wsdl" namespace="
> > > http://winterstein-it.de/NonseService/"/>
> > >
> > >    <bpws:partnerLinks>
> > >        <bpws:partnerLink name="processClient"
> > > partnerLinkType="ns:NonseServicePartnerLinkType"
> > >                          myRole="nonseImplementor"
> > partnerRole="client"/>
> > >    </bpws:partnerLinks>
> > >
> > >    <bpws:variables>
> > >        <bpws:variable messageType="ns:nonseOpMsg" name="tmp"/>
> > >    </bpws:variables>
> > >
> > >    <bpws:sequence>
> > >        <bpws:receive createInstance="yes" name="start"
> > >            operation="talkNonsense" partnerLink="processClient"
> > >            portType="ns:NonseService" variable="tmp"/>
> > >
> > >        <!--
> > >        <bpws:assign name="in2out" validate="yes">
> > >            <bpws:copy>
> > >                <bpws:from><![CDATA['poop']]></bpws:from>
> > >                <bpws:to variable="tmp"/>
> > >            </bpws:copy>
> > >        </bpws:assign>
> > >         -->
> > >
> > >        <bpws:reply name="end" operation="talkNonsense"
> > >            partnerLink="processClient" portType="ns:NonseService"
> > > variable="tmp"/>
> > >    </bpws:sequence>
> > > </bpws:process>
> > >
> >
>

Re: sendsoap question

Posted by Bernd Winterstein <be...@googlemail.com>.
Still the same:

Caused by: java.lang.IllegalArgumentException: Unexpected element in SOAP
body: message {http://winterstein-it.de/NonseService/}NonseOp element {
http://www.w3.org/2001/XMLSchema}string.


2008/5/5 Matthieu Riou <ma...@offthelip.org>:

> The schema used in your WSDL document seems to indicate that the type of
> your message is an element containing a test sub-element (and not
> parameter)
> which has a string type so your message should probably be:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
>       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>       xmlns:ns="http://winterstein-it.de/NonseService/">
>   <soapenv:Body>
>      <ns:NonseOp>
>           <ns:test>
>          Hello
>          </ns:test>
>       </ns:NonseOp>
>  </soapenv:Body>
>
> </soapenv:Envelope>
>
> Cheers,
> Matthieu
>
> On Mon, May 5, 2008 at 8:11 AM, Bernd Winterstein <
> bernd.winterstein@googlemail.com> wrote:
>
> > There was an error in the soapaction specified in the wsdl.
> > My problem is that I cannot send a message via sendsoap when using
> > document/literal. Everything I try to send results in an error. Even the
> > eclipse Webservice tester does not work. I always get an error like
> > "Unexpected element in SOAP body: message {
> > http://winterstein-it.de/NonseService/}NonseOp<http://winterstein-it.de/NonseService/%7DNonseOp>
> <http://winterstein-it.de/NonseService/%7DNonseOp>element {
> > http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> <http://www.w3.org/2001/XMLSchema%7Dstring>
> > ."
> > I tried everything.
> >
> > ./../apache-ode-war-1.1.1/bin/sendsoap
> > http://localhost:8080/ode/processes/nonse testRequest.xml -a
> > http://winterstein-it.de/NonseService/talkNonsense
> >
> > Message:
> > <?xml version="1.0" encoding="utf-8" ?>
> > <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
> >        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >        xmlns:ns="http://winterstein-it.de/NonseService/">
> >    <soapenv:Body>
> >       <ns:NonseOp>
> >           <ns:parameter>
> >           Hello
> >           </ns:parameter>
> >       </ns:NonseOp>
> >  </soapenv:Body>
> >
> > </soapenv:Envelope>
> >
> >
> > WSDL:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >    xmlns:tns="http://winterstein-it.de/NonseService/"
> >    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
> >    targetNamespace="http://winterstein-it.de/NonseService/"
> >    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
> >
> >
> >    <wsdl:types>
> >        <xsd:schema targetNamespace="
> http://winterstein-it.de/NonseService/
> > ">
> >            <xsd:element name="NonseOp">
> >                <xsd:complexType>
> >                    <xsd:sequence>
> >                        <xsd:element name="test" type="xsd:string" />
> >                    </xsd:sequence>
> >                </xsd:complexType>
> >            </xsd:element>
> >        </xsd:schema>
> >    </wsdl:types>
> >
> >    <wsdl:message name="nonseOpMsg">
> >         <wsdl:part name="parameters" element="tns:NonseOp"/>
> >     </wsdl:message>
> >
> >    <wsdl:portType name="NonseService">
> >        <wsdl:operation name="talkNonsense">
> >            <wsdl:input message="tns:nonseOpMsg" />
> >            <wsdl:output message="tns:nonseOpMsg" />
> >        </wsdl:operation>
> >    </wsdl:portType>
> >
> >    <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
> >        <soap:binding style="document" transport="
> > http://schemas.xmlsoap.org/soap/http" />
> >        <wsdl:operation name="talkNonsense">
> >            <soap:operation soapAction="
> > http://winterstein-it.de/NonseService/talkNonsense"/>
> >             <wsdl:input>
> >                <soap:body use="literal" />
> >            </wsdl:input>
> >            <wsdl:output>
> >                <soap:body use="literal" />
> >            </wsdl:output>
> >        </wsdl:operation>
> >    </wsdl:binding>
> >
> >    <wsdl:service name="NonseService">
> >        <wsdl:port binding="tns:NonseServiceSOAP"
> >            name="NonseServiceSOAP">
> >            <soap:address location="
> > http://localhost:8080/ode/processes/nonse" />
> >        </wsdl:port>
> >    </wsdl:service>
> >
> >    <plnk:partnerLinkType name="NonseServicePartnerLinkType">
> >        <plnk:role name="client" portType="tns:NonseService" />
> >        <plnk:role name="nonseImplementor" portType="tns:NonseService" />
> >    </plnk:partnerLinkType>
> >
> > </wsdl:definitions>
> >
> > BPEL:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <bpws:process exitOnStandardFault="yes"
> >    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
> >    name="NonseProcess" suppressJoinFailure="yes"
> >    targetNamespace="http://winterstein-it.de/NonseProcess/"
> >    xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> >    xmlns:ns="http://winterstein-it.de/NonseService/"
> >    xmlns:tns="http://winterstein-it.de/NonseProcess/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> >     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
> >        location="NonseService.wsdl" namespace="
> > http://winterstein-it.de/NonseService/"/>
> >
> >    <bpws:partnerLinks>
> >        <bpws:partnerLink name="processClient"
> > partnerLinkType="ns:NonseServicePartnerLinkType"
> >                          myRole="nonseImplementor"
> partnerRole="client"/>
> >    </bpws:partnerLinks>
> >
> >    <bpws:variables>
> >        <bpws:variable messageType="ns:nonseOpMsg" name="tmp"/>
> >    </bpws:variables>
> >
> >    <bpws:sequence>
> >        <bpws:receive createInstance="yes" name="start"
> >            operation="talkNonsense" partnerLink="processClient"
> >            portType="ns:NonseService" variable="tmp"/>
> >
> >        <!--
> >        <bpws:assign name="in2out" validate="yes">
> >            <bpws:copy>
> >                <bpws:from><![CDATA['poop']]></bpws:from>
> >                <bpws:to variable="tmp"/>
> >            </bpws:copy>
> >        </bpws:assign>
> >         -->
> >
> >        <bpws:reply name="end" operation="talkNonsense"
> >            partnerLink="processClient" portType="ns:NonseService"
> > variable="tmp"/>
> >    </bpws:sequence>
> > </bpws:process>
> >
>

Re: sendsoap question

Posted by Matthieu Riou <ma...@offthelip.org>.
The schema used in your WSDL document seems to indicate that the type of
your message is an element containing a test sub-element (and not parameter)
which has a string type so your message should probably be:

<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:ns="http://winterstein-it.de/NonseService/">
   <soapenv:Body>
      <ns:NonseOp>
          <ns:test>
          Hello
          </ns:test>
      </ns:NonseOp>
 </soapenv:Body>

</soapenv:Envelope>

Cheers,
Matthieu

On Mon, May 5, 2008 at 8:11 AM, Bernd Winterstein <
bernd.winterstein@googlemail.com> wrote:

> There was an error in the soapaction specified in the wsdl.
> My problem is that I cannot send a message via sendsoap when using
> document/literal. Everything I try to send results in an error. Even the
> eclipse Webservice tester does not work. I always get an error like
> "Unexpected element in SOAP body: message {
> http://winterstein-it.de/NonseService/}NonseOp<http://winterstein-it.de/NonseService/%7DNonseOp>element {
> http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> ."
> I tried everything.
>
> ./../apache-ode-war-1.1.1/bin/sendsoap
> http://localhost:8080/ode/processes/nonse testRequest.xml -a
> http://winterstein-it.de/NonseService/talkNonsense
>
> Message:
> <?xml version="1.0" encoding="utf-8" ?>
> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
>        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>        xmlns:ns="http://winterstein-it.de/NonseService/">
>    <soapenv:Body>
>       <ns:NonseOp>
>           <ns:parameter>
>           Hello
>           </ns:parameter>
>       </ns:NonseOp>
>  </soapenv:Body>
>
> </soapenv:Envelope>
>
>
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:tns="http://winterstein-it.de/NonseService/"
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
>    targetNamespace="http://winterstein-it.de/NonseService/"
>    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
>
>
>    <wsdl:types>
>        <xsd:schema targetNamespace="http://winterstein-it.de/NonseService/
> ">
>            <xsd:element name="NonseOp">
>                <xsd:complexType>
>                    <xsd:sequence>
>                        <xsd:element name="test" type="xsd:string" />
>                    </xsd:sequence>
>                </xsd:complexType>
>            </xsd:element>
>        </xsd:schema>
>    </wsdl:types>
>
>    <wsdl:message name="nonseOpMsg">
>         <wsdl:part name="parameters" element="tns:NonseOp"/>
>     </wsdl:message>
>
>    <wsdl:portType name="NonseService">
>        <wsdl:operation name="talkNonsense">
>            <wsdl:input message="tns:nonseOpMsg" />
>            <wsdl:output message="tns:nonseOpMsg" />
>        </wsdl:operation>
>    </wsdl:portType>
>
>    <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
>        <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http" />
>        <wsdl:operation name="talkNonsense">
>            <soap:operation soapAction="
> http://winterstein-it.de/NonseService/talkNonsense"/>
>             <wsdl:input>
>                <soap:body use="literal" />
>            </wsdl:input>
>            <wsdl:output>
>                <soap:body use="literal" />
>            </wsdl:output>
>        </wsdl:operation>
>    </wsdl:binding>
>
>    <wsdl:service name="NonseService">
>        <wsdl:port binding="tns:NonseServiceSOAP"
>            name="NonseServiceSOAP">
>            <soap:address location="
> http://localhost:8080/ode/processes/nonse" />
>        </wsdl:port>
>    </wsdl:service>
>
>    <plnk:partnerLinkType name="NonseServicePartnerLinkType">
>        <plnk:role name="client" portType="tns:NonseService" />
>        <plnk:role name="nonseImplementor" portType="tns:NonseService" />
>    </plnk:partnerLinkType>
>
> </wsdl:definitions>
>
> BPEL:
> <?xml version="1.0" encoding="UTF-8"?>
> <bpws:process exitOnStandardFault="yes"
>    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
>    name="NonseProcess" suppressJoinFailure="yes"
>    targetNamespace="http://winterstein-it.de/NonseProcess/"
>    xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>    xmlns:ns="http://winterstein-it.de/NonseService/"
>    xmlns:tns="http://winterstein-it.de/NonseProcess/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>     <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
>        location="NonseService.wsdl" namespace="
> http://winterstein-it.de/NonseService/"/>
>
>    <bpws:partnerLinks>
>        <bpws:partnerLink name="processClient"
> partnerLinkType="ns:NonseServicePartnerLinkType"
>                          myRole="nonseImplementor" partnerRole="client"/>
>    </bpws:partnerLinks>
>
>    <bpws:variables>
>        <bpws:variable messageType="ns:nonseOpMsg" name="tmp"/>
>    </bpws:variables>
>
>    <bpws:sequence>
>        <bpws:receive createInstance="yes" name="start"
>            operation="talkNonsense" partnerLink="processClient"
>            portType="ns:NonseService" variable="tmp"/>
>
>        <!--
>        <bpws:assign name="in2out" validate="yes">
>            <bpws:copy>
>                <bpws:from><![CDATA['poop']]></bpws:from>
>                <bpws:to variable="tmp"/>
>            </bpws:copy>
>        </bpws:assign>
>         -->
>
>        <bpws:reply name="end" operation="talkNonsense"
>            partnerLink="processClient" portType="ns:NonseService"
> variable="tmp"/>
>    </bpws:sequence>
> </bpws:process>
>

Re: sendsoap question

Posted by Bernd Winterstein <be...@googlemail.com>.
There was an error in the soapaction specified in the wsdl.
My problem is that I cannot send a message via sendsoap when using
document/literal. Everything I try to send results in an error. Even the
eclipse Webservice tester does not work. I always get an error like
"Unexpected element in SOAP body: message {
http://winterstein-it.de/NonseService/}NonseOp element {
http://www.w3.org/2001/XMLSchema}string."
I tried everything.

./../apache-ode-war-1.1.1/bin/sendsoap
http://localhost:8080/ode/processes/nonse testRequest.xml -a
http://winterstein-it.de/NonseService/talkNonsense

Message:
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:ns="http://winterstein-it.de/NonseService/">
    <soapenv:Body>
       <ns:NonseOp>
           <ns:parameter>
           Hello
           </ns:parameter>
       </ns:NonseOp>
  </soapenv:Body>

</soapenv:Envelope>


WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://winterstein-it.de/NonseService/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
    targetNamespace="http://winterstein-it.de/NonseService/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">


    <wsdl:types>
        <xsd:schema targetNamespace="http://winterstein-it.de/NonseService/
">
            <xsd:element name="NonseOp">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="test" type="xsd:string" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="nonseOpMsg">
        <wsdl:part name="parameters" element="tns:NonseOp"/>
    </wsdl:message>

    <wsdl:portType name="NonseService">
        <wsdl:operation name="talkNonsense">
            <wsdl:input message="tns:nonseOpMsg" />
            <wsdl:output message="tns:nonseOpMsg" />
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
        <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="talkNonsense">
            <soap:operation soapAction="
http://winterstein-it.de/NonseService/talkNonsense"/>
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="NonseService">
        <wsdl:port binding="tns:NonseServiceSOAP"
            name="NonseServiceSOAP">
            <soap:address location="
http://localhost:8080/ode/processes/nonse" />
        </wsdl:port>
    </wsdl:service>

    <plnk:partnerLinkType name="NonseServicePartnerLinkType">
        <plnk:role name="client" portType="tns:NonseService" />
        <plnk:role name="nonseImplementor" portType="tns:NonseService" />
    </plnk:partnerLinkType>

</wsdl:definitions>

BPEL:
<?xml version="1.0" encoding="UTF-8"?>
<bpws:process exitOnStandardFault="yes"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"
    name="NonseProcess" suppressJoinFailure="yes"
    targetNamespace="http://winterstein-it.de/NonseProcess/"
    xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:ns="http://winterstein-it.de/NonseService/"
    xmlns:tns="http://winterstein-it.de/NonseProcess/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
        location="NonseService.wsdl" namespace="
http://winterstein-it.de/NonseService/"/>

    <bpws:partnerLinks>
        <bpws:partnerLink name="processClient"
partnerLinkType="ns:NonseServicePartnerLinkType"
                          myRole="nonseImplementor" partnerRole="client"/>
    </bpws:partnerLinks>

    <bpws:variables>
        <bpws:variable messageType="ns:nonseOpMsg" name="tmp"/>
    </bpws:variables>

    <bpws:sequence>
        <bpws:receive createInstance="yes" name="start"
            operation="talkNonsense" partnerLink="processClient"
            portType="ns:NonseService" variable="tmp"/>

        <!--
        <bpws:assign name="in2out" validate="yes">
            <bpws:copy>
                <bpws:from><![CDATA['poop']]></bpws:from>
                <bpws:to variable="tmp"/>
            </bpws:copy>
        </bpws:assign>
         -->

        <bpws:reply name="end" operation="talkNonsense"
            partnerLink="processClient" portType="ns:NonseService"
variable="tmp"/>
    </bpws:sequence>
</bpws:process>

Re: sendsoap question

Posted by Matthieu Riou <ma...@offthelip.org>.
On Mon, May 5, 2008 at 5:43 AM, Bernd Winterstein <
bernd.winterstein@googlemail.com> wrote:

> ../../apache-ode-war-1.1.1/bin/sendsoap
> http://localhost:8080/ode/processes/nonse testRequest.xml -a
> http://winterstein-it.de/NonseService/NonseServiceSOAP/talkNonsense
>
> does not work
>

Would you have something a bit more specific than "does not work"?

Cheers,
Matthieu


>
> 2008/5/5 Bernd Winterstein <be...@googlemail.com>:
>
> > Okay, but how do I correctly specify the soap action?
> >
> > 2008/5/5 Tammo van Lessen <tv...@gmail.com>:
> >
> > Hi Bernd,
> > >
> > > for the given WSDL interface the correct doc/lit SOAP request would be
> > > without the <ns1:talkNonsense> element. I guess that you actually
> > > meant to use the tns:NonseOp type as an element type for the part?
> > > i.e.
> > >
> > >  <wsdl:message name="nonseOpMsg">
> > >       <wsdl:part name="parameters" element="tns:NonseOp"/>
> > >  </wsdl:message>
> > >
> > > HTH,
> > >  Tammo
> > >
> > > On Mon, May 5, 2008 at 11:53 AM, Bernd Winterstein
> > > <be...@googlemail.com> wrote:
> > > > Hi I have the following wsdl implemented as a BPEL process
> > > >  When i Send the following soap file with sendsoap i always get an
> > > error
> > > >  Any ideas? I thought I did the same as in the HelloWorld example.
> > > >
> > > >
> > > >  ?xml version="1.0" encoding="utf-8" ?>
> > > >  <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> > > http://schemas.xmlsoap.org/soap/envelope/
> > > >  ">
> > > >   <!-- test soap message -->
> > > >   <SOAP-ENV:Body>
> > > >
> > > >     <ns1:talkNonsense xmlns:ns1="
> > > http://winterstein-it.de/NonseService/">
> > > >         <parameters xmlns="">Hello</parameters>
> > > >     </ns1:talkNonsense>
> > > >
> > > >   </SOAP-ENV:Body>
> > > >  </SOAP-ENV:Envelope>
> > > >
> > > >
> > > >  Caused by: org.apache.ode.axis2.OdeFault: Unexpected element in
> SOAP
> > > body:
> > > >  message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>
> <http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> > > >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> <http://www.w3.org/2001/XMLSchema%7Dstring>
> > > .
> > > >     at
> > > >
> > >
>  org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:408)
> > > >     at
> > > >
> > >
>  org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMessageConverter.java:314)
> > > >     at
> > > >
> > >
>  org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:106)
> > > >     ... 20 more
> > > >  Caused by: java.lang.IllegalArgumentException: Unexpected element
> in
> > > SOAP
> > > >  body: message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>
> <http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> > > >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> <http://www.w3.org/2001/XMLSchema%7Dstring>
> > > .
> > > >     at
> > > >
> > >
>  org.apache.ode.axis2.Messages.msgUnexpectedElementInSOAPBody(Messages.java:202)
> > > >     ... 23 more
> > > >
> > > >
> > > >
> > > >
> > > >  <?xml version="1.0" encoding="UTF-8"?>
> > > >  <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
> "
> > > >     xmlns:tns="http://winterstein-it.de/NonseService/"
> > > >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > > >     xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
> > > >     targetNamespace="http://winterstein-it.de/NonseService/"
> > > >     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
> > > >
> > > >
> > > >     <wsdl:types>
> > > >         <xsd:schema targetNamespace="
> > > http://winterstein-it.de/NonseService/
> > > >  ">
> > > >             <xsd:element name="NonseOp">
> > > >                 <xsd:complexType>
> > > >                     <xsd:sequence>
> > > >                         <xsd:element name="test" type="xsd:string"
> />
> > > >                     </xsd:sequence>
> > > >                 </xsd:complexType>
> > > >             </xsd:element>
> > > >         </xsd:schema>
> > > >     </wsdl:types>
> > > >
> > > >     <wsdl:message name="nonseOpMsg">
> > > >         <wsdl:part name="parameters" element="xsd:string"/>
> > > >     </wsdl:message>
> > > >
> > > >     <wsdl:portType name="NonseService">
> > > >         <wsdl:operation name="talkNonsense">
> > > >             <wsdl:input message="tns:nonseOpMsg" />
> > > >             <wsdl:output message="tns:nonseOpMsg" />
> > > >         </wsdl:operation>
> > > >     </wsdl:portType>
> > > >
> > > >     <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
> > > >         <soap:binding style="document"
> > > >             transport="http://schemas.xmlsoap.org/soap/http" />
> > > >         <wsdl:operation name="talkNonsense">
> > > >             <soap:operation soapAction=""/>
> > > >             <wsdl:input>
> > > >                 <soap:body use="literal" />
> > > >             </wsdl:input>
> > > >             <wsdl:output>
> > > >                 <soap:body use="literal" />
> > > >             </wsdl:output>
> > > >         </wsdl:operation>
> > > >     </wsdl:binding>
> > > >
> > > >     <wsdl:service name="NonseService">
> > > >         <wsdl:port binding="tns:NonseServiceSOAP"
> > > >             name="NonseServiceSOAP">
> > > >             <soap:address location="
> > > >  http://localhost:8080/ode/processes/nonse" />
> > > >         </wsdl:port>
> > > >     </wsdl:service>
> > > >
> > > >     <plnk:partnerLinkType name="NonseServicePartnerLinkType">
> > > >         <plnk:role name="client" portType="tns:NonseService" />
> > > >         <plnk:role name="nonseImplementor"
> portType="tns:NonseService"
> > > />
> > > >     </plnk:partnerLinkType>
> > > >
> > > >  </wsdl:definitions>
> > > >
> > >
> > >
> > >
> > > --
> > > Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de
> > >
> >
> >
>

Re: sendsoap question

Posted by Bernd Winterstein <be...@googlemail.com>.
../../apache-ode-war-1.1.1/bin/sendsoap
http://localhost:8080/ode/processes/nonse testRequest.xml -a
http://winterstein-it.de/NonseService/NonseServiceSOAP/talkNonsense

does not work

2008/5/5 Bernd Winterstein <be...@googlemail.com>:

> Okay, but how do I correctly specify the soap action?
>
> 2008/5/5 Tammo van Lessen <tv...@gmail.com>:
>
> Hi Bernd,
> >
> > for the given WSDL interface the correct doc/lit SOAP request would be
> > without the <ns1:talkNonsense> element. I guess that you actually
> > meant to use the tns:NonseOp type as an element type for the part?
> > i.e.
> >
> >  <wsdl:message name="nonseOpMsg">
> >       <wsdl:part name="parameters" element="tns:NonseOp"/>
> >  </wsdl:message>
> >
> > HTH,
> >  Tammo
> >
> > On Mon, May 5, 2008 at 11:53 AM, Bernd Winterstein
> > <be...@googlemail.com> wrote:
> > > Hi I have the following wsdl implemented as a BPEL process
> > >  When i Send the following soap file with sendsoap i always get an
> > error
> > >  Any ideas? I thought I did the same as in the HelloWorld example.
> > >
> > >
> > >  ?xml version="1.0" encoding="utf-8" ?>
> > >  <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> > http://schemas.xmlsoap.org/soap/envelope/
> > >  ">
> > >   <!-- test soap message -->
> > >   <SOAP-ENV:Body>
> > >
> > >     <ns1:talkNonsense xmlns:ns1="
> > http://winterstein-it.de/NonseService/">
> > >         <parameters xmlns="">Hello</parameters>
> > >     </ns1:talkNonsense>
> > >
> > >   </SOAP-ENV:Body>
> > >  </SOAP-ENV:Envelope>
> > >
> > >
> > >  Caused by: org.apache.ode.axis2.OdeFault: Unexpected element in SOAP
> > body:
> > >  message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> > >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> > .
> > >     at
> > >
> >  org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:408)
> > >     at
> > >
> >  org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMessageConverter.java:314)
> > >     at
> > >
> >  org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:106)
> > >     ... 20 more
> > >  Caused by: java.lang.IllegalArgumentException: Unexpected element in
> > SOAP
> > >  body: message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> > >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> > .
> > >     at
> > >
> >  org.apache.ode.axis2.Messages.msgUnexpectedElementInSOAPBody(Messages.java:202)
> > >     ... 23 more
> > >
> > >
> > >
> > >
> > >  <?xml version="1.0" encoding="UTF-8"?>
> > >  <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >     xmlns:tns="http://winterstein-it.de/NonseService/"
> > >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >     xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
> > >     targetNamespace="http://winterstein-it.de/NonseService/"
> > >     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
> > >
> > >
> > >     <wsdl:types>
> > >         <xsd:schema targetNamespace="
> > http://winterstein-it.de/NonseService/
> > >  ">
> > >             <xsd:element name="NonseOp">
> > >                 <xsd:complexType>
> > >                     <xsd:sequence>
> > >                         <xsd:element name="test" type="xsd:string" />
> > >                     </xsd:sequence>
> > >                 </xsd:complexType>
> > >             </xsd:element>
> > >         </xsd:schema>
> > >     </wsdl:types>
> > >
> > >     <wsdl:message name="nonseOpMsg">
> > >         <wsdl:part name="parameters" element="xsd:string"/>
> > >     </wsdl:message>
> > >
> > >     <wsdl:portType name="NonseService">
> > >         <wsdl:operation name="talkNonsense">
> > >             <wsdl:input message="tns:nonseOpMsg" />
> > >             <wsdl:output message="tns:nonseOpMsg" />
> > >         </wsdl:operation>
> > >     </wsdl:portType>
> > >
> > >     <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
> > >         <soap:binding style="document"
> > >             transport="http://schemas.xmlsoap.org/soap/http" />
> > >         <wsdl:operation name="talkNonsense">
> > >             <soap:operation soapAction=""/>
> > >             <wsdl:input>
> > >                 <soap:body use="literal" />
> > >             </wsdl:input>
> > >             <wsdl:output>
> > >                 <soap:body use="literal" />
> > >             </wsdl:output>
> > >         </wsdl:operation>
> > >     </wsdl:binding>
> > >
> > >     <wsdl:service name="NonseService">
> > >         <wsdl:port binding="tns:NonseServiceSOAP"
> > >             name="NonseServiceSOAP">
> > >             <soap:address location="
> > >  http://localhost:8080/ode/processes/nonse" />
> > >         </wsdl:port>
> > >     </wsdl:service>
> > >
> > >     <plnk:partnerLinkType name="NonseServicePartnerLinkType">
> > >         <plnk:role name="client" portType="tns:NonseService" />
> > >         <plnk:role name="nonseImplementor" portType="tns:NonseService"
> > />
> > >     </plnk:partnerLinkType>
> > >
> > >  </wsdl:definitions>
> > >
> >
> >
> >
> > --
> > Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de
> >
>
>

Re: sendsoap question

Posted by Bernd Winterstein <be...@googlemail.com>.
Okay, but how do I correctly specify the soap action?

2008/5/5 Tammo van Lessen <tv...@gmail.com>:

> Hi Bernd,
>
> for the given WSDL interface the correct doc/lit SOAP request would be
> without the <ns1:talkNonsense> element. I guess that you actually
> meant to use the tns:NonseOp type as an element type for the part?
> i.e.
>
>  <wsdl:message name="nonseOpMsg">
>       <wsdl:part name="parameters" element="tns:NonseOp"/>
>  </wsdl:message>
>
> HTH,
>  Tammo
>
> On Mon, May 5, 2008 at 11:53 AM, Bernd Winterstein
> <be...@googlemail.com> wrote:
> > Hi I have the following wsdl implemented as a BPEL process
> >  When i Send the following soap file with sendsoap i always get an error
> >  Any ideas? I thought I did the same as in the HelloWorld example.
> >
> >
> >  ?xml version="1.0" encoding="utf-8" ?>
> >  <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/
> >  ">
> >   <!-- test soap message -->
> >   <SOAP-ENV:Body>
> >
> >     <ns1:talkNonsense xmlns:ns1="http://winterstein-it.de/NonseService/
> ">
> >         <parameters xmlns="">Hello</parameters>
> >     </ns1:talkNonsense>
> >
> >   </SOAP-ENV:Body>
> >  </SOAP-ENV:Envelope>
> >
> >
> >  Caused by: org.apache.ode.axis2.OdeFault: Unexpected element in SOAP
> body:
> >  message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> .
> >     at
> >
>  org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:408)
> >     at
> >
>  org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMessageConverter.java:314)
> >     at
> >
>  org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:106)
> >     ... 20 more
> >  Caused by: java.lang.IllegalArgumentException: Unexpected element in
> SOAP
> >  body: message {http://winterstein-it.de/NonseService/}talkNonsense<http://winterstein-it.de/NonseService/%7DtalkNonsense>element {
> >  http://www.w3.org/2001/XMLSchema}string<http://www.w3.org/2001/XMLSchema%7Dstring>
> .
> >     at
> >
>  org.apache.ode.axis2.Messages.msgUnexpectedElementInSOAPBody(Messages.java:202)
> >     ... 23 more
> >
> >
> >
> >
> >  <?xml version="1.0" encoding="UTF-8"?>
> >  <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >     xmlns:tns="http://winterstein-it.de/NonseService/"
> >     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >     xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
> >     targetNamespace="http://winterstein-it.de/NonseService/"
> >     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
> >
> >
> >     <wsdl:types>
> >         <xsd:schema targetNamespace="
> http://winterstein-it.de/NonseService/
> >  ">
> >             <xsd:element name="NonseOp">
> >                 <xsd:complexType>
> >                     <xsd:sequence>
> >                         <xsd:element name="test" type="xsd:string" />
> >                     </xsd:sequence>
> >                 </xsd:complexType>
> >             </xsd:element>
> >         </xsd:schema>
> >     </wsdl:types>
> >
> >     <wsdl:message name="nonseOpMsg">
> >         <wsdl:part name="parameters" element="xsd:string"/>
> >     </wsdl:message>
> >
> >     <wsdl:portType name="NonseService">
> >         <wsdl:operation name="talkNonsense">
> >             <wsdl:input message="tns:nonseOpMsg" />
> >             <wsdl:output message="tns:nonseOpMsg" />
> >         </wsdl:operation>
> >     </wsdl:portType>
> >
> >     <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
> >         <soap:binding style="document"
> >             transport="http://schemas.xmlsoap.org/soap/http" />
> >         <wsdl:operation name="talkNonsense">
> >             <soap:operation soapAction=""/>
> >             <wsdl:input>
> >                 <soap:body use="literal" />
> >             </wsdl:input>
> >             <wsdl:output>
> >                 <soap:body use="literal" />
> >             </wsdl:output>
> >         </wsdl:operation>
> >     </wsdl:binding>
> >
> >     <wsdl:service name="NonseService">
> >         <wsdl:port binding="tns:NonseServiceSOAP"
> >             name="NonseServiceSOAP">
> >             <soap:address location="
> >  http://localhost:8080/ode/processes/nonse" />
> >         </wsdl:port>
> >     </wsdl:service>
> >
> >     <plnk:partnerLinkType name="NonseServicePartnerLinkType">
> >         <plnk:role name="client" portType="tns:NonseService" />
> >         <plnk:role name="nonseImplementor" portType="tns:NonseService"
> />
> >     </plnk:partnerLinkType>
> >
> >  </wsdl:definitions>
> >
>
>
>
> --
> Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de
>

Re: sendsoap question

Posted by Tammo van Lessen <tv...@gmail.com>.
Hi Bernd,

for the given WSDL interface the correct doc/lit SOAP request would be
without the <ns1:talkNonsense> element. I guess that you actually
meant to use the tns:NonseOp type as an element type for the part?
i.e.

 <wsdl:message name="nonseOpMsg">
       <wsdl:part name="parameters" element="tns:NonseOp"/>
 </wsdl:message>

HTH,
  Tammo

On Mon, May 5, 2008 at 11:53 AM, Bernd Winterstein
<be...@googlemail.com> wrote:
> Hi I have the following wsdl implemented as a BPEL process
>  When i Send the following soap file with sendsoap i always get an error
>  Any ideas? I thought I did the same as in the HelloWorld example.
>
>
>  ?xml version="1.0" encoding="utf-8" ?>
>  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
>  ">
>   <!-- test soap message -->
>   <SOAP-ENV:Body>
>
>     <ns1:talkNonsense xmlns:ns1="http://winterstein-it.de/NonseService/">
>         <parameters xmlns="">Hello</parameters>
>     </ns1:talkNonsense>
>
>   </SOAP-ENV:Body>
>  </SOAP-ENV:Envelope>
>
>
>  Caused by: org.apache.ode.axis2.OdeFault: Unexpected element in SOAP body:
>  message {http://winterstein-it.de/NonseService/}talkNonsense element {
>  http://www.w3.org/2001/XMLSchema}string.
>     at
>  org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:408)
>     at
>  org.apache.ode.axis2.util.SoapMessageConverter.parseSoapRequest(SoapMessageConverter.java:314)
>     at
>  org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:106)
>     ... 20 more
>  Caused by: java.lang.IllegalArgumentException: Unexpected element in SOAP
>  body: message {http://winterstein-it.de/NonseService/}talkNonsense element {
>  http://www.w3.org/2001/XMLSchema}string.
>     at
>  org.apache.ode.axis2.Messages.msgUnexpectedElementInSOAPBody(Messages.java:202)
>     ... 23 more
>
>
>
>
>  <?xml version="1.0" encoding="UTF-8"?>
>  <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://winterstein-it.de/NonseService/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NonseService"
>     targetNamespace="http://winterstein-it.de/NonseService/"
>     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
>
>
>     <wsdl:types>
>         <xsd:schema targetNamespace="http://winterstein-it.de/NonseService/
>  ">
>             <xsd:element name="NonseOp">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element name="test" type="xsd:string" />
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>         </xsd:schema>
>     </wsdl:types>
>
>     <wsdl:message name="nonseOpMsg">
>         <wsdl:part name="parameters" element="xsd:string"/>
>     </wsdl:message>
>
>     <wsdl:portType name="NonseService">
>         <wsdl:operation name="talkNonsense">
>             <wsdl:input message="tns:nonseOpMsg" />
>             <wsdl:output message="tns:nonseOpMsg" />
>         </wsdl:operation>
>     </wsdl:portType>
>
>     <wsdl:binding name="NonseServiceSOAP" type="tns:NonseService">
>         <soap:binding style="document"
>             transport="http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="talkNonsense">
>             <soap:operation soapAction=""/>
>             <wsdl:input>
>                 <soap:body use="literal" />
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal" />
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:service name="NonseService">
>         <wsdl:port binding="tns:NonseServiceSOAP"
>             name="NonseServiceSOAP">
>             <soap:address location="
>  http://localhost:8080/ode/processes/nonse" />
>         </wsdl:port>
>     </wsdl:service>
>
>     <plnk:partnerLinkType name="NonseServicePartnerLinkType">
>         <plnk:role name="client" portType="tns:NonseService" />
>         <plnk:role name="nonseImplementor" portType="tns:NonseService" />
>     </plnk:partnerLinkType>
>
>  </wsdl:definitions>
>



-- 
Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de