Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAPClient function unable to parse HTTP transport compressed response from SOAP service #16

Closed
rsarvas opened this issue Aug 14, 2013 · 2 comments

Comments

@rsarvas
Copy link

rsarvas commented Aug 14, 2013

This is more of an issue with jQuery.ajax than with your code, but I noticed on large XML responses sent from my services HTTP transport compression started to kick in and previously working SOAP requests started to cause JavaScript errors due to the "xhr" var not being defined correctly, causing parts of the "xhr.always" function to fail. I've attempted to modify the "Accept-Encoding" in both the jQuery ajax "headers" and "beforeSend" sections, but the value appears to either be read only or overridden by the browser on send.

Partial packet sniffer example output below:

POST /service_api/cgi-bin/Generic_SOAP_Handler.pl HTTP/1.1

Host: [removed]:8080

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0

Accept: application/xml, text/xml, */*; q=0.01

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip, deflate

Connection: keep-alive

Content-Type: text/xml; charset=UTF-8

Method: POST

SOAPAction: BuildPipeline

X-Requested-With: XMLHttpRequest

Referer: http://[removed]:8080/service_api/

Content-Length: 512

Cookie: s_lv=1355332687625; __qca=P0-266234781-1355332659993

Authorization: Basic aGEgaGEsIEkgbWFkZSB5b3UgbG9vayAtIG5vIHBhc3N3b3JkIGhlcmU=

Pragma: no-cache

Cache-Control: no-cache



<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><tns:BuildPipeline xmlns:tns="http://www.example.org/Pipeline/"><tns:Subject><tns:fedoraObjectAndDataStreamSubject><tns:pid>demo:6</tns:pid><tns:dsID>OBJ</tns:dsID></tns:fedoraObjectAndDataStreamSubject></tns:Subject><tns:Options><tns:context><tns:item>IngestTestImage</tns:item><tns:item>MIMEType/image/tiff</tns:item><tns:item>SendVarsToEmail</tns:item></tns:context></tns:Options></tns:BuildPipeline></soap:Body></soap:Envelope>HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Encoding: deflate

SOAPServer: SOAP::Lite/Perl/0.715

Content-Type: text/xml;charset=utf-8

Content-Length: 4019

Date: Wed, 14 Aug 2013 16:26:05 GMT

x....[]s........._........y.......V6......*..T...\D>..D...._.z.0..ht7..
.
.
.
[lots more binary data]
.
.
.
g}.......Z..5.Gg..zap..........z#............

Disabling HTTP transport compression on the SOAP server resolves the issue.

@doedje
Copy link
Owner

doedje commented Aug 26, 2013

Interesting, thanx for posting this. I labeled this issue 'information' and will keep it open for others to see and hopefully help them!
=]

@doedje
Copy link
Owner

doedje commented Sep 12, 2013

(I'll close this issue.... people will find it in the closed issues section.)

@doedje doedje closed this as completed Sep 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants