I am using Apache ODE to write some simple BPEL's to connect 2 web services. One of the WSDL files of my two services contains this complex type:
<types>
<t:schema targetNamespace="http://ws.panos.com/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<t:complexType name="myObject">
<t:sequence>
<t:element minOccurs="0" name="str" type="t:string" />
</t:sequence>
</t:complexType>
</t:schema>
How do I make a copy from a service return message (which is just a xsd:string) to the input of a message (inside "str" of type "myObject"?
I have tried to do this, but doesnt seem to work:
<assign name="assign_2">
<copy>
<from variable="wsA_output" part="return"/>
<to variable="wsC_input" part="arg0" query="/arg0/str"/>
</copy>
I always get a null string transfered. Help much appreciated.
The to-spec
<to variable="..." part="..." query="..."/>is not valid in BPEL 1.1 nor BPEL 2.0. The correct equivalent expression is:<to>$wsC_input.arg0/arg0/str</to>or<to variable="wsC_input" part="arg0"><query>/arg0/str</query></to>. Please make also sure that you initialize the variable before assigning values to nested structures.