note 93460 added to soapclient.setsoapheaders

From: Date: Thu, 10 Sep 2009 19:58:15 +0000
Subject: note 93460 added to soapclient.setsoapheaders
Groups: php.notes 
Request: Send a blank email to php-notes+get-160437@lists.php.net to get a copy of this message
To create complex SOAP Headers, you can do something like this: Required SOAP Header: <soap:Header> <RequestorCredentials xmlns="http://url.for.the.namespace/"> <Token>string</Token> <Version>string</Version> <MerchantID>string</MerchantID> <UserCredentials> <UserID>string</UserID> <Password>string</Password> </UserCredentials> </RequestorCredentials> </soap:Header> Corresponding PHP code: <?php $ns = 'http://url.for.the.namespace/'; //Namespace of the WS. //Body of the Soap Header. $headerbody = array('Token' => $someToken, 'Version' => $someVersion, 'MerchantID'=>$someMerchantId, 'UserCredentials'=>array('UserID'=>$UserID, 'Password'=>$Pwd)); //Create Soap Header. $header = new SOAPHeader($ns, 'RequestorCredentials', $headerbody); //set the Headers of Soap Client. $soap_client->__setSoapHeaders($header); ?> ---- Server IP: 64.71.164.2 Probable Submitter: 69.26.213.2 ---- Manual Page -- http://www.php.net/manual/en/soapclient.setsoapheaders.php Edit -- https://master.php.net/note/edit/93460 Del: integrated -- https://master.php.net/note/delete/93460/integrated Del: useless -- https://master.php.net/note/delete/93460/useless Del: bad code -- https://master.php.net/note/delete/93460/bad+code Del: spam -- https://master.php.net/note/delete/93460/spam Del: non-english -- https://master.php.net/note/delete/93460/non-english Del: in docs -- https://master.php.net/note/delete/93460/in+docs Del: other reasons-- https://master.php.net/note/delete/93460 Reject -- https://master.php.net/note/reject/93460 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160437) next »