Simple invoking BPEL process from JSP not working
505202Apr 19 2006 — edited Apr 21 2006Hello Everybody,
I'm trying to invoke a BPEL process from a client JSP. I'm following the tutorial 7 Invoking the BPEL processes.
I'm trying to use the same tutorial for a different application.
Here is my WSDL snippet.
<types>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://www.arcwebservices.com/v2006"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="SpatialQueryRequest" type="s1:SpatialQueryRequestType"/>
<element name="SpatialQueryResponse" type="s1:SpatialQueryResponseType"/>
<complexType name="SpatialQueryRequestType">
<sequence>
<element name="username" type="string"/>
<element name="password" type="string"/>
</sequence>
</complexType>
<complexType name="SpatialQueryResponseType">
<sequence>
<element name="token" type="string"/>
</sequence>
</complexType>
</schema>
</types>
<message name="SpatialQueryRequestMessage">
<part name="payload" element="s1:SpatialQueryRequest"/>
</message>
<message name="SpatialQueryResponseMessage">
<part name="payload" element="s1:SpatialQueryResponse"/>
</message>
<portType name="SpatialQuery">
<operation name="initiate">
<input message="tns:SpatialQueryRequestMessage"/>
</operation>
</portType>
<!-- portType implemented by the requester of SpatialQuery BPEL process
for asynchronous callback purposes
-->
<portType name="SpatialQueryCallback">
<operation name="onResult">
<input message="tns:SpatialQueryResponseMessage"/>
</operation>
</portType>
The JSP code is:
<%
String ssn = request.getParameter("ssn");
//if(ssn == null)
// ssn = "123-12-1234";
String username = "jaweed";
String password = "ibrahim";
//String xml = "<ssn xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
//String xml = "<UserName xmlns="http://www.arcwebservices.com/v2006">" + username + "</UserName><Password xmlns="http://www.arcwebservices.com/v2006">" + password + "</Password>";
String xml = "<UserName xmlns=\"http://www.arcwebservices.com/v2006\">" + username + "</UserName><Password xmlns=\"http://www.arcwebservices.com/v2006\">" + password + "</Password>";
Locator locator = new Locator("default","bpel");
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
NormalizedMessage res = deliveryService.request("SpatialQuery", "initiate", nm);
Map payload = res.getPayload();
//out.println( "BPELProcess CreditRatingService executed!<br>" );
out.println( "Token is " + payload.get("payload") );
%>
com.oracle.bpel.client.ServerException: IDeliveryService.request() invoked for one-way operation 'initiate'. This method can only be used to invoke two-way operations which return an output message. Please check the WSDL which defines this operation and use the method IDeliveryService.post() to invoke a one-way operation
But I'm getting an exception. I'm in deep trouble please help me. Urgent