I want to implement GZIP for SOAPMessage. Below is normal SOAP client call code -
// Create a new SOAP message from the factory and set the SOAPAction header.
MessageFactoryImpl factory = new MessageFactoryImpl();
SOAPMessage soapMsg = factory.createMessage();
// Set the SOAP envelope contents to our ebXML DOM.
SOAPPart part = soapMsg.getSOAPPart();
part.setContent(new DOMSource(docSoapReq));
// Create a SOAPConnection to send the SOAP request on.
SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
SOAPConnection con = conFactory.createConnection();
// Point to the service we want to call, and then call it.
// Store the response in the "reply" object.
URLEndpoint endPoint = new URLEndpoint(serviceURL);
SOAPMessage reply = con.call(soapMsg, endPoint);
con.close();
return (reply);
How i can implement GZIP in SOAPMessage in above mentioned code. I did google for this but haven't found any useful things.
Please advise how can i implement it SOAPMessage.