You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Julio Cesar Damasceno <xj...@jheat.org> on 2008/12/01 07:32:27 UTC

Wrong element in ODE response

The correct response from process is the second, but I'm receiving the
first, wsdl and bpel files are attacheds.

########## WRONG ####################
<!-- [ODEService] Response message -->
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <CalculadoraResponse xmlns="
http://www.umbrelacorp.org/calculadora.wsdl">
            <return xmlns="http://divisor.sample.mosc.umbrelacorp.org
">275</return>
        </CalculadoraResponse>
    </soapenv:Body>
</soapenv:Envelope>

########## CORRECT ####################
<!-- [ODEService] Response message -->
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <CalculadoraResponse xmlns="
http://www.umbrelacorp.org/calculadora.wsdl">
            <result>275</result>
        </CalculadoraResponse>
    </soapenv:Body>
</soapenv:Envelope>

--
Thanks.

Re: Wrong element in ODE response

Posted by Julio Cesar Damasceno <xj...@jheat.org>.
Hi Matthieu,

Works now.

The usage of insertMissingToData in last ODE (
http://people.apache.org/~mriou/ode-axis2-war-1.2-20081201.war<http://people.apache.org/%7Emriou/ode-axis2-war-1.2-20081201.war>),
doesn't work, the final solution was the "copy from literal" to initialize
the variables.

Thanks for your help.

--
Julio

On Mon, Dec 1, 2008 at 3:08 PM, Julio Cesar Damasceno <xj...@jheat.org>wrote:

> No,
>
> part1 it's a element, here is your defibition:
>
>     <types>
>         <schema attributeFormDefault="qualified"
>             elementFormDefault="qualified"
>             targetNamespace="http://www.umbrelacorp.org/calculadora.wsdl"
>             xmlns="http://www.w3.org/2001/XMLSchema">
>
>             <element name="CalculadoraRequest">
>                 <complexType>
>                     <sequence>
>                         <element name="part1" type="long" />
>                         <element name="part2" type="long" />
>                     </sequence>
>                 </complexType>
>             </element>
>         </schema>
>     </types>
>
>     <message name="CalculadoraRequestMessage">
>         <part name="payload" element="tns:CalculadoraRequest" />
>     </message>
>
> Another variable definition:
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified"
>             elementFormDefault="qualified"
>             targetNamespace="http://divisor.sample.mosc.cin.ufpe.br">
>             <xs:element name="getDivisao">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="n1" type="xs:long"
> />
>                         <xs:element minOccurs="0" name="n2" type="xs:long"
> />
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>
>     <wsdl:message name="getDivisaoRequest">
>         <wsdl:part name="parameters" element="getDivisao" />
>     </wsdl:message>
>
>
> On Mon, Dec 1, 2008 at 3:02 PM, Matthieu Riou <ma...@offthelip.org>wrote:
>
>> On Mon, Dec 1, 2008 at 10:00 AM, Julio Cesar Damasceno <xjulio@jheat.org
>> >wrote:
>>
>> > Hello,
>> >
>> > I change my assigns from:
>> >
>> >            <copy keepSrcElementName="no">
>> >                <from variable="serviceRequest" part="payload"
>> > query="/payload/@part1" />
>> >                <to variable="divisaoRequest" part="parameters"
>> > query="/div:parameters/div:n1" />
>> >            </copy>
>> >
>> > to:
>> >
>> >              <copy insertMissingToData="yes">
>> >                    <from>$serviceRequest.payload/tns:part1</from>
>> >                    <to>$divisaoRequest/parameters/div:n1</to>
>> >
>> >              </copy>
>> >
>>
>> Isn't your part1 an attribute? If so, you should use @tns:part1.
>>
>> Matthieu
>>
>>
>> >
>> > And get the error:
>> > ERROR - GeronimoLog.error(104) | Assignment Fault:
>> >                        {
>> >
>> >
>> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=73,faultExplanation=R-Value<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=73,faultExplanation=R-Value>
>> <
>> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=73,faultExplanation=R-Value
>> >
>> >                        expression "{OXPath10Expression
>> > $serviceRequest.payload/tns:part1}" did not select any nodes.
>> >
>> > The sample that you send me: "last assign" get Assignment Fault too.
>> >
>> > Thanks for your help.
>> >
>> > On Mon, Dec 1, 2008 at 12:39 PM, Matthieu Riou <matthieu@offthelip.org
>> > >wrote:
>> >
>> > > On Sun, Nov 30, 2008 at 10:32 PM, Julio Cesar Damasceno <
>> > xjulio@jheat.org
>> > > >wrote:
>> > >
>> > > > The correct response from process is the second, but I'm receiving
>> the
>> > > > first, wsdl and bpel files are attacheds.
>> > > >
>> > > > ########## WRONG ####################
>> > > > <!-- [ODEService] Response message -->
>> > > > <?xml version='1.0' encoding='utf-8'?>
>> > > > <soapenv:Envelope xmlns:soapenv="
>> > > http://schemas.xmlsoap.org/soap/envelope/
>> > > > ">
>> > > >     <soapenv:Body>
>> > > >         <CalculadoraResponse xmlns="
>> > > > http://www.umbrelacorp.org/calculadora.wsdl">
>> > > >             <return xmlns="
>> http://divisor.sample.mosc.umbrelacorp.org
>> > > > ">275</return>
>> > > >         </CalculadoraResponse>
>> > > >     </soapenv:Body>
>> > > > </soapenv:Envelope>
>> > > >
>> > > > ########## CORRECT ####################
>> > > > <!-- [ODEService] Response message -->
>> > > > <?xml version='1.0' encoding='utf-8'?>
>> > > > <soapenv:Envelope xmlns:soapenv="
>> > > http://schemas.xmlsoap.org/soap/envelope/
>> > > > ">
>> > > >     <soapenv:Body>
>> > > >         <CalculadoraResponse xmlns="
>> > > > http://www.umbrelacorp.org/calculadora.wsdl">
>> > > >             <result>275</result>
>> > > >         </CalculadoraResponse>
>> > > >     </soapenv:Body>
>> > > > </soapenv:Envelope>
>> > > >
>> > >
>> > > First you should use BPEL 2.0, that would make your assignments a
>> little
>> > > easier (specifically you shouldn't repeat the part name in the query
>> > > attribute, just use a relative query). You also need to initialize all
>> > > variables before using them (see [1]), you don't get any assignment
>> > > failures
>> > > because your elements are directly under the part but still, with the
>> > > semantic of "replace content" in BPEL assigments you don't get the
>> > expected
>> > > result without initialization.
>> > >
>> > > So your last assignment should look similar to:
>> > >
>> > > <assign name="Assign">
>> > > <copy>
>> > >   <from><literal><CalculadoraResponse xmlns="
>> > > http://www.umbrelacorp.org/calculadora.wsdl
>> > > "><result/></CalculadoraResponse></literal><from>
>> > >   <to>$serviceResponse.payload</to>
>> > > </copy>
>> > > <copy>
>> > >  <from>$divisaoResponse.parameters/@div:return</from>
>> > >  <to>$serviceResponse.payload/tns:result"/>
>> > > </copy>
>> > > </assign>
>> > >
>> > > Matthieu
>> > >
>> > >
>> > > >
>> > > > --
>> > > > Thanks.
>> > > >
>> > >
>> >
>>
>
>

Re: Wrong element in ODE response

Posted by Julio Cesar Damasceno <xj...@jheat.org>.
No,

part1 it's a element, here is your defibition:

    <types>
        <schema attributeFormDefault="qualified"
            elementFormDefault="qualified"
            targetNamespace="http://www.umbrelacorp.org/calculadora.wsdl"
            xmlns="http://www.w3.org/2001/XMLSchema">

            <element name="CalculadoraRequest">
                <complexType>
                    <sequence>
                        <element name="part1" type="long" />
                        <element name="part2" type="long" />
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>

    <message name="CalculadoraRequestMessage">
        <part name="payload" element="tns:CalculadoraRequest" />
    </message>

Another variable definition:
    <wsdl:types>
        <xs:schema attributeFormDefault="qualified"
            elementFormDefault="qualified"
            targetNamespace="http://divisor.sample.mosc.cin.ufpe.br">
            <xs:element name="getDivisao">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="n1" type="xs:long"
/>
                        <xs:element minOccurs="0" name="n2" type="xs:long"
/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>

    <wsdl:message name="getDivisaoRequest">
        <wsdl:part name="parameters" element="getDivisao" />
    </wsdl:message>

On Mon, Dec 1, 2008 at 3:02 PM, Matthieu Riou <ma...@offthelip.org>wrote:

> On Mon, Dec 1, 2008 at 10:00 AM, Julio Cesar Damasceno <xjulio@jheat.org
> >wrote:
>
> > Hello,
> >
> > I change my assigns from:
> >
> >            <copy keepSrcElementName="no">
> >                <from variable="serviceRequest" part="payload"
> > query="/payload/@part1" />
> >                <to variable="divisaoRequest" part="parameters"
> > query="/div:parameters/div:n1" />
> >            </copy>
> >
> > to:
> >
> >              <copy insertMissingToData="yes">
> >                    <from>$serviceRequest.payload/tns:part1</from>
> >                    <to>$divisaoRequest/parameters/div:n1</to>
> >
> >              </copy>
> >
>
> Isn't your part1 an attribute? If so, you should use @tns:part1.
>
> Matthieu
>
>
> >
> > And get the error:
> > ERROR - GeronimoLog.error(104) | Assignment Fault:
> >                        {
> >
> >
> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=73,faultExplanation=R-Value<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=73,faultExplanation=R-Value>
> <
> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=73,faultExplanation=R-Value
> >
> >                        expression "{OXPath10Expression
> > $serviceRequest.payload/tns:part1}" did not select any nodes.
> >
> > The sample that you send me: "last assign" get Assignment Fault too.
> >
> > Thanks for your help.
> >
> > On Mon, Dec 1, 2008 at 12:39 PM, Matthieu Riou <matthieu@offthelip.org
> > >wrote:
> >
> > > On Sun, Nov 30, 2008 at 10:32 PM, Julio Cesar Damasceno <
> > xjulio@jheat.org
> > > >wrote:
> > >
> > > > The correct response from process is the second, but I'm receiving
> the
> > > > first, wsdl and bpel files are attacheds.
> > > >
> > > > ########## WRONG ####################
> > > > <!-- [ODEService] Response message -->
> > > > <?xml version='1.0' encoding='utf-8'?>
> > > > <soapenv:Envelope xmlns:soapenv="
> > > http://schemas.xmlsoap.org/soap/envelope/
> > > > ">
> > > >     <soapenv:Body>
> > > >         <CalculadoraResponse xmlns="
> > > > http://www.umbrelacorp.org/calculadora.wsdl">
> > > >             <return xmlns="
> http://divisor.sample.mosc.umbrelacorp.org
> > > > ">275</return>
> > > >         </CalculadoraResponse>
> > > >     </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > ########## CORRECT ####################
> > > > <!-- [ODEService] Response message -->
> > > > <?xml version='1.0' encoding='utf-8'?>
> > > > <soapenv:Envelope xmlns:soapenv="
> > > http://schemas.xmlsoap.org/soap/envelope/
> > > > ">
> > > >     <soapenv:Body>
> > > >         <CalculadoraResponse xmlns="
> > > > http://www.umbrelacorp.org/calculadora.wsdl">
> > > >             <result>275</result>
> > > >         </CalculadoraResponse>
> > > >     </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > >
> > > First you should use BPEL 2.0, that would make your assignments a
> little
> > > easier (specifically you shouldn't repeat the part name in the query
> > > attribute, just use a relative query). You also need to initialize all
> > > variables before using them (see [1]), you don't get any assignment
> > > failures
> > > because your elements are directly under the part but still, with the
> > > semantic of "replace content" in BPEL assigments you don't get the
> > expected
> > > result without initialization.
> > >
> > > So your last assignment should look similar to:
> > >
> > > <assign name="Assign">
> > > <copy>
> > >   <from><literal><CalculadoraResponse xmlns="
> > > http://www.umbrelacorp.org/calculadora.wsdl
> > > "><result/></CalculadoraResponse></literal><from>
> > >   <to>$serviceResponse.payload</to>
> > > </copy>
> > > <copy>
> > >  <from>$divisaoResponse.parameters/@div:return</from>
> > >  <to>$serviceResponse.payload/tns:result"/>
> > > </copy>
> > > </assign>
> > >
> > > Matthieu
> > >
> > >
> > > >
> > > > --
> > > > Thanks.
> > > >
> > >
> >
>

Re: Wrong element in ODE response

Posted by Matthieu Riou <ma...@offthelip.org>.
On Mon, Dec 1, 2008 at 10:00 AM, Julio Cesar Damasceno <xj...@jheat.org>wrote:

> Hello,
>
> I change my assigns from:
>
>            <copy keepSrcElementName="no">
>                <from variable="serviceRequest" part="payload"
> query="/payload/@part1" />
>                <to variable="divisaoRequest" part="parameters"
> query="/div:parameters/div:n1" />
>            </copy>
>
> to:
>
>              <copy insertMissingToData="yes">
>                    <from>$serviceRequest.payload/tns:part1</from>
>                    <to>$divisaoRequest/parameters/div:n1</to>
>
>              </copy>
>

Isn't your part1 an attribute? If so, you should use @tns:part1.

Matthieu


>
> And get the error:
> ERROR - GeronimoLog.error(104) | Assignment Fault:
>                        {
>
> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=73,faultExplanation=R-Value<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=73,faultExplanation=R-Value>
>                        expression "{OXPath10Expression
> $serviceRequest.payload/tns:part1}" did not select any nodes.
>
> The sample that you send me: "last assign" get Assignment Fault too.
>
> Thanks for your help.
>
> On Mon, Dec 1, 2008 at 12:39 PM, Matthieu Riou <matthieu@offthelip.org
> >wrote:
>
> > On Sun, Nov 30, 2008 at 10:32 PM, Julio Cesar Damasceno <
> xjulio@jheat.org
> > >wrote:
> >
> > > The correct response from process is the second, but I'm receiving the
> > > first, wsdl and bpel files are attacheds.
> > >
> > > ########## WRONG ####################
> > > <!-- [ODEService] Response message -->
> > > <?xml version='1.0' encoding='utf-8'?>
> > > <soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/
> > > ">
> > >     <soapenv:Body>
> > >         <CalculadoraResponse xmlns="
> > > http://www.umbrelacorp.org/calculadora.wsdl">
> > >             <return xmlns="http://divisor.sample.mosc.umbrelacorp.org
> > > ">275</return>
> > >         </CalculadoraResponse>
> > >     </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > ########## CORRECT ####################
> > > <!-- [ODEService] Response message -->
> > > <?xml version='1.0' encoding='utf-8'?>
> > > <soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/
> > > ">
> > >     <soapenv:Body>
> > >         <CalculadoraResponse xmlns="
> > > http://www.umbrelacorp.org/calculadora.wsdl">
> > >             <result>275</result>
> > >         </CalculadoraResponse>
> > >     </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> >
> > First you should use BPEL 2.0, that would make your assignments a little
> > easier (specifically you shouldn't repeat the part name in the query
> > attribute, just use a relative query). You also need to initialize all
> > variables before using them (see [1]), you don't get any assignment
> > failures
> > because your elements are directly under the part but still, with the
> > semantic of "replace content" in BPEL assigments you don't get the
> expected
> > result without initialization.
> >
> > So your last assignment should look similar to:
> >
> > <assign name="Assign">
> > <copy>
> >   <from><literal><CalculadoraResponse xmlns="
> > http://www.umbrelacorp.org/calculadora.wsdl
> > "><result/></CalculadoraResponse></literal><from>
> >   <to>$serviceResponse.payload</to>
> > </copy>
> > <copy>
> >  <from>$divisaoResponse.parameters/@div:return</from>
> >  <to>$serviceResponse.payload/tns:result"/>
> > </copy>
> > </assign>
> >
> > Matthieu
> >
> >
> > >
> > > --
> > > Thanks.
> > >
> >
>

Re: Wrong element in ODE response

Posted by Julio Cesar Damasceno <xj...@jheat.org>.
Hello,

I change my assigns from:

            <copy keepSrcElementName="no">
                <from variable="serviceRequest" part="payload"
query="/payload/@part1" />
                <to variable="divisaoRequest" part="parameters"
query="/div:parameters/div:n1" />
            </copy>

to:

              <copy insertMissingToData="yes">
                    <from>$serviceRequest.payload/tns:part1</from>
                    <to>$divisaoRequest/parameters/div:n1</to>

              </copy>

And get the error:
ERROR - GeronimoLog.error(104) | Assignment Fault:
                        {
http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=73,faultExplanation=R-Value
                        expression "{OXPath10Expression
$serviceRequest.payload/tns:part1}" did not select any nodes.

The sample that you send me: "last assign" get Assignment Fault too.

Thanks for your help.

On Mon, Dec 1, 2008 at 12:39 PM, Matthieu Riou <ma...@offthelip.org>wrote:

> On Sun, Nov 30, 2008 at 10:32 PM, Julio Cesar Damasceno <xjulio@jheat.org
> >wrote:
>
> > The correct response from process is the second, but I'm receiving the
> > first, wsdl and bpel files are attacheds.
> >
> > ########## WRONG ####################
> > <!-- [ODEService] Response message -->
> > <?xml version='1.0' encoding='utf-8'?>
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/
> > ">
> >     <soapenv:Body>
> >         <CalculadoraResponse xmlns="
> > http://www.umbrelacorp.org/calculadora.wsdl">
> >             <return xmlns="http://divisor.sample.mosc.umbrelacorp.org
> > ">275</return>
> >         </CalculadoraResponse>
> >     </soapenv:Body>
> > </soapenv:Envelope>
> >
> > ########## CORRECT ####################
> > <!-- [ODEService] Response message -->
> > <?xml version='1.0' encoding='utf-8'?>
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/
> > ">
> >     <soapenv:Body>
> >         <CalculadoraResponse xmlns="
> > http://www.umbrelacorp.org/calculadora.wsdl">
> >             <result>275</result>
> >         </CalculadoraResponse>
> >     </soapenv:Body>
> > </soapenv:Envelope>
> >
>
> First you should use BPEL 2.0, that would make your assignments a little
> easier (specifically you shouldn't repeat the part name in the query
> attribute, just use a relative query). You also need to initialize all
> variables before using them (see [1]), you don't get any assignment
> failures
> because your elements are directly under the part but still, with the
> semantic of "replace content" in BPEL assigments you don't get the expected
> result without initialization.
>
> So your last assignment should look similar to:
>
> <assign name="Assign">
> <copy>
>   <from><literal><CalculadoraResponse xmlns="
> http://www.umbrelacorp.org/calculadora.wsdl
> "><result/></CalculadoraResponse></literal><from>
>   <to>$serviceResponse.payload</to>
> </copy>
> <copy>
>  <from>$divisaoResponse.parameters/@div:return</from>
>  <to>$serviceResponse.payload/tns:result"/>
> </copy>
> </assign>
>
> Matthieu
>
>
> >
> > --
> > Thanks.
> >
>

Re: Wrong element in ODE response

Posted by Matthieu Riou <ma...@offthelip.org>.
On Sun, Nov 30, 2008 at 10:32 PM, Julio Cesar Damasceno <xj...@jheat.org>wrote:

> The correct response from process is the second, but I'm receiving the
> first, wsdl and bpel files are attacheds.
>
> ########## WRONG ####################
> <!-- [ODEService] Response message -->
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>     <soapenv:Body>
>         <CalculadoraResponse xmlns="
> http://www.umbrelacorp.org/calculadora.wsdl">
>             <return xmlns="http://divisor.sample.mosc.umbrelacorp.org
> ">275</return>
>         </CalculadoraResponse>
>     </soapenv:Body>
> </soapenv:Envelope>
>
> ########## CORRECT ####################
> <!-- [ODEService] Response message -->
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>     <soapenv:Body>
>         <CalculadoraResponse xmlns="
> http://www.umbrelacorp.org/calculadora.wsdl">
>             <result>275</result>
>         </CalculadoraResponse>
>     </soapenv:Body>
> </soapenv:Envelope>
>

First you should use BPEL 2.0, that would make your assignments a little
easier (specifically you shouldn't repeat the part name in the query
attribute, just use a relative query). You also need to initialize all
variables before using them (see [1]), you don't get any assignment failures
because your elements are directly under the part but still, with the
semantic of "replace content" in BPEL assigments you don't get the expected
result without initialization.

So your last assignment should look similar to:

<assign name="Assign">
<copy>
   <from><literal><CalculadoraResponse xmlns="
http://www.umbrelacorp.org/calculadora.wsdl
"><result/></CalculadoraResponse></literal><from>
   <to>$serviceResponse.payload</to>
</copy>
<copy>
  <from>$divisaoResponse.parameters/@div:return</from>
  <to>$serviceResponse.payload/tns:result"/>
</copy>
</assign>

Matthieu


>
> --
> Thanks.
>