[jboss-user] [JBoss jBPM] - Re: How can I assign attribute of the complex object?

pkovgan do-not-reply at jboss.com
Mon Dec 11 03:45:33 EST 2006


Ok ,
I'll try to give concrete example:

I failed on last assign in BPEL description below.
Actually I did not fail(no errors), but I do know that last invoke was not completed. Probably because last assign is wrong.

My process should connect to WS called Customer and retrieve Complex object as response:

My bpel is:

 
  | <?xml version="1.0" encoding="UTF-8"?>
  | <process name="salesOrderCreationBusinessProcess" targetNamespace="http://xtp.sap.com/bp/salesOrderCreation" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tns="http://xtp.sap.com/bp/salesOrderCreation" xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:impl1="http://com.sap.xtp/services/Salesorder" xmlns:impl2="http://com.sap.xtp/services/Item" xmlns:impl0="http://com.sap.xtp/services/Customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
  |   http://schemas.xmlsoap.org/ws/2003/03/business-process/">
  | 	<partnerLinks>
  | 		<partnerLink name="salesOrderCreationcaller" partnerLinkType="tns:salesOrderCreationLinkType" myRole="SalesOrderCreationConsumer"/>
  | 		<partnerLink name="Customer" partnerLinkType="tns:CustomerLinkType" partnerRole="ICustomerService"/>
  | 		<partnerLink name="Item" partnerLinkType="tns:ItemLinkType" partnerRole="IItemService"/>
  | 		<partnerLink name="Salesorder" partnerLinkType="tns:SalesorderLinkType" partnerRole="ISalesorderService"/>
  | 	</partnerLinks>
  | 	<!--Variables of BP-->
  | 	<variables>
  | 		<variable name="_var0" messageType="tns:startCreateOrderMessage"/>
  | 		<variable name="_var1" messageType="impl0:ICustomerService_DiscoveryService_findCustomer"/>
  | 		<variable name="_var2" messageType="impl0:ICustomerService_DiscoveryService_findCustomerResponse"/>
  | 		<variable name="_var3" messageType="impl2:IItemService_DiscoveryService_findItem"/>
  | 		<variable name="_var4" messageType="impl2:IItemService_DiscoveryService_findItemResponse"/>
  | 		<variable name="_var5" messageType="impl1:ISalesorderService_CreationService_createOrder"/>
  | 		<variable name="_var6" messageType="impl1:ISalesorderService_CreationService_createOrderResponse"/>
  | 	</variables>
  | 	<sequence>
  | 		<!-- receive the name of a person -->
  | 		<receive operation="startCreateOrder" partnerLink="salesOrderCreationcaller" portType="tns:SalesOrderCreationConsumer" variable="_var0" createInstance="yes"/>
  | 		<assign>
  | 			<copy>
  | 				<from variable="_var0" part="customerName"/>
  | 				<to variable="_var1" part="customerName"/>
  | 			</copy>
  | 		</assign>
  | 		<invoke name="DiscoveryService_findCustomer" operation="DiscoveryService_findCustomer" partnerLink="Customer" portType="impl0:ICustomerService" inputVariable="_var1" outputVariable="_var2">
  |           </invoke>
  | 		<assign>
  | 			<copy>
  | 				<from variable="_var0" part="itemName"/>
  | 				<to variable="_var3" part="itemName"/>
  | 			</copy>
  | 		</assign>
  | 		<invoke name="DiscoveryService_findItem" operation="DiscoveryService_findItem" partnerLink="Item" portType="impl2:IItemService" inputVariable="_var3" outputVariable="_var4">
  |           </invoke>
  | 		<assign>
  | 			<copy>
  | 				<from variable="_var2" part="return" query="/return/id"/>
  | 				<to variable="_var5" part="customerId"/>
  | 			</copy>
  | 			<copy>
  | 				<from variable="_var4" part="return" query="/return/id"/>
  | 				<to variable="_var5" part="itemId"/>
  | 			</copy>
  | 		</assign>
  | 		<invoke name="CreationService_createOrder" operation="CreationService_createOrder" partnerLink="Salesorder" portType="impl1:ISalesorderService" inputVariable="_var5" outputVariable="_var6">
  |           </invoke>
  | 	</sequence>
  | </process>
  | 
  | 
  |  


