Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes Connection time out error while generating web service client using SAAJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Connection time out error while generating web service client using SAAJ " Watch "Connection time out error while generating web service client using SAAJ " New topic
Author

Connection time out error while generating web service client using SAAJ

Amit Dewangan
Greenhorn

Joined: Apr 21, 2009
Posts: 2
Hi ,

I am trying to invoke webservice using SAAJ api client code. But while calling web service I am getting below error:
SEVERE: SAAJ0009: Message send failed
Error occurred while sending SOAP Request to Server
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:148)
at com.cgc.client.RemedySOAP.main(RemedySOAP.java:26)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:279)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:144)
... 1 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)


The problem is looks like due to proxy it is giving the connection time out error. I also set the proxy host in my code using AxisProperty.setProperty or System.setProperty method but still I am getting the sam error. Here is my code sample


// Create SOAP Connection
SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection = soapConnectionFactory.createConnection();
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "snx1-cprx");
System.setProperty("http.proxyPort", "8080");

// Send SOAP Message to SOAP Server
URL url = new URL("https://capgroup80-dev.onbmc.com/arsys/services/ARService?server=onbmc-s&webService=HPD_IncidentInterface_Create_WS");
SOAPMessage soapResponse = soapConnection.call(createSOAPRequest(), url);


I also tried to invoke the webservice through Axis 1.4 . In axis 1.4 I am getting connection time out error after setting the proxy using AxisProperty.setProperty or System.setProperty .


Please help me out how to set proxy in SAAJ api
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection time out error while generating web service client using SAAJ
 
Similar Threads
Problem with SAAJ when calling a web service
HTTPS soap call using SAAJ
java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:
Sending Soap requests thru Https
Intermittent CertificateException while accessing webservice through SAAJ