Sending a Soap Header with a WSDL Soap Request with PHP?

You should be able to create a header and then add it to the client so it is sent for all subsequent requests. You will probably need to change the namespace parameter.

You should be able to create a header and then add it to the client so it is sent for all subsequent requests. You will probably need to change the namespace parameter. $service = new SoapClient("localhost:16840/CTI.ConfigStack.WS/ATeam...); // Namespace Header Name value must-understand $header = new SoapHeader('tempuri.org/', 'AuthorisationHeader', $value, false); $service->__setSoapHeaders(array($header)); $service->AddPendingUsers($users, 3); // Example More information here.

$client = new SoapClient(PassportWebService); $apiauth =array('userName'=>HeaderName,'password'=>HeaderPassport,'ip'=>$onlineip); $authvalues = new SoapVar($apiauth, SOAP_ENC_OBJECT,'ReqHeader',"SoapBaseNameSpace"); $header = new SoapHeader("SoapBaseNameSpace","ReqHeader", $authvalues, true); $client->__setSoapHeaders(array($header)).

I am having a problem getting a custom soap header to work with PHP5. What I require is something like this: myusername mypassword What I get is : myusername mypassword I would like to remove the namespace tags. The code I use to get this is: class Authstuff { public $USER; public $PASSWORD; public function __construct($user, $pass) { $this->USER = $user; $this->PASSWORD = $pass; } } $auth = new Authstuff('myusername', 'mypassword'); $param = array('Authstuff' => $auth); $authvalues = new SoapVar($auth,SOAP_ENC_OBJECT); $header = new SoapHeader('http://soapinterop.org/echoheader/',auth,$authvalues).

2 @Dees: welcome to StackOverflow. Please read the FAQ (stackoverflow. Com/faq).

You'll find this is not a discussion forum. You should not "reply to an old thread". If you have a question that hasn't already been answered, then ask your own question, supplying your own details.Thanks.

– John Saunders Mar 26 '10 at 13:53.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions