内置Soap扩展php5作为关联数组传入参数
我想把这个xml传递给这个web服务函数内置Soap扩展php5作为关联数组传入参数,php,Php,我想把这个xml传递给这个web服务函数 <UserName>myuser</UserName> <Password>password</Password> <User> <AddCoverCode /> <title>sdadasdsa</title> </User> </CreateNewUser>','',array(),'document', 'li
<UserName>myuser</UserName>
<Password>password</Password>
<User>
<AddCoverCode />
<title>sdadasdsa</title>
</User>
</CreateNewUser>','',array(),'document', 'literal');
我希望这不是真正的服务的真正密码。我也有类似的问题。看看我的答案:
array('CreateNewUser' => array(
'UserName' => 'sc',
'Password' => 'i82372',
'Registration' => array('username' =>'new','password' =>'ss'));
$client = new SoapClient($url);
$params = array( 'UserName' => 'sc', 'Password' => 'i82372', 'Registration' => array('username' =>'new','password' =>'ss' );
$res = $client->createUser($params);