File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Keep-Alive Header and Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Keep-Alive Header and Web Services" Watch "Keep-Alive Header and Web Services" New topic
Author

Keep-Alive Header and Web Services

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Hello all,

I have got the below question.

When invoking a web service in J2EE, in any of the ways mentioned below :

  • SAAJ API - SOAPConnection.invoke
  • Dispatcher Interfaces
  • SEI - Generated by tools such as wsimport


  • My question is, can I make many web service invocations utilizing the same socket connection, without having to open and close a Socket a connection every time I invoke a web service. If I am to call the web service directly using the standard socket APIs, I would add a header which is
    [Connection: Keep-Alive] so to keep the connection opened and to be used later on.

    This is applicable in the various web service APIs mentioned in the list below that are available in the J2EE.

    Many thanks in advance.

    SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
    Life is the biggest school
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Keep-Alive Header and Web Services