Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I have developed a .NET Web Service that require a Username and Password be sent in the SOAP Header. The SOAP Header is a class in the Web Service called "AuthenticationHeader".
The problem occurs when a PHP Client using nuSOAP wants to call the Web Service, the user is not authenticated. I am not a PHP fundi, but the code that PHP developer sent me don't seem to send the credentials at the right time. I might be wrong, that's why I ask for help. Here's he's code:
$client= new soapclient($wsdl,'wsdl', true);
$client->username = $userName;
$client->password = $passWord;
$err = $client->getError();
This is urgent, your help will be highly appreciated.
I got the same Problem. Using a specific WebService it is reqired to send a <ServiceAuthHeader> within the SOAP:HEADER
I solved the Problem like this (PHP), setting requestHeaders(), because setCredentials didn't work (I think setCredentials is for basic HTTP Authetication)::
$client->$requestHeaders = "<ServiceAuthHeader xmlns=\"http://www.interhome.com/services\"><Username>".$soap_user."</Username><Password>".$soap_pass."</Password></ServiceAuthHeader>";