我想为SOAPMessage实现GZIP。
下面是普通的SOAP客户端调用代码-
// 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);
如何在上述代码中实现SOAPMessage中的GZIP。
我在谷歌上搜索过,但没有找到有用的东西。
请建议如何实现它SOAPMessage。