为什么我的SOAP客户端忽略WSDL位置的端口



我正在尝试为具有WSDL_LOCATION:http://localhost:8089/SWIStoZZZws/SWIStoZZZws.asmx?WSDL的web服务生成客户端

我使用的是Apache CXF 2.6.2。机器

然而,客户端不知何故忽略了8089端口,并向http://localhost/SWIStoZZZws/SWIStoZZZws.asmx?WSDL发送了HTTP请求,结果我出现了以下错误:

Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost/SWIStoZZZws/SWIStoZZZws.asmx
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1619)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1530)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1438)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:660)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 54 more

知道吗?请帮忙。。。我已经为此奋斗了好几天了。干杯

您可以按照官方文档找到代码:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<jaxws:endpoint id="classImpl"
implementor="org.apache.cxf.jaxws.service.Hello"
endpointName="e:HelloEndpointCustomized"
serviceName="s:HelloServiceCustomized"
address="http://localhost:8080/test"
xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
xmlns:s="http://service.jaxws.cxf.apache.org/service" />
</beans>

如何获取端点地址?也许您可以从IDE 中自动生成的文件中获得端点地址

最新更新