[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.bpel-designer] Error in invoking a web service

Hello,
I've created a simple business process the Helloworld. In this business process I'm making a call to an external web service which I've added using using the + plus sign for adding a partner Link.
I'm using ODE 1.1.1,Apache Tomcat 5.5, and Axis 1.4


My BPEL process looks like the following:
<!-- HelloWorld BPEL Process [Generated by the Eclipse BPEL Designer] -->
<bpel:process name="HelloWorld"
targetNamespace="http://helloWorld";
suppressJoinFailure="yes"
xmlns:tns="http://helloWorld";
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable";
xmlns:ns1="http://insa.stage.sncf.orchestration";>


<!-- Import the client WSDL --> <bpel:import namespace="http://insa.stage.sncf.orchestration"; location="file:/F:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/GestionCandidature/WebContent/wsdl/GestionCandidature.wsdl" importType="http://schemas.xmlsoap.org/wsdl/";></bpel:import>
<bpel:import location="HelloWorldArtifacts.wsdl" namespace="http://helloWorld"; 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. -->
<bpel:partnerLink name="client"
partnerLinkType="tns:HelloWorld"
myRole="HelloWorldProvider"
/> <bpel:partnerLink name="PLGestionCandidature" partnerLinkType="tns:PTGestionCandidature" partnerRole="GestionCandidatureProvider"></bpel:partnerLink>
</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 returned to the requester
-->
<bpel:variable name="output"
messageType="tns:HelloWorldResponseMessage"/> <bpel:variable name="inputSetPerson" messageType="ns1:setPrenomRequest"></bpel:variable>
<bpel:variable name="outputSetPerson" messageType="ns1:setPrenomResponse"></bpel:variable>
</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 requester. Note: This maps to operation defined in HelloWorld.wsdl -->
<bpel:receive name="receiveInput" partnerLink="client" portType="tns:HelloWorld" operation="process" variable="input" createInstance="yes" />
<!-- Generate reply to synchronous request -->
<bpel:assign validate="no" name="Assign1"><bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve"><impl:setPrenom xmlns:impl="http://insa.stage.sncf.orchestration"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<impl:strPrenom></impl:strPrenom>
</impl:setPrenom>
</bpel:literal>
</bpel:from>
<bpel:to variable="inputSetPerson" part="parameters"></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="parameters" variable="inputSetPerson">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns1:strPrenom]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:invoke name="Invoke" partnerLink="PLGestionCandidature" operation="setPrenom" portType="ns1:GestionCandidature" inputVariable="inputSetPerson" outputVariable="outputSetPerson"></bpel:invoke>
<bpel:assign validate="no" name="Assign"> <bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve"><tns:HelloWorldResponse xmlns:tns="http://helloWorld"; 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:reply name="replyOutput" partnerLink="client" portType="tns:HelloWorld" operation="process" variable="output" /> </bpel:sequence>
</bpel:process>


------------------------------
Afterwards I've created a simple Java application and added a new web service client i.e the wsdl file for the BPEL process, and I try to call my business process using the following code:


HelloWorldLocator service;
HelloWorldSOAP12BindingStub soap11Service;
service = new HelloWorldLocator();
service.setEndpointAddress(new QName("HelloWorldSOAP12port_http"), "http://localhost:8080/ode/processes/HelloWorld";);
soap11Service = new HelloWorldSOAP12BindingStub(new URL("http://localhost:8080/ode/processes/HelloWorld";),service);


HelloWorldRequest inpart = new HelloWorldRequest();
		inpart.setInput("Hello World");
HelloWorldResponse response = soap11Service.process(inpart);

And I'm getting the following error in Eclipse console:
DEBUG - GeronimoLog.debug(66) | Received request message for HelloWorld.{http://helloWorld}process
DEBUG - GeronimoLog.debug(66) | Starting transaction.
DEBUG - GeronimoLog.debug(66) | Routed: svcQname {http://helloWorld}HelloWorldProcessService --> [BpelProcess[{http://helloWorld}HelloWorld-30]]
DEBUG - GeronimoLog.debug(66) | ODE routed to operation Operation: name=process
style=REQUEST_RESPONSE,1
Input: name=null
Message: name={http://helloWorld}HelloWorldRequestMessage
Part: name=payload
elementName={http://helloWorld}HelloWorldRequest
Output: name=null
Message: name={http://helloWorld}HelloWorldResponseMessage
Part: name=payload
elementName={http://helloWorld}HelloWorldResponse from service {http://helloWorld}HelloWorldProcessService
DEBUG - GeronimoLog.debug(66) | SET MEX property isTwoWay = true
DEBUG - GeronimoLog.debug(66) | Invoking ODE using MEX {MyRoleMex#hqejbhcnphr4inch259dcx [Client hqejbhcnphr4inch259dcw] calling {http://helloWorld}HelloWorldProcessService.process(...)}
DEBUG - GeronimoLog.debug(66) | Message content: <?xml version="1.0" encoding="UTF-8"?>
<message><payload><HelloWorldRequest xmlns="http://helloWorld"; xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><input xmlns="http://helloWorld";>Hello World</input></HelloWorldRequest></payload></message>
DEBUG - GeronimoLog.debug(66) | invoke() EPR= null ==> BpelProcess[{http://helloWorld}HelloWorld-30]
DEBUG - GeronimoLog.debug(66) | Commiting ODE MEX {MyRoleMex#hqejbhcnphr4inch259dcx [Client hqejbhcnphr4inch259dcw] calling {http://helloWorld}HelloWorldProcessService.process(...)}
DEBUG - GeronimoLog.debug(66) | Commiting transaction.
DEBUG - GeronimoLog.debug(66) | handleWorkEvent: InvokeInternal event for mexid hqejbhcnphr4inch259dcx
DEBUG - GeronimoLog.debug(66) | >> handleWorkEvent(jobData={type=INVOKE_INTERNAL, mexid=hqejbhcnphr4inch259dcx, pid={http://helloWorld}HelloWorld-30})
DEBUG - GeronimoLog.debug(66) | InvokeInternal event for mexid hqejbhcnphr4inch259dcx
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: client.process: MSG RCVD keys=[] mySessionId=null partnerSessionId=null
DEBUG - GeronimoLog.debug(66) | INPUTMSG: client.process: routing failed, CREATING NEW INSTANCE
DEBUG - GeronimoLog.debug(66) | BpelRuntimeContextImpl created for instance 7801. INDEXED STATE={}
DEBUG - GeronimoLog.debug(66) | SELECT: PickResponseChannel#9: USING CORRELATOR client.process
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#hqejbhcnphr4inch259dcx [Client hqejbhcnphr4inch259dcw] calling {http://helloWorld}HelloWorldProcessService.process(...)}
DEBUG - GeronimoLog.debug(66) | INVOKING PARTNER: partnerLink={PartnerLinkInstance partnerLinkDecl=OPartnerLink#21,scopeInstanceId=7851}, op=setPrenom channel=InvokeResponseChannel#20)
DEBUG - GeronimoLog.debug(66) | INVOKE PARTNER (SEP): sessionId=null partnerSessionId=null
DEBUG - GeronimoLog.debug(66) | SET MEX property activityId = 37
DEBUG - GeronimoLog.debug(66) | Routed: svcQname {http://helloWorld}HelloWorldProcessService --> [BpelProcess[{http://helloWorld}HelloWorld-30]]
DEBUG - GeronimoLog.debug(66) | Routed: svcQname {http://helloWorld}HelloWorldProcessService --> [BpelProcess[{http://helloWorld}HelloWorld-30]]
DEBUG - GeronimoLog.debug(66) | Invoking in a p2p interaction, partnerrole {PartnerRoleMex#hqejbhcnphr4inch259dd2 [PID {http://helloWorld}HelloWorld-30] calling null.setPrenom(...)} - myrole {MyRoleMex#hqejbhcnphr4inch259dd3 [Client hqejbhcnphr4inch259dd2] calling {http://helloWorld}HelloWorldProcessService.setPrenom(...)}
DEBUG - GeronimoLog.debug(66) | Setting myRoleMex session ids for p2p interaction, mySession null - partnerSess null
DEBUG - GeronimoLog.debug(66) | invoke() EPR= null ==> BpelProcess[{http://helloWorld}HelloWorld-30]
ERROR - GeronimoLog.error(108) | Method "run" in class "org.apache.ode.bpel.runtime.INVOKE" threw an unexpected exception.
java.lang.NullPointerException
at org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.invoke(MyRoleMessageExchangeImpl.java:144)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeContextImpl.java:766)
at org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:100)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:870)
at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:206)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:237)
at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:408)
at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:439)
at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:441)
at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:411)
at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:405)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:218)
at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:404)
at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:401)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
...


The wsdl file for the invoked web service is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://insa.stage.sncf.orchestration"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://insa.stage.sncf.orchestration"; xmlns:intf="http://insa.stage.sncf.orchestration"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://insa.stage.sncf.orchestration"; xmlns="http://www.w3.org/2001/XMLSchema";>
<element name="setPrenom">
<complexType>
<sequence>
<element name="strPrenom" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="setPrenomResponse">
<complexType>
<sequence>
<element name="setPrenomReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>


  <wsdl:message name="setPrenomResponse">

     <wsdl:part element="impl:setPrenomResponse" name="parameters"/>

  </wsdl:message>

  <wsdl:message name="setPrenomRequest">

     <wsdl:part element="impl:setPrenom" name="parameters"/>

  </wsdl:message>

  <wsdl:portType name="GestionCandidature">

     <wsdl:operation name="setPrenom">

<wsdl:input message="impl:setPrenomRequest" name="setPrenomRequest"/>

<wsdl:output message="impl:setPrenomResponse" name="setPrenomResponse"/>

     </wsdl:operation>

  </wsdl:portType>

<wsdl:binding name="GestionCandidatureSoapBinding" type="impl:GestionCandidature">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

     <wsdl:operation name="setPrenom">

        <wsdlsoap:operation soapAction=""/>

        <wsdl:input name="setPrenomRequest">

           <wsdlsoap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="setPrenomResponse">

           <wsdlsoap:body use="literal"/>

        </wsdl:output>

     </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="GestionCandidatureService">

<wsdl:port binding="impl:GestionCandidatureSoapBinding" name="GestionCandidature">

<wsdlsoap:address location="http://localhost:8080/GestionCandidature/services/GestionCandidature"/>

     </wsdl:port>

  </wsdl:service>

</wsdl:definitions>


Any Help why I'm not able to invoke properly my business process.