Home > PHP, Tips > gzip nusoap requests

gzip nusoap requests

December 17th, 2008 Leave a comment Go to comments

Recently for a project involving travelport xml api integration, we badly needed the soap requests to be gzipped, since the technical support people suggested. Also we were aware of the benefits of using gzEncoded data when transmitting through the Internet. For the same we checked the wid internet searching with all sort of combinations of gzip nusoap request. Speaking from the inner view, we already had developed a handful of classes to abstract the SubmitXML api provided by Galelio Travelport. And frankly were reluctant to trash all the code already written.
At this point, we swam through the whole code of nusoap.php; should say thanks to easyeclipse, and made some minor tweaks here and there. The following was all that was required, though I doubt if this would be a generic solution, this definitely serves our purpose and the versions we used are 0.7.3/Revision: 1.114.

in class soap_transport_http added property gzipRequests (line 2148)
var $gzipRequests = true; // gzip any requests..

in function buildPayload at the top (line 2799)
$data = gzencode($data);

in function sendRequest (about line 2874), just in case the request is using curl
$data = gzencode($data);

Categories: PHP, Tips Tags:
  1. Saravanan
    June 14th, 2011 at 13:25 | #1

    Hello, I have been searching the forum help on Galelio Webservice integration over PHP and nusoap since they provide Java,perl and .net support. Still I am not sure, Is that PHP supports 100% with Galelio webservice?. there is no further activity on this thread and comments. Could you please help me on the basic information on PHP Galelio Webservice? I am from chennai and I tried to connect you on linked in too..

  2. July 19th, 2011 at 14:25 | #2

    As I have replied on linkedin, I am at a situation not to reveal more than what is already on the site. This holds true since the domain knowledge was transferred on NDA. Though at the beginning wsdl2php helped a lot, we finally switched to php curl and manual xml generation using simple xml. The coding was done using our framework http://www.phpmf.org. Flight search was built as a wordpress plugin, and wordpress is used for most of the portals.

  1. No trackbacks yet.

ninety five − eighty seven =