服务器没有wsdl epr的epr - Axis2

时间:2014-01-20 09:00:05

标签: java web-services soap wsdl axis2

我一直试图找出错误的确切原因,这看起来像许多使用Axis的常见错误,但我无法用任何能在网上找到的东西修复它们。 / p>

我可以在

看到我的服务
http://localhost:8080/axis2/services/listServices. when i hit the service epr on browser 

http://localhost:8080/axis2/services/AuthService, it is working fine also.

我使用SoapUI及其工作测试了该服务。但我想知道为什么当我点击listServices页面中的以下链接时,我无法看到wsdl:

http://localhost:8080/axis2/services/AuthService?wsdl>. I get this error 

org.apache.axis2.AxisFault:服务器没有wsdl ==>的epr;

https://localhost:8080/services/TestService?wsdl>
at org.apache.axis2.description.AxisService.getLocationURI(AxisService.java:1615)
at org.apache.axis2.description.AxisService.setPortAddress(AxisService.java:1498)
at org.apache.axis2.description.AxisService.printDefinitionObject(AxisService.java:1078)
at org.apache.axis2.description.AxisService.printUserWSDL(AxisService.java:1112)
at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1386)
at org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAgent.java:327)
at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:183)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.highradius.payrad.HeaderFilter.doFilter(HeaderFilter.java:182)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

我尝试在原始wsdl中为EPR定义的protocal与在axis2.xml中的httpFrontendHostUrl参数中定义的那个匹配,这是无用的。

先谢谢。 Harika。

2 个答案:

答案 0 :(得分:9)

经过许多文章后,我能够解决这个问题。网上提供的相关信息很少,这是一个非常普遍的问题。

我能够通过在services.xml文件中设置以下属性来解决这个问题

“useOriginalwsdl” - false

“modifyUserWSDLPortAddress” - false

答案 1 :(得分:0)

我遇到了同样的问题并解决了问题。问题是该服务确实比较了WSDL中的硬编码URL和可以访问服务的真实URL。 我的WSDL定义了以下内容:

<service name="MyService">
    <port name="MyServicePort" binding="so:MaServiceBinding">
        <soap:address location="http://my-service.de/webservice"/>
    </port>
</service>

但此URL与该服务在localhost下使用的实际URL不匹配。因为在services.xml中,选项&#34; useOriginalWsdl&#34;是的,服务确实使用了这个WSDL,只是告诉我我输入了错误的服务端点。更改端点正在解决此问题。