2014-01-20 77 views
4

我一直在試圖找出錯誤的確切原因,這看起來像一個常見的錯誤,其中許多人使用Axis,但我無法修復它們任何我能在網上找到的東西。服務器沒有一個epr的wsdl epr - Axis2

我能看到我的服務在

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和工作服務。但我想知道爲什麼我不能看到WSDL當我從listServices頁以下鏈接點擊:

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

org.apache.axis2.AxisFault:服務器沒有對WSDL的EPR ==在原始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) 

我試圖protocal以配合在axis2.xml httpFrontendHostUrl參數,其不實用中定義的一個。

在此先感謝。 Harika。

回答

8

經過許多文章後,我能夠解決這個問題。網上提供的相關信息很少,這是一個非常普遍的問題。

我能夠通過設置在services.xml文件

「useOriginalwsdl」下面的屬性來解決這個問題 - 虛假

「modifyUserWSDLPortAddress」 - 假

+2

我正面臨同樣的問題。這篇文章真的幫了我。謝謝。 –

0

我有同樣的問題和解決問題。問題在於服務確實比較了WSDL中的硬編碼URL和服務可訪問的實際URL。 我WSDL definded如下:

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

但此URL不匹配的服務使用本地主機下,這是實際的URL。由於在services.xml中選項「useOriginalWsdl」爲true,服務確實使用了這個WSDL,並且只是告訴我我輸入了錯誤的服務端點。改變終點是解決這個問題。