aspose file tools*
The moose likes Web Services and the fly likes Web service client implementation (Connection refused error) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web service client implementation (Connection refused error)" Watch "Web service client implementation (Connection refused error)" New topic
Author

Web service client implementation (Connection refused error)

W. Salazar
Greenhorn

Joined: Apr 14, 2006
Posts: 7
Hello,
I have deployed a webservice on oc4j instance.

When I am trying to call a method of this webservice through java client I got this error.

SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect

I am able to test the Web Service from the test page!!! Everything OK

here what i do...


From main method...


Any help will be appreciate!!! thank before hand
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you tried to test your webservice using soapUI or similar (external) tool?
If the service is not accessible using soapUI, then your client may still be fine, but there may be some problem with the service.
I would prefer using a standalone test program instead of just the web service test page to make sure that the web service is accessible from somewhere outside of the server in which it is deployed.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
W. Salazar
Greenhorn

Joined: Apr 14, 2006
Posts: 7
Hi thank for you response...

I have already tested the web service with soapUI, oracle entreprise manager, et test page and the result is ok...

The web service is up, running and giving to me the good result

but i don't know what is the problem in my implementation.

Wendolin ...
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I notice that your client is using JAX-RPC.
Perhaps this is a stupid question, but is your web service also using JAX-RPC?
If in doubt, please supply the web service WSDL so I can have a look.
Best wishes!
W. Salazar
Greenhorn

Joined: Apr 14, 2006
Posts: 7
Cause:

1-wrong url pattern in wsdl

<servlet-mapping>
<servlet-name>BLAHBLAHBLAHBLAHSoapHttpPort</servlet-name>
<url-pattern>SAME_LIKE_NAME_NOT THE GOOD ONE</url-pattern>
</servlet-mapping>

2-location wrong
<soap:address location="http://999.99.99.99:NNNN/ServicesWeb/ServiceSecuriteSoapHttpPort"/>

3- THE BIG ONE .... The soap message format was Document/wrapped is just a simple call for get string as result...

Thanks Ivan...
W. Salazar
Greenhorn

Joined: Apr 14, 2006
Posts: 7
Close
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Web service client implementation (Connection refused error)