Posts Tagged Web Service
Nusoap header authentification
Posted by in PHP code on July 18th, 2009
A web service often need authentication where it needs username and password. You need to pass the header when calling the web service. Here’s an example for http://webservice.apm.com.au/Feed/ web service.
$headers = ‘<Authentication xmlns=”http://webservice.apm.com.au/Feed/”>
<User>youruser</User>
<Password>password</Password>
</Authentication>’;
<User>youruser</User>
<Password>password</Password>
</Authentication>’;
$result = $client->call($function, array(’parameters’ => $params), ”, ”,$headers, true);









