What I was referring to by 'keep-alive' can be seen in the code in the following link. In the Request SOAP Message, there's a line that says: "Connection: keep-alive".
https://coderanch.com/t/221967/Web-Services/java/SAAJ-Invalid-Content-Type-Exception I have code somewhat similar to that at the above link except that the Request SOAP Message is created using the SOAP API. For example, the connection and message are defined as follows:
------------------------------------------------
SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();
SOAPConnection con = scFactory.createConnection();
MessageFactory factory = MessageFactory.newInstance();
message = factory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader soapheader = envelope.getHeader();
SOAPBody body = envelope.getBody();
message.setProperty(SOAPMessage.WRITE_XML_DECLARATION,"true");
message.setProperty(javax.xml.soap.SOAPMessage.CHARACTER_SET_ENCODING , "utf-8");
-----------------------------------
My question is whether there is a method in the SOAP API that can set the conection to "keep-alive".
Thanks.