note 89956 added to soapclient.setsoapheaders
| From: | jayrajput at gmail dot com | Date: | Mon, 30 Mar 2009 21:07:08 +0000 |
| Subject: | note 89956 added to soapclient.setsoapheaders | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152629@lists.php.net to get a copy of this message | ||
With multiple SOAP headers, when using SoapVar for creation of SoapHeader the PHP code just
terminates (command terminated). I am not sure if that is a bug.
Without the SOAPVar the code worked fine for me
There are different way to creart SoapHeader I was using SoapVar and the code was not working. I am
still a novice with this SOAP stuff.
Tried using normal strings and it worked fine. SoapHeader can take SoapVar or string as the third
argument.
my code:
// first soap header.
$var = new SoapVar($header, XSD_ANYXML);
$soapHeader = new SoapHeader(NAME_SPACE, "Security", $var);
// second soap header.
$var2 = new SoapVar($header2, XSD_ANYXML);
$soapHeader2 = new SoapHeader(DIFF_NAME_SPACE, "ID", $var2);
$client = new SoapClient($wsdl, array("location" => $location));
$headers = array();
$headers[] = $soapHeader;
$headers[] = $soapHeader2;
// Here my code was just terminating.
$client->__setSoapHeaders($headers);
----
Server IP: 194.27.18.36
Probable Submitter: 199.72.20.100
----
Manual Page -- http://www.php.net/manual/en/soapclient.setsoapheaders.php
Edit -- https://master.php.net/note/edit/89956
Del: integrated -- https://master.php.net/note/delete/89956/integrated
Del: useless -- https://master.php.net/note/delete/89956/useless
Del: bad code -- https://master.php.net/note/delete/89956/bad+code
Del: spam -- https://master.php.net/note/delete/89956/spam
Del: non-english -- https://master.php.net/note/delete/89956/non-english
Del: in docs -- https://master.php.net/note/delete/89956/in+docs
Del: other reasons-- https://master.php.net/note/delete/89956
Reject -- https://master.php.net/note/reject/89956
Search -- https://master.php.net/manage/user-notes.php