Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AXIS error: There is no SOAP service at this location

Note: I could not find a straight-forward answer to this problem so I will document my solution below as an answer.

I generated the server-side part of a webservice from a wsdl using Axis 1.4 and the axistools-maven-plugin. The Axis servlet is mapped to /services/*, the service is configured in WEB-INF/server-config.wsdd as follows:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="TestService" style="document" use="literal">
        <namespace>http://example.com/testservier</namespace>
        <parameter name="className" value="com.example.TestServiceImpl"/>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="scope" value="Session"/>
    </service>
</deployment>

When I deploy this web application to Tomcat and access http://localhost:8080/testservice/services a list of deployed services is returned.

And now... Some Services

  • TestService (wsdl)
    • TestService

Clicking on wsdl should return the description for this service but results in the following error page:

AXIS error

Could not generate WSDL!

There is no SOAP service at this location

like image 339
Jörn Horstmann Avatar asked Jan 10 '12 14:01

Jörn Horstmann


2 Answers

The server-config.wsdd was missing a neccessary configuration setting.

<transport name="http">
    <requestFlow>
        <handler type="java:org.apache.axis.handlers.http.URLMapper"/>
    </requestFlow>
</transport>

It seems the URLMapper is responsible for extracting the service name from the url, without it axis does not know which service to invoke. This is sort of documented in the axis faq:

This mechanism works because the HTTP transport in Axis has the URLMapper (org.apache.axis.handlers.http.URLMapper) Handler deployed on the request chain. The URLMapper takes the incoming URL, extracts the last part of it as the service name, and attempts to look up a service by that name in the current EngineConfiguration.

Similarly you could deploy the HTTPActionHandler to dispatch via the SOAPAction HTTP header. You can also feel free to set the service in your own custom way - for instance, if you have a transport which funnels all messages through a single service, you can just set the service in the MessageContext before your transport calls the AxisEngine

This makes it sound like the URLMapper would be configued by default which does not seem to be the case.

like image 95
Jörn Horstmann Avatar answered Nov 19 '22 20:11

Jörn Horstmann


When I had this problem, it was caused by using the wrong URL.

I used http://localhost:8080/axis/services/AdminWebService?wsdl instead of http://localhost:8080/axis/services/AdminService?wsdl.

AdminWebService must be changed to AdminService.

like image 22
Siva Anand Avatar answered Nov 19 '22 22:11

Siva Anand