我在 JBOSS AS7 上使用 ProcessBuilder 来运行外部 JAR,然后调用 Endpoint.publish() 来创建 JAX-WS Web 服务。之后我使用有状态 bean 来访问 Web 服务。
服务本身运行良好,我通过 wsimport 导入了 WS-client 代理类,并且可以通过浏览器或 soapUI 访问 WSDL。但是当我尝试访问服务器上的 Web 服务时,JBOSS 输出“连接被拒绝”。我什至尝试过调试模式,但没有收集任何有用的消息。
我已经禁用了防火墙但没有骰子:
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:4045/WebService/WebMethod?WSDL'.: java.net.ConnectException: Connection refused: connect
系统:JBOSS AS7.1.0.Alpha2, Windows, localhost
jboss日志:
08:26:01,572 ERROR [stderr] (http--127.0.0.1-8080-1) javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
08:26:01,573 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149)
08:26:01,574 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:141)
08:26:01,574 ERROR [stderr] (http--127.0.0.1-8080-1) at javax.xml.ws.Service.<init>(Service.java:57)
...
08:26:01,603 ERROR [stderr] (http--127.0.0.1-8080-1) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
08:26:01,603 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:94)
08:26:01,603 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
08:26:01,603 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
08:26:01,603 ERROR [stderr] (http--127.0.0.1-8080-1) ... 158 more
08:26:01,604 ERROR [stderr] (http--127.0.0.1-8080-1) Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:4045/WebService/WebMethod?WSDL'.: java.net.ConnectException: Connection refused: connect
08:26:01,604 ERROR [stderr] (http--127.0.0.1-8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
08:26:01,605 ERROR [stderr] (http--127.0.0.1-8080-1) ... 160 more
08:26:01,606 ERROR [stderr] (http--127.0.0.1-8080-1) Caused by: java.net.ConnectException: Connection refused: connect
...