Figured out the problem. After I initialize the part and then assign values within variable. It is working :).
Now I ll try to do some real stuff. Thanks Prasanna Rajaperumal -----Original Message----- From: Prasanna Rajaperumal [mailto:[EMAIL PROTECTED] Sent: Saturday, August 18, 2007 12:36 PM To: [email protected] Subject: RE: Hi, Problem with copy / assign Thanks again. But it just won't work :(. I am using net beans Enterprise to create the BPEL Files. As for the last trouble to you, I am just pasting the files. I have assigned the literal <newElement/> to the variable part and still I get ERROR - GeronimoLog.error(104) | Assignment Fault: {http://schemas.xmlsoap.org/ws/2004/03/business-process/}selectionFailure,li neNo=26 It would be of great help if anyne can look at it and have me started on running these simple bpel files. Thanks Prasanna Rajaperumal BPEL File: ==================================================== <?xml version="1.0" encoding="UTF-8"?> <process name="PhoneBookBPEL" targetNamespace="http://soamatrix.com/bpel/PhoneBookBPEL" xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:wsdlNS="http://soamatrix.com/bpel/PhoneBookBPEL"> <import namespace="http://soamatrix.com/bpel/PhoneBookBPEL" location="PhoneBookBPEL.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <partnerLinks> <partnerLink name="bpelPartnerLink" partnerLinkType="wsdlNS:PhoneBookBPELPartner" myRole="PhoneBookBPELPortTypeRole"/> </partnerLinks> <variables> <variable name="PhoneBookBPELOperationOut1" messageType="wsdlNS:PhoneBookBPELOperationReply"/> <variable name="PhoneBookBPELOperationIn1" messageType="wsdlNS:PhoneBookBPELOperationRequest"/> </variables> <sequence> <receive name="Receive1" createInstance="yes" partnerLink="bpelPartnerLink" operation="PhoneBookBPELOperation" portType="wsdlNS:PhoneBookBPELPortType" variable="PhoneBookBPELOperationIn1"/> <assign name="Assign1"> <copy> <from><literal><newElement/></literal></from> <to>$PhoneBookBPELOperationOut1.part1</to> </copy> </assign> <assign name="Assign2"> <copy> <from> <literal>Done</literal> </from> <to>$PhoneBookBPELOperationOut1.part1/newElement</to> </copy> </assign> <reply name="Reply1" partnerLink="bpelPartnerLink" operation="PhoneBookBPELOperation" portType="wsdlNS:PhoneBookBPELPortType" variable="PhoneBookBPELOperationOut1"/> </sequence> </process> ==================================================== I am using doc wrapped literal binding. I am sending the following SOAP Message. SOAP Message: ==================================================== <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://soamatrix.com/bpel/PhoneBookBPEL"> <soapenv:Header/> <soapenv:Body> <exam:inputElement1> <exam:inputElement>prasanna</exam:inputElement> </exam:inputElement1> </soapenv:Body> </soapenv:Envelope> ==================================================== WSDL File: ==================================================== <?xml version="1.0" encoding="UTF-8"?> <definitions targetNamespace="http://soamatrix.com/bpel/PhoneBookBPEL" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://soamatrix.com/bpel/PhoneBookBPEL" name="PhoneBookBPEL" xmlns:plink="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" xmlns:ns="http://soamatrix.com/bpel/PhoneBookBPEL"> <types> <xsd:schema targetNamespace="http://soamatrix.com/bpel/PhoneBookBPEL" xmlns:tns1="http://soamatrix.com/bpel/PhoneBookBPEL"> <xsd:complexType name="inputComplexType"> <xsd:sequence> <xsd:element name="inputElement" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="inputElement1" type="tns1:inputComplexType"></xsd:element> <xsd:complexType name="outputComplexType"> <xsd:sequence> <xsd:element name="newElement" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="outputElement2" type="tns1:outputComplexType"></xsd:element> </xsd:schema> </types> <message name="PhoneBookBPELOperationRequest"> <part name="part1" element="ns:inputElement1"/> </message> <message name="PhoneBookBPELOperationReply"> <part name="part1" element="ns:outputElement2"/> </message> <portType name="PhoneBookBPELPortType"> <operation name="PhoneBookBPELOperation"> <input name="input1" message="tns:PhoneBookBPELOperationRequest"/> <output name="output1" message="tns:PhoneBookBPELOperationReply"/> </operation> </portType> <binding name="PhoneBookBPELBinding" type="tns:PhoneBookBPELPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="PhoneBookBPELOperation"> <soap:operation/> <input name="input1"> <soap:body use="literal"/> </input> <output name="output1"> <soap:body use="literal"/> </output> </operation> </binding> <service name="PhoneBookBPELService"> <port name="PhoneBookBPELPort" binding="tns:PhoneBookBPELBinding"> <soap:address location="http://localhost:8081/ode/processes/PhoneBookBPELService"/> </port> </service> <plink:partnerLinkType name="PhoneBookBPELPartner"> <plink:role name="PhoneBookBPELPortTypeRole" portType="tns:PhoneBookBPELPortType"/> </plink:partnerLinkType> </definitions> ======================================================= -----Original Message----- From: Alex Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 11:37 PM To: [email protected] Subject: Re: Hi, Problem with copy / assign On 8/17/07, Prasanna Rajaperumal <[EMAIL PROTECTED]> wrote: > > I know I am doing something wrong in the basics. Can you please hint me at > it. > > <assign name="Assign1"> > <copy> > <from> > <literal>done</literal> > </from> > <to>$PhoneBookBPELOperationOut1.part1/newElement</to> > </copy> > </assign> > > I am getting this error. > > 21:46:00,265 DEBUG [ODEService] Fault response message: > {http://schemas.xmlsoap.org/ws/2004/03/business-process/}selectionFailure > ERROR - GeronimoLog.error(108) | Error processing response for MEX > {MyRoleMex#hqejbhcnphr2ikl18e88n0 [Client hqejbhcnphr2ikl18e88m > x] calling { > http://soamatrix.com/bpel/PhoneBookBPEL}PhoneBookBPELService.PhoneBookBPELO > peration(...)} org.apache.axis2.AxisFault: > {http://schemas.xmlsoap.org/ws/2004/03/business-process/}selectionFailureNo > results for expression: { OXPath10Expression > $PhoneBookBPELOperationOut1.part1/newElement} To assign data into "newElement", you must first create it, like this: <assign name="Assign1"> <copy> <from> <literal><newElement/></literal> </from> <to>$PhoneBookBPELOperationOut1.part1</to> </copy> </assign> or combine both assignments in a single <copy>: <assign name="Assign1"> <copy> <from> <literal> <newElement>done</newElement> </literal> </from> <to>$PhoneBookBPELOperationOut1.part1</to> </copy> </assign> cheers, alex
