Axis error: no SOAP service in this place

Note. I could not find a direct answer to this problem, so I will document my solution below as an answer.

I created the backend of the web service from wsdl using Axis 1.4 and axistools-maven-plugin . The Axis servlet maps 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 list of deployed services is back.

And now ... Some services

  • TestService (wsdl)
    • TestService

By clicking wsdl , you should return a description of this service, but the error on the next page:

Axis error

Failed to create WSDL!

There is no SOAP service at this location.

+4
source share
5 answers

The server-config.wsdd parameter was missing the required configuration parameter.

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

It seems that URLMapper is responsible for retrieving the service name from the url, without it the axis does not know which service to call. This is a kind of documented axis faq :

This mechanism works because the HTTP transport in Axis has a URLMapper handler (org.apache.axis.handlers.http.URLMapper) deployed in the request chain. URLMapper accepts the incoming URL, retrieves the last part of it as a service name, and tries to find the service using that name in the current version of EngineConfiguration.

Similarly, you can deploy an HTTPActionHandler to send through the SOAPAction HTTP header. You can also freely install the service in your own way - for example, if you have a transport that combines all messages through one service, you can simply install the service in MessageContext before your transport calls AxisEngine

This makes it sound like URLMapper will be configured by default, which seems to be not the case.

+8
source

When I had this problem, it was caused by 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 .

+1
source

You better create server-config.wsdd automatically with the target "admin". See the documentation for this plugin:

http://mojo.codehaus.org/axistools-maven-plugin/admin-mojo.html

It is very difficult to create server-config.wsdd manually.

Example:

 <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>axistools-maven-plugin</artifactId> <version>1.3</version> <configuration> <filename>${project.artifactId}.wsdl</filename> <namespace>http://server.ws.xxx</namespace> <namespaceImpl>http://server.ws.xxx</namespaceImpl> <classOfPortType>XXXWebService</classOfPortType> <location>http://localhost:8080/XX/services/XXXWebService</location> <bindingName>XXServiceSoapBinding</bindingName> <style>WRAPPED</style> <use>literal</use> <inputFiles> <inputFile>${basedir}\src\main\webapp\WEB-INF\xxxx\deploy.wsdd</inputFile> <inputFile>${basedir}\src\main\webapp\WEB-INF\xxxx\deploy.wsdd</inputFile> </inputFiles> <isServerConfig>true</isServerConfig> <extraClasses></extraClasses> </configuration> <executions> <execution> <goals> <goal>java2wsdl</goal> <goal>admin</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>axis</groupId> <artifactId>axis</artifactId> <version>1.3</version> </dependency> </dependencies> </plugin> </plugins> </build> 
0
source

I have had the same issue recently.

Solution: In my case, I used Axis 1.4 and deployed the application on tomcat. However, for some reason, the generated server-config.wsdd was not packaged in a war and therefore was not deployed to tomcat. Once I was convinced that this was happening, he began to work well for me.

0
source
  • you provide server-config.wsdd in your package, you can put this file in resources or you can install in your pom.xml via maven what files will be in the package
  • server-config.wsdd must be valid, and the correct tags or the necessary configuration exist, so below the line should be in it;
 <handler type="java:org.apache.axis.handlers.http.URLMapper" name="URLMapper"/> <handler type="java:org.apache.axis.transport.local.LocalResponder" name="LocalResponder" /> <transport name="http"> <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler" /> <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler" /> <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler" /> <requestFlow> <handler type="URLMapper" /> <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler" /> </requestFlow> </transport> <transport name="local"> <responseFlow> <handler type="LocalResponder" /> </responseFlow> </transport> 
0
source

Source: https://habr.com/ru/post/1390241/


All Articles