For some legacy Web Services using AXIS1 (such as AXIS 1.4) as an endpoint, is there any tutorial or examples for WSO2 ESB to communicate with AXIS1 WSDL, and act as a service proxy for the client using REST or AXIS2? I am currently using WSO2 ESB 4.8.1, but cannot find any reference to help resolve this issue. Thanks!
1 Answers
I was able to create service for specified service without problem in WSO ESB2 4.8.1, at least I've did not get any errors about WSDL format.
But, you are totally right - there are some issues then you are trying to use Axis1 based service in Axis2 based WSO2 ESB:
As you correctly mentioned, Axis1 used rpc/encoded style, and Axis2 based on document style. To make it working together, then you publishing wsdl for service, you should use followed property, to publish service in WSO2 also in rpc format:
<parameter name="useOriginalwsdl">true</parameter>
Even if you will try to use service with followed definition:
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="PrimaveraProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <outSequence> <send/> </outSequence> <endpoint> <wsdl service="MainService2Service" port="mainservice" uri="https://primavera-unifier.oracleindustry.com/ws/services/mainservice?wsdl"/> </endpoint> </target> <publishWSDL uri="https://primavera-unifier.oracleindustry.com/ws/services/mainservice?wsdl"/> <parameter name="useOriginalwsdl">true</parameter> <description/> </proxy>
You will get error like (then you will try to call some of the methods):
The endpoint reference (EPR) for the Operation not found is /services/PrimaveraProxy.PrimaveraProxyHttpSoap12Endpoint and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.
It is because original WSDL has empty soapAction parameters, for example:
<wsdl:operation name="getRoleList">
<wsdlsoap:operation soapAction=""/>
To fix it, you should edit original WSDL locally, by inserting names for soapActions, and then place it into service definition (for example inline, or via registry).
Hope these advices will help you