AXIS错误:此位置没有SOAP服务 [英] 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.
我使用Axis 1.4和WSDL从wsdl生成了Web服务的服务器端部分
axistools-maven-plugin
. Axis Servlet映射到/services/*
,
服务在WEB-INF/server-config.wsdd
中的配置如下:
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>
当我将此Web应用程序部署到Tomcat并访问
http://localhost:8080/testservice/services
已部署服务的列表是
返回.
When I deploy this web application to Tomcat and access
http://localhost:8080/testservice/services
a list of deployed services is
returned.
现在...一些服务
- TestService(wsdl)
- TestService
And now... Some Services
- TestService (wsdl)
- TestService
单击wsdl
应该返回此服务的描述,但会导致以下错误页面:
Clicking on wsdl
should return the description for this service but results in the following error page:
AXIS错误
无法生成WSDL!
AXIS error
Could not generate WSDL!
此位置没有SOAP服务
There is no SOAP service at this location
推荐答案
server-config.wsdd
缺少必要的配置设置.
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>
似乎URLMapper
负责从中提取服务名称
没有轴的url不知道要调用哪个服务.这有点
轴常见问题解答中记录的文件:
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:
之所以有效,是因为Axis中的HTTP传输在请求链上部署了URLMapper(org.apache.axis.handlers.http.URLMapper)处理程序. URLMapper接收传入的URL,提取其最后一部分作为服务名称,然后尝试在当前EngineConfiguration中按该名称查找服务.
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.
类似地,您可以部署HTTPActionHandler以便通过SOAPAction HTTP标头调度.您还可以随意以自己的自定义方式设置服务-例如,如果您有一个传输可以通过单个服务来集中所有消息的传输,则可以在传输调用AxisEngine之前在MessageContext中设置该服务
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
这听起来像URLMapper
将默认配置,似乎并非如此.
This makes it sound like the URLMapper
would be configued by default which does not seem to be the case.
这篇关于AXIS错误:此位置没有SOAP服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!