Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web service client implementation (Connection refused error)

 
W. Salazar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
W. Salazar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Close
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic