Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Compression with SOAP::Lite

by mohan2monks (Beadle)
on Apr 08, 2011 at 06:02 UTC ( #898266=perlquestion: print w/ replies, xml ) Need Help??
mohan2monks has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

When i try to connect to a web service using compression in SOAP::Lite i am receiving 500 as error on one machine which was installed currently while the same code works on the old machine.

I have compared the headers sent from both the machines which are same. Please see the trace report generated by SOAP::Lite debug method for both the machines

SOAP::Transport::HTTP::Client::send_receive: POST https://webservices. +xxxx.com/B2BGateway/service HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Accept-Encoding: gzip Content-Encoding: gzip Content-Length: 614 Content-Type: text/xml; charset=utf-8 SOAPAction: http://webservices.xxxx.com/SubmitXml compressed data here Content-Length header value was wrong, fixed at /usr/lib/perl5/site_pe +rl/5.8.8/LWP/Protocol/http.pm line 190. SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver Error Connection: close Date: Fri, 08 Apr 2011 04:54:01 GMT Server: Apache-Coyote/1.1 Content-Length: 1683 Content-Type: text/html;charset=utf-8 Client-Date: Fri, 08 Apr 2011 04:57:21 GMT Client-Peer: 10.1.1.4:3128 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate +Authority Client-SSL-Cipher: RC4-MD5 Client-SSL-Warning: Peer certificate not verified Title: Apache Tomcat/6.0.29 - Error report <html><head><title>Apache Tomcat/6.0.29 - Error report</title><style>< +!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-col +or:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;c +olor:white;background-color:#525D76;font-size:16px;} H3 {font-family: +Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-siz +e:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;backgr +ound-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white +;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;ba +ckground:white;color:black;font-size:12px;}A {color : black;}A.name { +color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP + Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exce +ption report</p><p><b>message</b> <u></u></p><p><b>description</b> <u +>The server encountered an internal error () that prevented it from f +ulfilling this request.</u></p><p><b>exception</b> <pre>java.io.IOExc +eption: Not in GZIP format java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java: +137) java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.jav +a:58) java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.jav +a:68) com.cendant.tds.soa.framework.gateway.filter.ExpandedRequest.& +lt;init&gt;(ExpandedRequest.java:56) com.cendant.tds.soa.framework.gateway.filter.ExpansionFilter.d +oFilter(ExpansionFilter.java:71) com.cendant.tds.soa.framework.gateway.filter.ForwardFilter.doF +ilter(ForwardFilter.java:73) </pre></p><p><b>note</b> <u>The full stack trace of the root cause is +available in the Apache Tomcat/6.0.29 logs.</u></p><HR size="1" nosha +de="noshade"><h3>Apache Tomcat/6.0.29</h3></body></html> <html><head><title>Apache Tomcat/6.0.29 - Error report</title><style>< +!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-col +or:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;c +olor:white;background-color:#525D76;font-size:16px;} H3 {font-family: +Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-siz +e:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;backgr +ound-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white +;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;ba +ckground:white;color:black;font-size:12px;}A {color : black;}A.name { +color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP + Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exce +ption report</p><p><b>message</b> <u></u></p><p><b>description</b> <u +>The server encountered an internal error () that prevented it from f +ulfilling this request.</u></p><p><b>exception</b> <pre>java.io.IOExc +eption: Not in GZIP format java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java: +137) java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.jav +a:58) java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.jav +a:68) com.cendant.tds.soa.framework.gateway.filter.ExpandedRequest.& +lt;init&gt;(ExpandedRequest.java:56) com.cendant.tds.soa.framework.gateway.filter.ExpansionFilter.d +oFilter(ExpansionFilter.java:71) com.cendant.tds.soa.framework.gateway.filter.ForwardFilter.doF +ilter(ForwardFilter.java:73) </pre></p><p><b>note</b> <u>The full stack trace of the root cause is +available in the Apache Tomcat/6.0.29 logs.</u></p><HR size="1" nosha +de="noshade"><h3>Apache Tomcat/6.0.29</h3></body></html> #----------Working Trace----------------------- SOAP::Transport::HTTP::Client::send_receive: POST https://webservices. +xxxx.com/B2BGateway/service HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Accept-Encoding: gzip Content-Encoding: gzip Content-Length: 614 Content-Type: text/xml; charset=utf-8 SOAPAction: http://webservices.xxxx.com/SubmitXml # compressed data here ----- SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Connection: close Date: Fri, 08 Apr 2011 05:48:35 GMT Server: Apache-Coyote/1.1 Content-Encoding: gzip Content-Type: text/xml;charset=utf-8 Client-Date: Fri, 08 Apr 2011 05:46:14 GMT Client-Peer: 216.113.156.105:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate +Authority Client-SSL-Cipher: RC4-MD5 Client-SSL-Warning: Peer certificate not verified Client-Transfer-Encoding: chunked
Please help.

Comment on Compression with SOAP::Lite
Download Code
Re: Compression with SOAP::Lite
by Corion (Pope) on Apr 08, 2011 at 06:27 UTC
Re: Compression with SOAP::Lite
by mohan2monks (Beadle) on Apr 08, 2011 at 07:48 UTC
    I have tried with installing latest version of Compress::Zlib but the error persists.
    Is downgrading the version recommended?
      Is downgrading the version recommended?

      No, verifying the data sent with something like gzip is recommended

        As this data is sent by SOAP::Lite/LWP, i am not sure how to do it?
        Please advice how do i do it?
        I get the desired result if i dont use options=>{compress_threshold =>1000} in the client.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://898266]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-12-25 02:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls