note 98658 deleted from soapclient.soapclient by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:49:49 +0000 |
| Subject: | note 98658 deleted from soapclient.soapclient by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218070@lists.php.net to get a copy of this message | ||
Note Submitter: marcovtwout at hotmail dot com
----
If your WSDL file containts a parameter with a base64Binary type, you should not use base64_encode()
when passing along your soap vars. When doing the request, the SOAP library automatically base64
encodes your data, so otherwise you'll be encoding it twice.
WSDL snipplet:
<element name="content" type="base64Binary"
xmime:expectedContentTypes="*/*"/>
<?php
$string = 'data_you_want_to_send___like_xml_in_soap';
$soap_data = array(
'foo' => 'bar',
//'content' => base64_encode($string ) // don't do this
'content' => $string //do this
);
$response = $client->Send($soap_data);
?>