Monday, February 9, 2009

Axis2 - The endpoint reference (EPR) for the Operation not found

Well if you've ever used Apache Axis2, I'm sure you would have faced this at some time or another.

The endpoint reference (EPR) for the
Operation not found is http://localhost:8080/services/someService
and the WSA Action = someAction

There has been a number of occasions where this question has been asked on the Axis2 mailing list as well. The answer to this is pretty simple though (Simple for someone who knows a bit of Axis2).

This exception simply means that Axis2 could not find the service and the operation that this request is headed to.

Several services can be hosted in Axis2, and these services could have several operations. Hence when Axis2 gets a request it should first search for the service and then the operation that the request is headed to. In Order to achieve this it uses some hints. This article from Chinthaka explains these in detail.

So if you hit this problem my advice is this. Try using TCPMonitor to intercept the request going into Axis2, have a look at it and make sure that the request contains some information that Axis2 could use to dispatch the request to the correct service and operation.

8 comments:

jijisv said...

Axis2 and weblogic integration is a pain sometimes. weblogic ship with a lot of apache libraries which are not compatible with axis2. If you override the weblogic ones with the apache jars, then weblogic will not start.

Recently I faced one issue with StAX implementation. weblogic ship with a BEA StAX implementation which will cause the SOAP Body to go empty when you use Dispatch interface. Since the SOAP Body is empty, you will get EPR error.

If we add Woodstox StAX implementation to weblogic classpath, then weblogic server will not start.. :)

It is very unlikely that commercial application servers like weblogic do not support plugin in external StAX implementation.

Keith Chapman said...

One of my colleagues went through the same pain. That was on Weblogic 9.2 though. But it seems like he was able to do it in WebLogic 10.

What is the version you are using?

pinar said...
This comment has been removed by the author.
pinar said...

The service cannot be found for the endpoint reference (EPR)

Is that error related too ?

I tried to changed the contextRoot programmatically and I get this error.

Keith Chapman said...

Yes, You get that error if Axis2 cannot find the service the request is headed to.

Note that the only way Axis2 can figure out the service is looking at the address of the request

Fernando said...

I'm pretty new to axis2, and you saved my day!
Thanks a lot!!

Unknown said...

Hello, Keith,

I am also new to Axis 2 and i have used a simple example found in Martin Kalin's "Java Web Services".
I have the SEI, the SIB and i am using a Endpoint.publish( address, implementor ) to publish my service. This is when i get EPR for the operation not found. It's funny since i am publishing under localhost/someserviceName and the request is redirected to localhost/services. is that supposed to happen? if it is why can't it find my EPR?

vishnu said...

I new to axis, I installed axis2 in tomcat 7. Configured to port 8080.

Before deploying the axis2 war, localhost:8080 used to direct me to tomcat admin console. Now its automatically getting redirected to http://localhost:8080/axis2/services/

I am able to open Axis2 webapp through
http://localhost:8080/axis2/.

How to open the tomcat webapp once axis2 is installed?