PHP SoapClient get gzip wsdl

sadulLa

New Member
My SoapClient cant open a gzipped wsdl file directly. Feel free to take a look at the WSDL your self, I think its public (https://www.ad-juster.com/api_sandbox/api/dre-api.wsdl)I tried a bunch of settings like\[code\]$client = new SoapClient("https://www.ad-juster.com/api_sandbox/api/dre-api.wsdl", array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 9));\[/code\]But it doesn't work. I also tried almost every combination of php's Zlib functions, and only gzfile() worked.This is my very hackey work around that I really dont like:\[code\]$file = fopen('/tmp/tmp.wsdl', 'w+');$input = gzfile('https://www.ad-juster.com/api_sandbox/api/dre-api.wsdl');foreach ($input as $line) { fwrite($file, $line);}fclose($file);$client = new SoapClient('/tmp/tmp.wsdl', array('location' => 'https://www.ad-juster.com/api_sandbox/api/'));\[/code\]Can anyone recommend a better way to do this?
 
Back
Top