Hi all
I created the BPEL Process as asynchronous, following is my BPEL Process
Helloworld.bpel
<!-- Helloworld BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Sat Jan 17 14:20:57 GMT+05:30 2009 -->
<bpel:process name="Helloworld"
targetNamespace="http://sample.bpel.org/bpel/sample"
suppressJoinFailure="yes"
xmlns:tns="http://sample.bpel.org/bpel/sample"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>
<!-- Import the client WSDL -->
<bpel:import location="HelloworldArtifacts.wsdl"
namespace="http://sample.bpel.org/bpel/sample"
importType="http://schemas.xmlsoap.org/wsdl/" />
<!--
=================================================================
-->
<!--
PARTNERLINKS -->
<!-- List of services participating in this BPEL
process -->
<!--
=================================================================
-->
<bpel:partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information
associated
with the client role are automatically set using WS-Addressing.
-->
<bpel:partnerLink name="client"
partnerLinkType="tns:Helloworld"
myRole="HelloworldProvider"
partnerRole="HelloworldRequester"
/>
</bpel:partnerLinks>
<!--
=================================================================
-->
<!--
VARIABLES -->
<!-- List of messages and XML documents used within this BPEL
process -->
<!--
=================================================================
-->
<bpel:variables>
<!-- Reference to the message passed as input during initiation -->
<bpel:variable name="input"
messageType="tns:HelloworldRequestMessage"/>
<!-- Reference to the message that will be sent back to the
requester during callback
-->
<bpel:variable name="output"
messageType="tns:HelloworldResponseMessage"/>
</bpel:variables>
<!--
=================================================================
-->
<!-- ORCHESTRATION
LOGIC -->
<!-- Set of activities coordinating the flow of messages across
the -->
<!-- services integrated within this business
process -->
<!--
=================================================================
-->
<bpel:sequence name="main">
<!-- Receive input from requestor.
Note: This maps to operation defined in Helloworld.wsdl
-->
<bpel:receive name="receiveInput" partnerLink="client"
portType="tns:Helloworld"
operation="initiate" variable="input"
createInstance="yes"/>
<!-- Asynchronous callback to the requester.
Note: the callback location and correlation id is
transparently handled
using WS-addressing.
-->
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
<bpel:literal
xml:space="preserve"><tns:HelloworldResponse
xmlns:tns="http://sample.bpel.org/bpel/sample"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result></tns:result>
</tns:HelloworldResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:invoke name="callbackClient"
partnerLink="client"
portType="tns:HelloworldCallback"
operation="onResult"
inputVariable="output"
/>
</bpel:sequence>
</bpel:process>
Following is my HelloworldArtifacts.wsdl
<?xml version="1.0"?>
<definitions name="Helloworld"
targetNamespace="http://sample.bpel.org/bpel/sample"
xmlns:tns="http://sample.bpel.org/bpel/sample"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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://sample.bpel.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>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>
<binding name="ResponderBinding" type="tns:HelloworldCallback">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="onResult">
<soap:operation
soapAction="http://sample.bpel.org/bpel/sample/onResult" />
<input>
<soap:body use="literal" />
</input>
</operation>
</binding>
<binding name="ExecuteBinding" type="tns:Helloworld">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="initiate">
<soap:operation
soapAction="http://sample.bpel.org/bpel/sample/initiate" />
<input>
<soap:body use="literal" />
</input>
</operation>
</binding>
<service name="InvokingService">
<port name="ExecutePort" binding="tns:ExecuteBinding">
<soap:address
location="http://localhost:8080/ode/processes/HelloInvokeProcess" />
</port>
</service>
<service name="CallbackService">
<port name="ResponderPort" binding="tns:ResponderBinding">
<soap:address
location="http://localhost:8080/ode/processes/HelloResponderProcess" />
</port>
</service>
</definitions>
following is my deploy.xml
<?xml version="1.0" encoding="UTF-8"?>
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:sample="http://sample.bpel.org/bpel/sample">
<process name="sample:Helloworld">
<process-events generate="all"/>
<provide partnerLink="client">
<service name="sample:InvokingService" port="ExecutePort"/>
</provide>
<invoke partnerLink="client">
<service name="sample:CallbackService" port="ResponderPort"/>
</invoke>
</process>
</deploy>
i deployed in the ode runtime engine inside the tomcat, it deployed
successfully , while im testing wsdl with the webservice explorer
iam sending the input , but iam getting the response object as null,
following is my output in console
DEBUG - GeronimoLog.debug(66) | Received one-way message for
HelloInvokeProcess.{http://sample.bpel.org/bpel/sample}initiate
DEBUG - GeronimoLog.debug(66) | Starting transaction.
DEBUG - GeronimoLog.debug(66) | Routed: svcQname
{http://sample.bpel.org/bpel/sample}InvokingService -->
BpelProcess[{http://sample.bpel.org/bpel/sample}Helloworld-117]
DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation:
name=initiate
style=ONE_WAY,0
Input: name=null
Message: name={http://sample.bpel.org/bpel/sample}HelloworldRequestMessage
Part: name=payload
elementName={http://sample.bpel.org/bpel/sample}HelloworldRequest from
service {http://sample.bpel.org/bpel/sample}InvokingService
DEBUG - GeronimoLog.debug(66) | Invoking ODE using MEX
{MyRoleMex#hqejbhcnphr3wxc436pvna [Client hqejbhcnphr3wxc436pvn9]
calling {http://sample.bpel.org/bpel/sample}InvokingService.initiate(...)}
DEBUG - GeronimoLog.debug(66) | Message content: <?xml version="1.0"
encoding="UTF-8"?>
<message><payload><HelloworldRequest
xmlns="http://sample.bpel.org/bpel/sample"
xmlns:q0="http://sample.bpel.org/bpel/sample"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
*<input>haI</input>*
</HelloworldRequest></payload></message>
DEBUG - GeronimoLog.debug(66) | Routed: svcQname
{http://sample.bpel.org/bpel/sample}InvokingService -->
BpelProcess[{http://sample.bpel.org/bpel/sample}Helloworld-117]
DEBUG - GeronimoLog.debug(66) | invoke() EPR= null ==>
BpelProcess[{http://sample.bpel.org/bpel/sample}Helloworld-117]
DEBUG - GeronimoLog.debug(66) | Commiting ODE MEX
{MyRoleMex#hqejbhcnphr3wxc436pvna [Client hqejbhcnphr3wxc436pvn9]
calling {http://sample.bpel.org/bpel/sample}InvokingService.initiate(...)}
DEBUG - GeronimoLog.debug(66) | Commiting transaction.
DEBUG - GeronimoLog.debug(66) | Releasing mex hqejbhcnphr3wxc436pvna
DEBUG - GeronimoLog.debug(66) | >>
handleWorkEvent(jobData={type=INVOKE_INTERNAL,
mexid=hqejbhcnphr3wxc436pvna,
pid={http://sample.bpel.org/bpel/sample}Helloworld-117})
DEBUG - GeronimoLog.debug(66) | InvokeInternal event for mexid
hqejbhcnphr3wxc436pvna
DEBUG - GeronimoLog.debug(66) | GET MEX property
org.apache.ode.bpel.myRoleSessionId = null
DEBUG - GeronimoLog.debug(66) | GET MEX property
org.apache.ode.bpel.myRoleSessionId = null
DEBUG - GeronimoLog.debug(66) | GET MEX property
org.apache.ode.bpel.partnerRoleSessionId = null
DEBUG - GeronimoLog.debug(66) | INPUTMSG: 12.initiate: MSG RCVD keys=[]
mySessionId=null partnerSessionId=null
DEBUG - GeronimoLog.debug(66) | INPUTMSG: 12.initiate: routing failed,
CREATING NEW INSTANCE
DEBUG - GeronimoLog.debug(66) | BpelRuntimeContextImpl created for
instance 26953. INDEXED STATE={}
DEBUG - GeronimoLog.debug(66) | SELECT: PickResponseChannel#9: USING
CORRELATOR 12.initiate
DEBUG - GeronimoLog.debug(66) | SELECT: PickResponseChannel#9: CHECKING
for NEW INSTANCE match
DEBUG - GeronimoLog.debug(66) | INPUTMSGMATCH: Changing process instance
state from ready to active
DEBUG - GeronimoLog.debug(66) | SELECT: PickResponseChannel#9: FOUND
match for NEW instance mexRef={MyRoleMex#hqejbhcnphr3wxc436pvna [Client
hqejbhcnphr3wxc436pvn9] calling
{http://sample.bpel.org/bpel/sample}InvokingService.initiate(...)}
DEBUG - GeronimoLog.debug(66) | INVOKING PARTNER:
partnerLink={PartnerLinkInstance
partnerLinkDecl=OPartnerLink#12,scopeInstanceId=27005}, op=onResult
channel=null)
DEBUG - GeronimoLog.debug(66) | INVOKE PARTNER (SEP):
sessionId=hqejbhcnphr3wxc436pvnc partnerSessionId=null
DEBUG - GeronimoLog.debug(66) | Routed: svcQname
{http://sample.bpel.org/bpel/sample}CallbackService --> null
DEBUG - GeronimoLog.debug(66) | Invoking a partner operation: onResult
DEBUG - GeronimoLog.debug(66) | The service to invoke is the external
service {http://sample.bpel.org/bpel/sample}CallbackService:ResponderPort
DEBUG - GeronimoLog.debug(66) | Resolving endpoint reference <?xml
version="1.0" encoding="UTF-8"?>
<service-ref
xmlns="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><EndpointReference
xmlns="http://www.w3.org/2005/08/addressing"><Metadata><ServiceName
xmlns="http://www.w3.org/2006/05/addressing/wsdl"
EndpointName="ResponderPort"
xmlns:servicens="http://sample.bpel.org/bpel/sample">servicens:CallbackService</ServiceName></Metadata><Address>http://localhost:8080/ode/processes/HelloResponderProcess</Address></EndpointReference></service-ref>
DEBUG - GeronimoLog.debug(66) | GET MEX property
org.apache.ode.bpel.partnerRoleSessionId = null
DEBUG - GeronimoLog.debug(66) | GET MEX property
org.apache.ode.bpel.myRoleSessionId = hqejbhcnphr3wxc436pvnc
DEBUG - GeronimoLog.debug(66) | MyRole session identifier found for
myrole (callback) WSA endpoint: hqejbhcnphr3wxc436pvnc
DEBUG - GeronimoLog.debug(66) | Axis2 sending message to
http://localhost:8080/ode/processes/HelloResponderProcess using MEX
{PartnerRoleMex#hqejbhcnphr3wxc436pvnd [PID
{http://sample.bpel.org/bpel/sample}Helloworld-117] calling
[email protected](...)}
DEBUG - GeronimoLog.debug(66) | Message: <?xml version='1.0'
encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><HelloworldResponse
xmlns="http://sample.bpel.org/bpel/sample">
*<result>haI</result>*
</HelloworldResponse></soapenv:Body></soapenv:Envelope>
DEBUG - GeronimoLog.debug(66) |
org.apache.ode.axis2.soapexternalservice$cachedoption...@da5660 has been
modified
DEBUG - GeronimoLog.debug(66) | Translating IL Properties for Axis2
DEBUG - GeronimoLog.debug(66) | replyOneWayOk mex=hqejbhcnphr3wxc436pvnd
DEBUG - GeronimoLog.debug(66) | Sending stateful TO epr in message
header using session null
DEBUG - GeronimoLog.debug(66) | Sending stateful FROM epr in message
header using session hqejbhcnphr3wxc436pvnc
DEBUG - GeronimoLog.debug(66) | Sending a message containing wsa
endpoints in headers for session passing.
DEBUG - GeronimoLog.debug(66) | <?xml version='1.0'
encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><addr:To
xmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8080/ode/processes/HelloResponderProcess</addr:To><addr:Action
xmlns:addr="http://www.w3.org/2005/08/addressing">http://sample.bpel.org/bpel/sample/onResult</addr:Action><addr:ReplyTo
xmlns:addr="http://www.w3.org/2005/08/addressing"><addr:Address>http://www.w3.org/2005/08/addressing/none</addr:Address></addr:ReplyTo><addr:MessageID
xmlns:addr="http://www.w3.org/2005/08/addressing">urn:uuid:B71E53E6E179D41DF41232199002481</addr:MessageID><intalio:callback
xmlns:intalio="http://www.intalio.com/type/session"><addr:Address
xmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8080/ode/processes/HelloInvokeProcess</addr:Address><intalio:session>hqejbhcnphr3wxc436pvnc</intalio:session></intalio:callback></soapenv:Header><soapenv:Body><HelloworldResponse
xmlns="http://sample.bpel.org/bpel/sample">
*<result>haI</result>*
</HelloworldResponse></soapenv:Body></soapenv:Envelope>
DEBUG - GeronimoLog.debug(66) | ProcessImpl
{http://sample.bpel.org/bpel/sample}Helloworld-117 completed OK.
DEBUG - GeronimoLog.debug(66) | Releasing mex hqejbhcnphr3wxc436pvna
DEBUG - GeronimoLog.debug(66) | Checking for Service using target
endpoint address : http://localhost:8080/ode/processes/HelloResponderProcess
DEBUG - GeronimoLog.debug(66) | Found service in registry from name
*HelloResponderProcess: null
*can any one tell me what could be the problem, i need to receive the
response in browser but i cant, so any one tell me how i can receive the
output sending in the callback response.
with regards
Surendar V