Hi Monika, The standard WS-BPEL assignment only supports copying content from a single node to a single node, both sides having to exist (in your case the sub-expression submitResponse[1] fails because it doesn't exist). To work with lists you either have to use the doXslTransform standard function or one of the XPath extensions that we provide with ODE:
http://ode.apache.org/xpath-extensions.html Thanks, Matthieu On Mon, Dec 29, 2008 at 8:15 AM, Adamczyk, Monika < [email protected]> wrote: > Can someone tell me or point to an example how initialize in bpel process > a variable that is of mesageType, with the part being an array. > One of my assignment statements needs to copy another variable to the first > position of that array, but because this variable is not initialized, I get > an Xpath exception: > Unmapped Fault : { > http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure>: > No results for expression: {OXPath10Expression > $planOutputs.body/plan:submitResponse[1]} > > I am fairly confident that the Xpath expression for the assignment is > correct, because another assignment from a variable which is also > messageType with its part being array ( see planInputs below) to an > individual variable works. The difference between these two variables is > that planInputs gets initialized automatically because it is an incoming > argument of process wsdl method. > > Here are relevant pieces of my bpel process: > > .... > <variables> > ... <variable name="planInputs" messageType="plan:SubmitRequests" > /> <variable name="planOutputs" messageType="plan:SubmitResponses" /> > ... </variables> > <receive> > ...... > <assign name="AssignPlanInputSubmitRequestToResourceManager"> > <copy> > <from>$planInputs.body/plan:submitRequest[1]</from> > <to variable="SubmitRequest" part="Submit"/> </copy> > </assign> > <invoke> - invokes external web service which returns SubmitResponse which > has to be copied to planOutputs > > ...... > <assign name="AssignSubmitResponseToPlanOutput"> <copy> > <from variable="SubmitResponse" part="SubmitRequestResponse"/> > <to>$planOutputs.body/plan:submitResponse[1]</to> </copy> > </assign> > <reply> > > Thanks > > Monika > > -- > Monika Adamczyk > MIT Lincoln Laboratory > 244 Wood Street > Lexington MA 02420 > (781) 981-3047 > > > >
