views:

32

answers:

0

Hi,

I've developed an WS using axis2, which is properly running using the endpoint url like

 `http://server:port/appname/services/FooService`  

but I need to get it working through an endpoint like

 `http://server:port/FooService`  

since the WS clients can't be changed to use a different endpoint.

Getting rid of the "appname" part was easy, setting the appname to root under the application server (changing the application.xml configuration file for the application). This leads to an endpoint like http://server:port/services/FooService which works fine but still has the "services" part on it.

To get rid of the "services" part, i tried:

  • Changed the "servicePath" property on the axis2.xml configuration file. If I set this property to blank, null, "" or "/" does not work. On the first two cases a "servicePath can't be null or empty" exception is thrown while deploying the application.

  • Added a new entry on the web.xml file to map the AxisServlet to the url pattern "/", but again it does not work.

So, my question is: Is there any way to get rid of the servicePath parameter?

Supposing there is no way for doing so, another idea is to "redirect" requests from the endpoint url i'm trying to use to the one that axis2 uses (with the servicePath). I'm not sure how to do this, maybe with a servlet? some configuration on the application server?

btw, I'm using glassfish 2.1.1 and Axis2 1.4.

Thanks in advance!