note 98658 added to soapclient.soapclient

From: Date: Tue, 29 Jun 2010 15:30:20 +0000
Subject: note 98658 added to soapclient.soapclient
Groups: php.notes 
Request: Send a blank email to php-notes+get-170550@lists.php.net to get a copy of this message
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); ?> ---- Server IP: 213.249.64.162 Probable Submitter: 77.168.47.142 ---- Manual Page -- http://www.php.net/manual/en/soapclient.soapclient.php Edit -- https://master.php.net/note/edit/98658 Del: integrated -- https://master.php.net/note/delete/98658/integrated Del: useless -- https://master.php.net/note/delete/98658/useless Del: bad code -- https://master.php.net/note/delete/98658/bad+code Del: spam -- https://master.php.net/note/delete/98658/spam Del: non-english -- https://master.php.net/note/delete/98658/non-english Del: in docs -- https://master.php.net/note/delete/98658/in+docs Del: other reasons-- https://master.php.net/note/delete/98658 Reject -- https://master.php.net/note/reject/98658 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170550) next »