簡體   English   中英

內置Soap擴展php5,以關聯數組形式傳遞參數

[英]built in Soap extension php5 passing in params as associative array

我有這個XML,我想傳遞給此Web服務功能

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

我正在使用php5中的soap擴展buit。

這是我應該在soapcall函數中傳遞的參數嗎?

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM