ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammo van Lessen <tvanles...@gmail.com>
Subject Re: Assignment Fault
Date Fri, 04 Jan 2008 21:44:00 GMT
Hi JB,

lazily quoting the FAQ:

Q. My process fails with a selectionFailure; What can I do?
A. BPEL expects a single element to be selected when evaluating <to> and 
<from> expressions, and a selectionFailure fault is thrown if zero or 
more than one element are selected.

If you get zero element, double-check your namespace prefix and 
bindings. Also, remember that you must initialize your variables (most 
often with <literal>'s) before assigning into them, unless your are 
reassigning the whole variable (e.g. directly into $variable, or 
$variable.part). To debug assignments, you can set the "org.apache.ode" 
logging category to DEBUG in order to see the content of variables as 
the process executes.
-------

In your code snippet the problem is apparently due to an uninitialized 
variable. The tns:result element must exist before you can assign 
something to it. Try to add something like this before your copy statement:

<bpws:copy>
     <bpws:from>
       <bpws:literal><tns:result/></bpws:literal>
     </bpws:from>
     <bpws:to part="payload" variable="output"/>
</bpws:copy>

Best regards,
   Tammo

JB wrote:
> Hello,
> I receive the following error message while running the helloWorld sample:
> Assignment Fault: {http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=21,faultExplanation=No
results for expression: {OXPath10Expression /tns:result}
> 
> My BPEL file:
> <?xml version="1.0" encoding="UTF-8"?>
> <bpws:process exitOnStandardFault="yes" name="HelloWorld"
>     suppressJoinFailure="yes"
>     targetNamespace="http://eclipse.org/bpel/sample"
> 
>     xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://eclipse.org/bpel/sample">
>     
>         location="HelloWorld.wsdl" namespace="http://eclipse.org/bpel/sample"/>
>     <bpws:partnerLinks>
>         <bpws:partnerLink myRole="HelloWorldProvider" name="client"
>             partnerLinkType="tns:HelloWorld" partnerRole="HelloWorldRequester"/>
>     </bpws:partnerLinks>
>     <bpws:variables>
>         <bpws:variable messageType="tns:HelloWorldRequestMessage" name="input"/>
>        
>  <bpws:variable messageType="tns:HelloWorldResponseMessage" name="output"/>
>    
>  </bpws:variables>
>     <bpws:sequence name="main">
>         <bpws:receive createInstance="yes" name="receiveInput"
>             operation="initiate" partnerLink="client"
>             portType="tns:HelloWorld" variable="input"/>
>         <bpws:assign name="Assign" validate="no">
>             <bpws:copy>
>                 <bpws:from><![CDATA[concat('Hello, ', $input.payload/tns:input)]]></bpws:from>
>                 <bpws:to part="payload" variable="output">
>                     <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:result]]></bpws:query>
>                 </bpws:to>
>             </bpws:copy>
>         </bpws:assign>
>         <bpws:invoke inputVariable="output" name="callbackClient"
>            
>  operation="onResult" partnerLink="client" portType="tns:HelloWorldCallback"/>
>    
>  </bpws:sequence>
> </bpws:process>
> 
> My wsdl file:
> <?xml version="1.0"?>
> <definitions name="HelloWorld"
>         targetNamespace="http://eclipse.org/bpel/sample"
>         xmlns:tns="http://eclipse.org/bpel/sample"
>         xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>         xmlns="http://schemas.xmlsoap.org/wsdl/"
>         >
> 
> <!--
> 
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      TYPE DEFINITION - List of services participating in this BPEL process 
>      The default output of the BPEL designer uses strings as input and 
>      output to the BPEL Process. But you can define or import any XML 
>      Schema type and us them as part of the message types.
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->   

>     <types>  
>         <schema attributeFormDefault="unqualified" 
>                 elementFormDefault="qualified" 
>                 targetNamespace="http://eclipse.org/bpel/sample" 
>                 xmlns="http://www.w3.org/2001/XMLSchema"
>                 >
>                 
>             <element
>  name="HelloWorldRequest">
>     
>             <complexType>
>                     <sequence>
>                         <element name="input" type="string" />
>                     </sequence>
>                 </complexType>
>             </element>
>                   
>             <element name="HelloWorldResponse">
>                 <complexType>
>                     <sequence>
>                         <element name="result" type="string"/>
>                     </sequence>
>                 </complexType>
>             </element>
>             
>         </schema>
>     </types>
>   
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      MESSAGE TYPE DEFINITION - Definition of the message types used as 
>      part of the port type defintions
>     
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
>    
>  <message name="HelloWorldRequestMessage">
>         <part name="payload" element="tns:HelloWorldRequest"/>
>     </message>
>     
>     <message name="HelloWorldResponseMessage">
>         <part name="payload" element="tns:HelloWorldResponse"/>
>     </message>
> 
> 
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      PORT TYPE DEFINITION - A port type groups a set of operations into
>      a logical service unit.
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- portType implemented by the HelloWorld BPEL process -->
>     <portType name="HelloWorld">
>         <operation name="initiate">
>             <input message="tns:HelloWorldRequestMessage"/>
>         </operation>
>    
>  </portType>
> 
>     <!-- portType implemented by the requester of HelloWorld BPEL process 
>         
>  for asynchronous callback purposes
>          -->
>     <portType name="HelloWorldCallback">
>         <operation name="onResult">
>             <input message="tns:HelloWorldResponseMessage"/>
>         </operation>
>     </portType>
>     
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      BINDING AND SERVICE DEFINITION
>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> 	<binding name="HelloSoapBinding" type="tns:HelloWorld">
> 		 http://schemas.xmlsoap.org/soap/http"/>
> 		<operation name="initiate">
> 			<soap:operation soapAction="" style="document"/>
> 			<input>
> 				 http://eclipse.org/bpel/sample"/>
> 			</input>
> 			<output>
> 			 http://eclipse.org/bpel/sample"/>
> 			</output>
> 		</operation>
> 	</binding>
> 
> 	<service name="HelloService">
> 		<port name="HelloPort" binding="tns:HelloSoapBinding">
> 			 http://localhost:8080/ode/processes/helloWorld"/>
> 		</port>
> 	</service>
> 
> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      PARTNER LINK TYPE DEFINITION
>          the HelloWorld partnerLinkType binds the provider and
>          requester portType into an asynchronous conversation.
>     
> 
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
>     <plnk:partnerLinkType name="HelloWorld">
>         <plnk:role name="HelloWorldProvider" portType="tns:HelloWorld"/>
>         <plnk:role name="HelloWorldRequester" portType="tns:HelloWorldCallback"/>
>     </plnk:partnerLinkType>   
> </definitions>
> 
> deploy.xml
> 
> 	xmlns:pns="http://eclipse.org/bpel/sample" 
> 	xmlns:wns="http://eclipse.org/bpel/sample">
> 	
> 	<process name="pns:HelloWorld">
> 		<active>true</active>
> 		<provide partnerLink="client">
> 			<service
>  name="wns:HelloService" port="HelloPort"/>
> 		</provide>
> 		<invoke partnerLink="client">
> 			<service
>  name="wns:HelloService" port="HelloPort"/>
> 		</invoke>
> 	</process>
> </deploy>
> 
> Thanks for help,
> J.B.
> 
> 
> 
> 
> 
> 
> 
> 
> 
>       Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: 
> http://de.yahoo.com/set


Mime
View raw message