Exception When Invoking Services Hosted in Axis2 TCPServer
By Deepal Jayasingha
- 4 Aug, 2006
Q: When I try to invoke a service deployed in the
org.apache.axis2.transport.tcp.TCPServer I get the exception "Service Not found EPR is....". Why does this happen?
A: You are getting this error since system is not able to dispatch your request using any of the available dispatchers. To understand what's happening let's look at the list of dispatchers defined in the axis2.xml.
When we use HTTP as the transport, the engine has access to the Request URI and information in the HTTP Headers like SOAPAction. The first 2 dispatchers are based on that information. Since we are using TCP, the engine does not have this information since the transport layer does not support it.
SOAPMessageBodyBasedDispatcher can be used but in limited cases only based on the type of the WSDL. So the best possible solution is to use ws-addressing, where you need to engage the addressing module on both service side and client side. In this case, the addressing will set the wsa:To in the request SOAP message, and this value can be used by the dispatcher on the server side can dispatch the request.
Note : To use TCP invocation you have to engage addressing module in both server side and client side.
Apache Axis2/Java 1.0