yeah

搜索

计数器

64545

链接

php调用.net webservice 验证,调用难题

Dec 25, 2009 10:22:04 PM | Comments(1) | Category:PHP学习 | Tags:

1.soapHeader的构造

<soap:Header>
    <CredentialSoapHeader xmlns="http://YouXi.com.cn/">
      <ViaStr>string</ViaStr>
      <Md5Text>string</Md5Text>
    </CredentialSoapHeader>
</soap:Header>

构造代码:

 

 2.在调用.net webservice时,用一个参数 parameters 为要传入的参数 

<?php
$res = $client->__soapCall('ExistsUserByName', array('parameters'=>array('strUserName'=>$username)));
?>

<?php
$value = array(
    'ViaStr' => 'abc123',
    'Md5Text' => md5('abc123987654321')
);
$header = new SOAPHeader('命名空间', 'CredentialSoapHeader', $value, false);
?>