Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot get reply variable from a service running on axis 2

463116Nov 30 2005 — edited Mar 29 2006
Hi, folks,

I developed a simple process to test the interaction between BPEL PM and axis. The service is just an echo of an input string. When I run the process, I found the messages to and from axis service are exactly what I want, but inside the process no reply got from the service. Any ideas?

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="axis2Echo"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://localhost:8080/axis2/axis2Echo/xsd"
xmlns:tns1="http://localhost:8080/axis2/axis2Echo/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost:8080/axis2/axis2Echo/">
<wsdl:types>
<xsd:schema targetNamespace="http://localhost:8080/axis2/axis2Echo/xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
elementFormDefault="qualified">
<complexType name="ArrayOfstring_literal">
<sequence>
<element maxOccurs="unbounded" minOccurs="1" name="string" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="SOAPStruct">
<all>
<element name="varFloat" type="xsd:float"/>
<element name="varInt" type="xsd:int"/>
<element name="varString" type="xsd:string"/>
</all>
</complexType>

<element name="echoStringParam" type="xsd:string"/>
<element name="echoIntParam" type="xsd:int"/>

<element name="echoStringReturn" type="xsd:string"/>
<element name="echoStringArrayParam" type="tns:ArrayOfstring_literal"/>

<element name="echoStringArrayReturn" type="tns:ArrayOfstring_literal"/>

<element name="echoStructParam" type="tns:SOAPStruct"/>

<element name="echoStructReturn" type="tns:SOAPStruct"/>
</xsd:schema>
</wsdl:types>
<message name="echoString">
<part element="tns:echoStringParam" name="a"/>
</message>
<message name="echoStringResponse">
<part element="tns:echoStringReturn" name="result"/>
</message>
<message name="echoString1">
<part element="tns:echoStringParam" name="a"/>
</message>
<message name="echoString1Response">
<part element="tns:echoStringReturn" name="result"/>
</message>
<message name="echoStruct">
<part element="tns:echoStructParam" name="a"/>
</message>
<message name="echoStructResponse">
<part element="tns:echoStructReturn" name="result"/>
</message>

<portType name="Axis2SampleDocLitPortType">
<operation name="echoString">
<input message="tns1:echoString" name="echoString"/>
<output message="tns1:echoStringResponse" name="echoStringResponse"/>
</operation>
<operation name="echoString1">
<input message="tns1:echoString1" name="echoString1"/>
<output message="tns1:echoString1Response" name="echoString1Response"/>
</operation>
<operation name="echoStruct">
<input message="tns1:echoStruct" name="echoStruct"/>
<output message="tns1:echoStructResponse" name="echoStructResponse"/>
</operation>
<!--<operation name="echoVoid">
<input message="tns:echoVoid" name="echoVoid"/>
<output message="tns:echoVoidResponse" name="echoVoidResponse"/>
</operation>-->
</portType>

<binding name="Axis2SampleDocLitPortBinding"
type="tns1:Axis2SampleDocLitPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="echoString">
<soap:operation soapAction="echoString"/>
<input name="echoString">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</input>
<output name="echoStringResponse">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</output>
</operation>
<operation name="echoString1">
<soap:operation soapAction="echoString1"/>
<input name="echoString1">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</input>
<output name="echoString1Response">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</output>
</operation>
<operation name="echoStruct">
<soap:operation soapAction="echoStruct"/>
<input name="echoStruct">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</input>
<output name="echoStructResponse">
<soap:body namespace="http://localhost:8080/axis2/axis2Echo/"
use="literal"/>
</output>
</operation>
<!--<operation name="echoVoid">
<soap:operation soapAction="echoVoid" style="rpc"/>
<input name="echoVoid">
<soap:body namespace="http://userguide.axis2.apache.org/Axis2SampleDocLit"
use="literal"/>
</input>
<output name="echoVoidResponse">
<soap:body namespace="http://userguide.axis2.apache.org/Axis2SampleDocLit"
use="literal"/>
</output>
</operation>-->
</binding>
<service name="myEchoString">
<port binding="tns1:Axis2SampleDocLitPortBinding"
name="Axis2SampleDocLitPort">
<soap:address
location="http://localhost:8080/axis2/services/myEchoString"/>
</port>
</service>
</wsdl:definitions>

The static wsdl in the process is

<definitions
name="axis2Echo"
targetNamespace="http://localhost:8080/axis2/axis2Echo/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="http://localhost:8080/axis2/axis2Echo/"
>
<import namespace="http://localhost:8080/axis2/axis2Echo/" location="http://localhost:8080/axis2/services/myEchoString?wsdl"/>
<plnk:partnerLinkType name="Axis2SampleDocLitPortType_PL">
<plnk:role name="Axis2SampleDocLitPortType_Role">
<plnk:portType name="tns1:Axis2SampleDocLitPortType"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>

