// 创建SOAP客户端对象
$
client
= new SoapClient(
'http://your_webservice_url'
, array(
'trace'
=>
1
))
// 添加SOAP头到客户端对象
$
header
= new SoapHeader(
'http://your_namespace_url'
,
'AuthHeader'
,
$soap_header
)
$client->__setSoapHeaders($header)
// 调用您的SOAP操作
$
result
=
$client
->your_soap_operation()
请确保将
your_username
和
your_password
替换为实际用于身份验证的用户名和密码。另外,将
http://your_namespace_url
替换为您SOAP头的命名空间URL。