CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2017
    Posts
    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.

  2. #2
    Join Date
    Aug 2017
    Posts
    36

    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
  •  





Click Here to Expand Forum to Full Width

Featured