Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Keep-Alive Header and Web Services  RSS feed

Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!