Posts Tagged Php Web Service

Nusoap header authentification

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>’;

$result = $client->call($function, array(‘parameters’ => $params), ”, ”,$headers, true);

, , , , , , , , , ,

No Comments