Weird behaviour receiving a pdf content from a webservice nusoap
I am not sure but it could be related to allowed memory size in PHP. Just try to increase and test it. You can edit it either from php.ini
or from .htaccess
(not suggested).
php.ini
example:
memory_limit = 256M
.htaccess
example:
php_value memory_limit 256M
P.S. You can change 256
whatever memory you need.
$paramWSDLS = array( 'soap_version' => SOAP_1_1, 'encoding' => 'ISO-8859-15', 'cache_wsdl' => WSDL_CACHE_NONE, 'exceptions' => false, 'trace' => true, 'style' => SOAP_DOCUMENT, 'use' => SOAP_LITERAL);$wsclient = new SoapClient('http://'.$this->ip.'/arcdoc/WebServiceServer.php?wsdl', $paramWSDLS );$parametros = array( 'xxxx' => 'xxxxxx', 'xxxx2' => base64_encode('xxxxx2'), 'xxxx3' => utf8_decode('xxxxx3'), 'xxxx4' => utf8_decode('xxxxx4'), 'showMask' => false);$response = $wsclient->__soapCall('GetDoc', $parametros );
Don't know why but using this SoapClient solved this problem.