-
November 24th, 2017, 07:47 AM
#1
Soap message Gzip Content
Hello Experts,
I have the following Problem:
I create a Soapmessage using java.xml.soap
Now the Webservice changed to accept only gzip Requests.
What is the best way to gzip an existing Soapmessage ?
I tryed
Code:
mheaders.setHeader("SOAPAction", "submit"+this.action);
mheaders.setHeader("Accept-Encoding", "gzip,deflate"); // inbound
mheaders.setHeader("Content-Encoding", "gzip"); // outbound
and
Code:
soapMessage.setProperty(HTTPConstants.MC_GZIP_REQUEST, true);
soapMessage.setProperty(HTTPConstants.COMPRESSION_GZIP, true);
soapMessage.setProperty(HTTPConstants.MC_GZIP_RESPONSE, true);
soapMessage.setProperty(HTTPConstants.MC_ACCEPT_GZIP, true);
soapMessage.setProperty(HTTPConstants.CHUNKED, true);
soapMessage.setProperty(HTTPConstants.HEADER_TRANSFER_ENCODING, true);
a function like:
SOAPMessage getGzipSoapReq(SOAPMessage rawSoapReq){
...some Magic Stuff...
return gzippedSoapMessage
}
Thanks in advance for any kind of Information.
-
December 8th, 2017, 01:32 AM
#2
Re: Soap message Gzip Content
SOAP messages generated by both the sforce API client and the sforce API service can become very large. This can have adverse performance implications due to increased transmission and reception periods over the network. In the case of mobile devices on slow connections, this issue is magnified. Because increasing client performance capabilities is often much cheaper and easier than increasing network bandwidth, performing pre- and post-processing of SOAP messages to reduce their size is a reasonable solution.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|