When we publish a WSDL with empty soapAction in ESB, we cannot call the service directly. This article will explain the how to fix this issue.
We defined the soapAction="" in the WSDL as below
Now when you call a service, you will get the below exception:
[2016-08-31 23:47:04,591] ERROR - AxisEngine The endpoint reference (EPR) for the Operation not found is /services/UserRegistryWsdlCxf.UserRegistryWsdlCxfHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /services/UserRegistryWsdlCxf.UserRegistryWsdlCxfHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
You can follow below steps to avoid this exception:
1. Add following entry to axis2.xml -> InFlow -> Addressing phase. It'll engage the new WSAddressingHandler.
2. In the proxy service which requires WS-Addressing, add the following service parameter.
Now you can call a service without any issue.
Reference:
https://docs.wso2.com/display/Governance453/Adding+a+Resource
We defined the soapAction="" in the WSDL as below
... s0:operation name="getUserProperties"> <s5:operation soapAction="" style="document"/> <s0:input> ... <s5:operation soapAction="" style="document"/> ...
Now when you call a service, you will get the below exception:
[2016-08-31 23:47:04,591] ERROR - AxisEngine The endpoint reference (EPR) for the Operation not found is /services/UserRegistryWsdlCxf.UserRegistryWsdlCxfHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /services/UserRegistryWsdlCxf.UserRegistryWsdlCxfHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
You can follow below steps to avoid this exception:
1. Add following entry to axis2.xml -> InFlow -> Addressing phase. It'll engage the new WSAddressingHandler.
<handler name="WSAddressingHandler" class="org.apache.synapse.transport.passthru.util.WSAddressingHandler"> <order phase="Addressing"/> </handler>
2. In the proxy service which requires WS-Addressing, add the following service parameter.
<parameter name="enforceWSAddressing">true</parameter>
Now you can call a service without any issue.
Reference:
https://docs.wso2.com/display/Governance453/Adding+a+Resource
Thank you!!!
ReplyDelete