如何在php中传递GZip流IN soapclient

时间:2016-11-10 19:22:20

标签: php soap-client

这里我使用的是WSDL服务。下面给出了我在php中访问soapclient服务的代码。我是使用soapclient服务的新手。

$params contains an array value and in that one value contains a base_64 encoded xml data

$client = new \SoapClient($url, array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
    'trace'=>1));
$response = $client->__soapCall('my_function', array($params));

当我调用服务时,我收到了错误

  

stdClass对象(       [my_functionResult] => GZip标头中的幻数不正确。确保传入GZip流。 )

我试图修复此问题但失败了。请帮我完成任务。 谢谢我的进步。

0 个答案:

没有答案