I created the jax-ws client by running the command:
C: \ wsdl> wsimport -keep -verbose -d generated HealthMobilitySequenceArtifacts.wsdl
Service address in wsdl file:
soap: address location = "http: // localhost: 8585 / active-bpel / services / HealthMobilitySequence
Well, I packed the generated files in the jar ( clentjaxw.jar ), and I use it as an imported library in the eclipse project for some tests.
The fact is that I can do my tests without problems, but when I provide clientjaxw.jar to a colleague, at runtime it has the following error:
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput (Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process (Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest (Unknown Source)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest (Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber .__ doRun (Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun (Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun (Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync (Unknown Source)
at com.sun.xml.internal.ws.client.Stub.process (Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess (Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke (Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke (Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke (Unknown Source)
at $ Proxy29.bookTreatment (Unknown Source)
at test.TestJaxWS.main (TestJaxWS.java:32)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect (Native Method)
at java.net.PlainSocketImpl.doConnect (Unknown Source)
at java.net.PlainSocketImpl.connectToAddress (Unknown Source)
at java.net.PlainSocketImpl.connect (Unknown Source)
at java.net.SocksSocketImpl.connect (Unknown Source)
at java.net.Socket.connect (Unknown Source)
at java.net.Socket.connect (Unknown Source)
at sun.net.NetworkClient.doConnect (Unknown Source)
at sun.net.www.http.HttpClient.openServer (Unknown Source)
at sun.net.www.http.HttpClient.openServer (Unknown Source)
at sun.net.www.http.HttpClient. (Unknown Source)
at sun.net.www.http.HttpClient.New (Unknown Source)
at sun.net.www.http.HttpClient.New (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream (Unknown Source)
... 15 more
I do not understand the problem: nevertheless, the college can visualize the service in the browser at this address, and also starts ping localhost. Moreover, I checked that it is not behind the proxy.
Do you have some ideas about the cause of the problem?
UPDATE: I have to add new data: I found that the college has access to the browser through: http: // localhost: 8585 / active-bpel / services / HealthMobilitySequence? Wsdl , but if it tries to access: http: //127.0. 0.1: 8585 / active-bpel / services / HealthMobilitySequence? wsdl or the same URL with an IP address instead of the local host, it fails. On my machine, I do not have such a problem, I can access with all the features: localhost, machine name, 127.0.0.1, ipaddress.
So, I think this may be a problem, I mean, I can imagine that through java the URL http: // localhost: 8585 / active-bpel / services / HealthMobilitySequence is translated before opening the java socket , in the new one, using the ip address (or 127.0.0.1) instead of the local host, and access failure. Thus, it seems that the problem is related to the operating system, since we share the exact same configuration as part of the operating system (win xp on my machine, Vista on our own).
Some ideas? Thanks
UPDATE: Hi, for some reason, changing the machine (always 64 bits), the college solved the problem that I described. In any case, he has another problem that is not client dependent, since he experienced the same thing, causing the use of eclipse web explorer. The exception is the following: java.lang.ClassCastException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.Envelope1_1Impl cannot be passed to java.lang.String
org.apache.axis.SOAPPart.getAsString(SOAPPart.java:554) org.apache.axis.SOAPPart.writeTo(SOAPPart.java:322) org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269) org.apache.axis.Message.writeTo(Message.java:539) org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902) org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
Please note that the web service it invokes calls one of the bpel processes deployed to ActiveBPEL (version 5.0.2) running in Tomcat 5.5.27. In addition, its configuration is as follows: OP: windows 7, jdk: 1.6, arch: 64 bits, while mine: OP: windows xp, jdk: 1.6, arch: 32 bits. Do you have any idea about the problem?
Thank you in advance