As you noticed last assign takes variable _var2 from call to WS,
WSDL of this WS below:


  | <definitions name='CustomerService' targetNamespace='http://com.sap.xtp/services/Customer' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://com.sap.xtp/services/Customer' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
  |  <types>
  |   <schema elementFormDefault='qualified' targetNamespace='http://com.sap.xtp/services/Customer' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://com.sap.xtp/services/Customer' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  |    <complexType name='ResultCustomer_DiscoveryService_findCustomer'>
  |     <sequence>
  |      <element name='id' type='int'/>
  |     </sequence>
  |    </complexType>
  |    <complexType name='ResultCustomer_s2_o1'>
  | 
  |     <sequence>
  |      <element name='p1' nillable='true' type='string'/>
  |      <element name='p2' nillable='true' type='string'/>
  |     </sequence>
  |    </complexType>
  |   </schema>
  |  </types>
  |  <message name='ICustomerService_DiscoveryService_findCustomer'>
  |   <part name='customerName' type='xsd:string'/>
  | 
  |  </message>
  |  <message name='ICustomerService_s2_o1Response'>
  |   <part name='return' type='tns:ResultCustomer_s2_o1'/>
  |  </message>
  |  <message name='ICustomerService_s2_o1'>
  |   <part name='p1' type='xsd:string'/>
  |   <part name='p2' type='xsd:string'/>
  |  </message>
  |  <message name='ICustomerService_DiscoveryService_findCustomerResponse'>
  | 
  |   <part name='return' type='tns:ResultCustomer_DiscoveryService_findCustomer'/>
  |  </message>
  |  <portType name='ICustomerService'>
  |   <operation name='DiscoveryService_findCustomer' parameterOrder='customerName'>
  |    <input message='tns:ICustomerService_DiscoveryService_findCustomer'/>
  |    <output message='tns:ICustomerService_DiscoveryService_findCustomerResponse'/>
  |   </operation>
  |   <operation name='s2_o1' parameterOrder='p1 p2'>
  |    <input message='tns:ICustomerService_s2_o1'/>
  | 
  |    <output message='tns:ICustomerService_s2_o1Response'/>
  |   </operation>
  |  </portType>
  |  <binding name='ICustomerServiceBinding' type='tns:ICustomerService'>
  |   <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
  |   <operation name='DiscoveryService_findCustomer'>
  |    <soap:operation soapAction=''/>
  |    <input>
  |     <soap:body namespace='http://com.sap.xtp/services/Customer' use='literal'/>
  | 
  |    </input>
  |    <output>
  |     <soap:body namespace='http://com.sap.xtp/services/Customer' use='literal'/>
  |    </output>
  |   </operation>
  |   <operation name='s2_o1'>
  |    <soap:operation soapAction=''/>
  |    <input>
  |     <soap:body namespace='http://com.sap.xtp/services/Customer' use='literal'/>
  | 
  |    </input>
  |    <output>
  |     <soap:body namespace='http://com.sap.xtp/services/Customer' use='literal'/>
  |    </output>
  |   </operation>
  |  </binding>
  |  <service name='CustomerService'>
  |   <port binding='tns:ICustomerServiceBinding' name='ICustomerServicePort'>
  |    <soap:address location='http://TLVD60155051A:8080/quickstart/Customer'/>
  | 
  |   </port>
  |  </service>
  | </definitions>
  | 
  | 
  | 


Could you help me?
What's wrong in my variable/part/query?What is wrong in WSDL?

Please, help.

Thanks in advance.





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992705#3992705

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992705



More information about the jboss-user mailing list