Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting Connection and Read time outs for SOAPConnection

843833Oct 2 2008
Below is the code I am using to connect to a web service. I need to set connection timeout and read timeout for the SOAP Connection. I have the solution with using system properties. But my project demands the solution without using system properties. I have gone through google and found the below page

http://forums.sun.com/thread.jspa?threadID=5117465&messageID=9404850

which is useful but I am confused to implement. So help me out in solving this issue.


protected SOAPMessage sendSOAPRequest(SOAPMessage message, String recipient) throws Exception {

URL urlEndpoint = new URL(recipient);

SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();

SOAPConnection con = scf.createConnection();

SOAPMessage replyMessage = con.call(message, urlEndpoint);
return replyMessage;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2008
Added on Oct 2 2008
0 comments
348 views