PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Having some small trouble accessing a protected web service, hopefully someone can help me out - I'm sure I'm just missing something simple here.
Basically, I need to construct the following SOAP message in PHP. I have no trouble with the bottom part, the actual request, its attached the auth header that's tripping me up. Anybody know how to do this?
class AuthHeader
{
public $username;
public $password;
public function __construct()
{
$this->username = "JED";
$this->password = "JEDI2003";
}
}
$client = new soapclient('$wsdl');
$ns = 'http://tempuri.org/';
$AuthHeader = new AuthHeader;
$header = new SoapHeader($ns, "AuthHeader", new AuthHeader, false);
$client->__setSoapHeaders(array($header));
$client->login(array("thestring" => "hellloooo nurse"));
var_dump($client);