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: R: Re: fault selection error (variable intialization problem)
Date Thu, 17 Sep 2009 15:04:04 GMT
That heavily depends on your datatypes. Just create an XML sample for
your datatype and copy it into the variable or a part. Once the
structure is available in your variable, you can access and replace the
values of these elements using xpath.

Try adding this copy statement before yours:

<copy>
   <from><literal><return/></literal></from>
   <to>$Out.parameters</to>
</copy>

HTH,
  Tammo



ytrewq2002@libero.it wrote:
> What do you mean about  "copy a structural skeleton into the variable"
> can you 
> suggest me a link about or an example...
> thank you.
> 
> 
> 
>> ----Messaggio 
> originale----
>> Da: tvanlessen@gmail.com
>> Data: 17/09/2009 16.42
>> A: <user@ode.
> apache.org>
>> Ogg: Re: fault selection error (variable intialization problem)
>>
> 
>> Hi,
>>
>> the response variable must be initialized before a specific xpath can 
> be
>> accessed. Please have a look at our FAQ, too.
>>
>> Add an assign activity and 
> copy a structural skeleton into the variable
>> so that the xpath expression can 
> be resolved.
>> HTH,
>>  Tammo
>>
>> ytrewq2002@libero.it wrote:
>>> hi to all,
>>>
> 
>>> i have a problem.. i try to exec a bpel process into Ode. I deploy 
>>>
> it into ode then i invoke it sending the soap with the soap utility into bin 
> 
>>> directory of ode distribution, or with a jax-ws client. I dvelop using 
> netbeans 
>>> than i copy bpel, wsdl, xsd and deploy.xml files into process 
> directory. The 
>>> bpel is a receive and reply: receive a string and reply with 
> the same.
>>> During 
>>> the replay i have to copy from input variable of 
> receive statment to output var 
>>> of reply (because variable are complextype 
> [SOAP message type] i copy the 
>>> simple elements
>>> of them with XPATH) but i 
> get fault selection problem.
>>> My 
>>> error fault is (i set the debug 
> level in log4j properties
>>> #line added
>>> log4j.
>>> category.org.apache.
> ode=DEBUG):
>>> 15:49:48,318 INFO  [ASSIGN] Assignment Fault: 
>>> {http:
> //docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,
> lineNo=22,faultExplanation=No results for expression: {OXPath10Expression $Out.
> 
>>> parameters/return}
>>> 15:49:48,350 DEBUG [SCOPE] ({OScope '__PROCESS_SCOPE:
> 
>>> BpelHello' id=3},TerminationChannel#1,ParentScopeChannel#2): has a fault 
>>>
> handler for {http://docs.oasis-open.org/wsbpel/2.0/process/executable}
> selectionFailure: {OCatch faultName=null, faultVariable=null}
>>> 15:49:48,381 
> 
>>> DEBUG [SCOPE] ({OCatch faultName=null, faultVariable=null},
> TerminationChannel:
>>> FH#14,ParentScopeChannel:FH#15): has no fault handler 
> for {http://docs.oasis-
>>> open.org/wsbpel/2.0/process/executable}
> selectionFailure; scope will propagate 
>>> FAULT!
>>> 15:49:48,459 DEBUG 
> [BpelProcess] ProcessImpl completed with fault '{http:
>>> //docs.oasis-open.
> org/wsbpel/2.0/process/executable}selectionFailure'
>>> 15:49:
>>> 48,459 DEBUG 
> [MessageExchangeContextImpl] Processing an async reply from 
>>> service {http:
> //hello.netbureau.it/}HellonameService
>>>
>>> I listed above the bpel 
>>>
> process, wsdl, xsd and deploy.xml  files:
>>> -BpelHello.bpel-
>>>
>>>
> <process
>>>     name="
>>> BpelHello"
>>>     targetNamespace="http://enterprise.
> netbeans.
>>> org/bpel/BpelHelloWs/BpelHello"
>>>     xmlns="http://docs.oasis-
> open.org/wsbpel/2.
>>> 0/process/executable" 
>>>     xmlns:xsd="http://www.w3.
> org/2001/XMLSchema"
>>>     
>>> xmlns:sxt="http://www.sun.com/wsbpel/2.
>>>
> 0/process/executable/SUNExtension/Trace" 
>>>     xmlns:sxed="http://www.sun.
>>>
> com/wsbpel/2.0/process/executable/SUNExtension/Editor"
>>>     xmlns:tns="http:
> 
>>> //enterprise.netbeans.org/bpel/BpelHelloWs/BpelHello" xmlns:ns0="http:
> //hello.
>>> netbureau.it/"
>>>     xmlns:myxsd="Helloname.xsd_1.xsd">
>>>     
> <import namespace="
>>> http://hello.netbureau.it/" location="Helloname.wsdl" 
> importType="http:
>>> //schemas.xmlsoap.org/wsdl/"/>
>>>     <partnerLinks>
> 
>>>         <partnerLink name="
>>> HelloWs" xmlns:tns="http://hello.netbureau.
> it/" partnerLinkType="tns:Helloname" 
>>> myRole="WriteHelloMsgRole"/>
>>>     
> </partnerLinks>
>>>     <variables>
>>>         
>>> <variable name="Out" 
> messageType="ns0:helloResponse"/>
>>>         <variable name="
>>> HelloIn" xmlns:
> tns="http://hello.netbureau.it/" messageType="tns:hello"/>
>>>     
>>>
> </variables>
>>>     <sequence>
>>>         <receive name="ReceiveHelloCmd" 
>>>
> createInstance="yes" partnerLink="HelloWs" operation="hello" xmlns:tns="http:
> 
>>> //hello.netbureau.it/" portType="tns:Helloname" variable="HelloIn"/>
> 
>>>         
>>> <assign name="Assign1">
>>>             <copy 
> insertMissingToData="yes">
>>>                 <from>$HelloIn.
> parameters/name</from>
>>>                 <to>$Out.
>>> parameters/return</to>
> 
>>>             </copy>
>>>         </assign>
>>>         <reply 
>>> name="
> ReplyToHelloCmd" partnerLink="HelloWs" operation="hello" portType="ns0:
> Helloname" variable="Out"/>
>>>     </sequence>
>>> </process>
>>>
>>>
>>> -DEPLOY.
> xml -
>>> <deploy 
>>> xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
> 
>>> 	xmlns:pns="http:
>>> //enterprise.netbeans.org/bpel/BpelHelloWs/BpelHello"
> 
>>> 	xmlns:wns="http://hello.
>>> netbureau.it/">
>>>
>>>
>>> 	<process name="pns:
> BpelHello">
>>> 		<active>true</active>
>>> 		
>>> <provide partnerLink="HelloWs">
> 
>>> 			<service name="wns:HellonameService" port="
>>> HellonamePort"/>
>>> 		
> </provide>
>>> 	</process>
>>> </deploy>
>>>
>>>
>>> -Helloname.wsdl-
>>>
>>> <?
> xml 
>>> version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http:
> //jax-ws.
>>> dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><!-- 
> Generated by JAX-WS 
>>> RI at http://jax-ws.dev.java.net. RI's version is JAX-
> WS RI 2.1.4-b01-. --
>>>> <definitions xmlns:soap="http://schemas.xmlsoap.
> org/wsdl/soap/" xmlns:tns="
>>> http://hello.netbureau.it/" xmlns:xsd="http:
> //www.w3.org/2001/XMLSchema" xmlns="
>>> http://schemas.xmlsoap.org/wsdl/" 
> targetNamespace="http://hello.netbureau.it/" 
>>> name="HellonameService" xmlns:
> plnk="http://docs.oasis-open.org/wsbpel/2.
>>> 0/plnktype">
>>> <types>
>>> <xsd:
> schema>
>>> <xsd:import namespace="http://hello.netbureau.
>>> it/" 
> schemaLocation="Helloname.xsd_1.xsd"></xsd:import>
>>> </xsd:schema>
>>> </types>
> 
>>> <message name="hello">
>>> <part name="parameters" element="tns:hello"
>> </part>
>>> </message>
>>> <message name="helloResponse">
>>> <part name="
> parameters" element="tns:
>>> helloResponse"></part>
>>> </message>
>>> <portType 
> name="Helloname">
>>> <operation name="
>>> hello">
>>> <input message="tns:hello"
>> </input>
>>> <output message="tns:helloResponse"
>>>> </output>
>>> </operation>
> 
>>> </portType>
>>> <binding name="HellonamePortBinding" type="
>>> tns:Helloname"
>>> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
>>> style="
> document"></soap:binding>
>>> <operation name="hello">
>>> <soap:operation 
>>>
> soapAction=""></soap:operation>
>>> <input>
>>> <soap:body use="literal"></soap:
> body>
>>> </input>
>>> <output>
>>> <soap:body use="literal"></soap:body>
>>>
> </output>
>>> </operation>
>>>
>>> </binding>
>>> <service name="HellonameService"
>>> <port name="HellonamePort" 
>>> binding="tns:HellonamePortBinding">
>>> <!--
> using with ode -->
>>> <!--soap:address 
>>> location="http://localhost:
> 8080/HelloWs/Helloname"></soap:address-->
>>> <soap:
>>> address location="http:
> //localhost:8080/ode/processes/HelloWs"></soap:address>
>>> </port>
>>>
> </service>
>>>     <plnk:partnerLinkType name="Helloname">
>>>         <plnk:
>>>
> role name="WriteHelloMsgRole" portType="tns:Helloname"/>
>>>     </plnk:
>>>
> partnerLinkType>
>>> </definitions>
>>>
>>> -Helloname.xsd_1.xsd-
>>>
>>> <xs:
> schema xmlns:tns="
>>> http://hello.netbureau.it/" xmlns:xs="http://www.w3.
> org/2001/XMLSchema" 
>>> version="1.0" targetNamespace="http://hello.netbureau.
> it/">
>>> <xs:element name="
>>> hello" type="tns:hello"></xs:element>
>>>
>>>
> <xs:element name="helloResponse" type="
>>> tns:helloResponse"></xs:element>
>>>
> 
>>> <xs:complexType name="hello">
>>> <xs:sequence>
>>>
>>> <xs:element name="
> name" type="xs:string" minOccurs="0"></xs:element>
>>> </xs:
>>> sequence>
>>>
> </xs:complexType>
>>> <xs:complexType name="helloResponse">
>>> <xs:
>>>
> sequence>
>>> <xs:element name="return" type="xs:string" minOccurs="0"></xs:
>>>
> element>
>>> </xs:sequence>
>>> </xs:complexType>
>>> </xs:schema>
>>>
>>> In 
> netbeans the bpel 
>>> compiler tell me that "insertMissingToData is not allowed 
> appear in element 
>>> copy"..but i supposed that the fault problem message and 
> the previous old ones 
>>> that are the same of this last, are
>>> about the 
> output variable of reply (Out) 
>>> that isn't initialized correctly (Out is a 
> type of soap message that is a 
>>> complex type)
>>> So i read specification on 
> : http://ode.apache.org/flexible-
>>> assigns.html and i added 
> insertMissingToData to copy element but the fault 
>>> message still remain the 
> same!
>>> i have tried add an explicit assignement 
>>> without 
> insertMissingToData in the second copy element :
>>>  <copy>
>>>
> 
>>>                 <from><literal>0</literal></from>
>>>                 <to 
> variable="
>>> Out" part="parameters">
>>>                     <query>myxsd:
> return</query>
>>>                 </to>
>>>             </copy>
>>>
>>> but i 
> get the same problem:
>>> 15:04:
>>> 23,192 DEBUG [ASSIGN] Assign.copy({OCopy 
> {VarRef {Variable __PROCESS_SCOPE:
>>> BpelHello.Out:OMessageVarType#6}.
> parameters{OXPath10Expression myxsd:return}}=
>>> {Literal <?xml version="1.0" 
> encoding="UTF-8"?>
>>> <literal xmlns="http://docs.
>>> oasis-open.org/wsbpel/2.
> 0/process/executable">0</literal>}})
>>> 15:04:23,285 DEBUG 
>>> [ASSIGN] 
> Evaluating FROM expression "{Literal <?xml version="1.0" encoding="UTF-
>>> 8"?>
> 
>>> <literal xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
> 
>>>> 0</literal>}".
>>> 15:04:23,285 DEBUG [ASSIGN] lvalue after eval [message: 
> null]
>>> 15:04:23,285 DEBUG [ASSIGN] content <?xml version="1.0" encoding="
> UTF-8"?>
>>> <message><parameters><helloResponse xmlns="http://hello.
> netbureau.it/"
>>> /></parameters></message>
>>> 15:04:23,348 INFO  [ASSIGN] 
> Assignment Fault: {http:
>>> //docs.oasis-open.org/wsbpel/2.0/process/executable}
> selectionFailure,lineNo=22,
>>> faultExplanation=No results for expression: 
> {OXPath10Expression myxsd:return}
>>> 15:04:23,395 DEBUG [SCOPE] ({OScope 
> '__PROCESS_SCOPE:BpelHello' id=3},
>>> TerminationChannel#1,
> ParentScopeChannel#2): has a fault handler for {http:
>>> //docs.oasis-open.
> org/wsbpel/2.0/process/executable}selectionFailure: {OCatch 
>>> faultName=null, 
> faultVariable=null}
>>> 15:04:23,410 DEBUG [SCOPE] ({OCatch 
>>> faultName=null, 
> faultVariable=null},TerminationChannel:FH#14,ParentScopeChannel:
>>> FH#15): has 
> no fault handler for {http://docs.oasis-open.org/wsbpel/2.
> 0/process/executable}selectionFailure; scope will propagate FAULT!
>>> 15:04:
> 23,504 
>>> DEBUG [BpelProcess] ProcessImpl completed with fault '{http://docs.
> oasis-open.
>>> org/wsbpel/2.0/process/executable}selectionFailure'
>>>
>>>
> someone could help me 
>>> please!!!
>>>
>>>
>>> thank you very much!
>>>
>>>
> Roberto
>>
>> -- 
>> Tammo van Lessen - http://www.taval.de
>>
> 
> 


-- 
Tammo van Lessen - http://www.taval.de

Mime
View raw message