2009-09-10 20 views
1

我有這樣的XML我想傳遞給這個Web服務功能內置SOAP擴展PHP5傳遞PARAMS作爲關聯數組

<UserName>myuser</UserName> 
<Password>password</Password> 
<User> 
    <AddCoverCode /> 
    <title>sdadasdsa</title> 
</User> 
</CreateNewUser>','',array(),'document', 'literal'); 

我使用SOAP擴展BUIT在PHP5。

這是我應該作爲參數傳遞的soapcall函數嗎?

array('CreateNewUser' => array(
    'UserName' => 'sc', 
    'Password' => 'i82372', 
    'Registration' => array('username' =>'new','password' =>'ss')); 
+1

我希望這不是從一個真正的服務真正的密碼。 – rogeriopvl 2009-09-10 18:08:03

+0

我有一個類似的問題。看看我的回答: http://stackoverflow.com/questions/3803688/barnes-and-noble-seller-soap-api-using-php/3830405#3830405 – Samuel 2010-09-30 12:29:06

回答

0
$client = new SoapClient($url); 

$params = array('UserName' => 'sc', 'Password' => 'i82372', 'Registration' => array('username' =>'new','password' =>'ss'); 

$res = $client->createUser($params);