When invoking a web service in J2EE, in any of the ways mentioned below :
SAAJ API - SOAPConnection.invoke
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.