The process is

<process name="echo" targetNamespace="http://xmlns.oracle.com/echo" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ns1="http://localhost:8080/axis2/axis2Echo/" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://localhost:8080/axis2/axis2Echo/xsd" xmlns:client="http://xmlns.oracle.com/echo" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"><!-- ================================================================= --><!-- PARTNERLINKS --><!-- List of services participating in this BPEL process --><!-- ================================================================= -->
<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.
-->
<partnerLink name="client" partnerLinkType="client:echo" myRole="echoProvider" partnerRole="echoRequester"/>
<partnerLink name="echoService" partnerRole="Axis2SampleDocLitPortType_Role" partnerLinkType="ns1:Axis2SampleDocLitPortType_PL"/>
</partnerLinks><!-- ================================================================= --><!-- VARIABLES --><!-- List of messages and XML documents used within this BPEL process --><!-- ================================================================= -->
<variables><!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable" messageType="client:echoRequestMessage"/><!-- Reference to the message that will be sent back to the
requester during callback
-->
<variable name="outputVariable" messageType="client:echoResponseMessage"/>
<variable name="invokeEcho_echoString1_InputVariable" messageType="ns1:echoString1"/>
<variable name="invokeEcho_echoString1_OutputVariable" messageType="ns1:echoString1Response"/>
</variables><!-- ================================================================= --><!-- ORCHESTRATION LOGIC --><!-- Set of activities coordinating the flow of messages across the --><!-- services integrated within this business process --><!-- ================================================================= -->
<sequence name="main"><!-- Receive input from requestor.
Note: This maps to operation defined in echo.wsdl
-->
<receive name="receiveInput" partnerLink="client" portType="client:echo" operation="initiate" variable="inputVariable" createInstance="yes"/><!-- Asynchronous callback to the requester.
Note: the callback location and correlation id is transparently handled
using WS-addressing.
-->
<scope name="getEcho">
<sequence name="Sequence_1">
<assign name="assignInput">
<copy>
<from variable="inputVariable" part="payload" query="/client:echoProcessRequest/client:input"/>
<to variable="invokeEcho_echoString1_InputVariable" part="a" query="/ns2:echoStringParam"/>
</copy>
</assign>
<invoke name="invokeEcho" partnerLink="echoService" portType="ns1:Axis2SampleDocLitPortType" operation="echoString1" inputVariable="invokeEcho_echoString1_InputVariable" outputVariable="invokeEcho_echoString1_OutputVariable"/>
<assign name="assignEcho">
<copy>
<from variable="invokeEcho_echoString1_OutputVariable" part="result" query="/ns2:echoStringReturn"/>
<to variable="outputVariable" part="payload" query="/client:echoProcessResponse/client:result"/>
</copy>
</assign>
</sequence>
</scope>
<invoke name="callbackClient" partnerLink="client" portType="client:echoCallback" operation="onResult" inputVariable="outputVariable"/>
</sequence>
</process>

The request message from PM to axis is

<soapenv:Envelope 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">
<soapenv:Body>
<echoStringParam xmlns="http://localhost:8080/axis2/axis2Echo/xsd">why no echo</echoStringParam>
</soapenv:Body></soapenv:Envelope>

The reply from axis is
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsa:Action xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">echoString1</wsa:Action>
<wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
<wsa:ReferenceParameters>
<axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2">0405721FFA43ED5CA0</axis2:ServiceGroupId>
</wsa:ReferenceParameters>
</wsa:ReplyTo>
<wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsa:Address>http://127.0.0.1:1234/axis2/services/myEchoString</wsa:Address>
</wsa:From>
<wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">29298BBD6298955EB3</wsa:MessageID>
</soapenv:Header>
<soapenv:Body>
<echo:echoStringReturn xmlns:echo="http://localhost:8080/axis2/axis2Echo/">why no echo</echo:echoStringReturn>
</soapenv:Body>
</soapenv:Envelope>

The audit log is

<messages>
<invokeEcho_echoString1_InputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="a">
<echoStringParam xmlns="http://localhost:8080/axis2/axis2Echo/xsd">why no echo</echoStringParam>
</part>
</invokeEcho_echoString1_InputVariable>
<invokeEcho_echoString1_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="result">
<echoStringReturn xmlns="http://localhost:8080/axis2/axis2Echo/xsd" />
</part>
</invokeEcho_echoString1_OutputVariable>
</messages>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2006
Added on Nov 30 2005
2 comments
671 views