Reputation: 1649
I am using ProcessBuilder on JBOSS AS7 to run an external JAR which then calls Endpoint.publish() to create a JAX-WS Web Service. I am using a Stateful bean to access the Web Service afterwards.
The service itself runs fine, I imported the WS-client proxy classes via wsimport and I can access the WSDL via browser or soapUI. But when I try to access the Web service on the server, JBOSS outputs "connection refused". I even tried Debug mode but without gathering any useful messages.
I already disabled the firewall but no dice:
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:4045/WebService/WebMethod?WSDL'.: java.net.ConnectException: Connection refused: connect
System: JBOSS AS7.1.0.Alpha2, Windows, localhost
jboss log:
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
...
Upvotes: 3
Views: 4427
Reputation: 2016
Try to run Jboss server by adding the property -b 0.0.0.0 in the file run.bat like follows:
standalone.bat -b 0.0.0.0
Upvotes: 1
Reputation: 141380
Please see Stephen84s' answer:
You need an echo server running on your system, which is provided by most UNIX machines and runs on port no 7.
and from the same source
To check if your Vista box has one running just hit telnet localhost 7 , if it shows connection refused or could not connect, then it means you box does not have an echo server, and hence your program will not work and thats the reason I feel for your ConnectException exception.
You mentioned that you turned the firewall off. Then, you must have the port wrong. Try to run your software as localhost, for instance to the port 4000:
echoSocket = new Socket("localhost", 4000);
Upvotes: 0