AXIS error: There is no SOAP service at this location

前端 未结 5 1655
有刺的猬
有刺的猬 2021-01-18 13:49

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

相关标签:
5条回答
  • 2021-01-18 14:02

    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.

    0 讨论(0)
  • 2021-01-18 14:14
    • you ensure server-config.wsdd in your package, you can put this file to resources or you can set in your pom.xml via maven which files will be in the package
    • server-config.wsdd must be valid and correct tags or necessary config is exist so below rows must 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 讨论(0)
  • 2021-01-18 14:17

    You better build the server-config.wsdd automatically with the goal "admin". See the documentation about this plugin:

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

    It is very difficult to generate the 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 讨论(0)
  • 2021-01-18 14:17

    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.

    0 讨论(0)
  • 2021-01-18 14:19

    I had the same problem recently.

    Solution : In my case, I was using Axis 1.4 and was deploying the application on tomcat. However, for some reason the generated server-config.wsdd was not getting packaged in the war and hence was not getting deployed on tomcat. Once, I ensured this is happening, it started working fine for me.

    0 讨论(0)
提交回复
热议问题