A
asis.morodo
Hey guys,
I am connecting to a supllier via SOAP that sends me with the price
list zipped inside an xml message. I can connect and I can retrieve
the xml information (see the message, save the content, etc...)
however i am unable to unzip the information contained in the tag
here is my code:
<code>
<?php
$client = new SoapClient("mywsdl service",array('trace' => 1));
$call = $client->__soapCall("Cliente",
array('Cliente'=>array('ncliente'=>"user",'pss'=>"password")));
//Some debugging
echo("\r\nCabecera de la solicitud:\n" .$client-
echo("\r\nSolicitud:\n".$client->__getLastRequest());
echo("\r\nCabecera de Respuesta:\n" . $client-
echo ("\r\nRespuesta:" . $client->__getLastResponse());
$myFile = "prueba.zip";
$fh = fopen($myFile, 'wb');
fwrite($fh, $call->ClienteRespuesta);
fclose($fh);
?>
</code>
When i try to open the file with zip i get an error. the file has
1024kb so I know there is info in there but i just dont know how to
access it. I have also tried to base64_decode manually before the SOAP
parses the info with no luck.
Thank you for any help.
I am connecting to a supllier via SOAP that sends me with the price
list zipped inside an xml message. I can connect and I can retrieve
the xml information (see the message, save the content, etc...)
however i am unable to unzip the information contained in the tag
here is my code:
<code>
<?php
$client = new SoapClient("mywsdl service",array('trace' => 1));
$call = $client->__soapCall("Cliente",
array('Cliente'=>array('ncliente'=>"user",'pss'=>"password")));
//Some debugging
echo("\r\nCabecera de la solicitud:\n" .$client-
__getLastRequestHeaders());
echo("\r\nSolicitud:\n".$client->__getLastRequest());
echo("\r\nCabecera de Respuesta:\n" . $client-
__getLastResponseHeaders());
echo ("\r\nRespuesta:" . $client->__getLastResponse());
$myFile = "prueba.zip";
$fh = fopen($myFile, 'wb');
fwrite($fh, $call->ClienteRespuesta);
fclose($fh);
?>
</code>
When i try to open the file with zip i get an error. the file has
1024kb so I know there is info in there but i just dont know how to
access it. I have also tried to base64_decode manually before the SOAP
parses the info with no luck.
Thank you for any help.