2012-04-22 18 views
0

私はnewSettingsと呼ばれる配列の文字列フィールドを持つSOAP Webサービスを持っています、それはnusoapを使用して文字列の通常の配列として送信しようとしていますが、php + nusoapでarryofstringを送信

マイコード:

$settings=array('password','composefontsize'); 
$param=array(
'EmailAddress'=> $userEmail, 
'newSettings' => $settings 
); 

$response=$this->client->call("GetRequestedUserSettings",$param); 

私のXML要求:

<?xml version="1.0" encoding="ISO-8859-1"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6388="http://tempuri.org"> 
<SOAP-ENV:Body><GetRequestedUserSettings xmlns="http://tempuri.org/"> 
<AuthUserName>admin</AuthUserName> 
<AuthPassword>XXXX</AuthPassword> 
<EmailAddress>[email protected]</EmailAddress> 
<requestedSettings></requestedSettings> 
</GetRequestedUserSettings> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>" 

更新:私は$settings = array('string' => $value1,...)とそれを固定し、

+0

ソリューションは回答として受け入れられるはずです。 :) – Alfabravo

答えて

0

あなたにはSOAP呼び出しをラップすることができます:あなたはWSDL仕様またはサーバー時間を満たしていないいずれかの場合は、問題を認識できるでしょう

try { 
    // ... 
} catch (SoapFault $e) { 
    echo $e->faultcode; 
} 

この道を。私はこれをSOAPを使用する際に必要と考えています。

+0

webserviceは要求を受け入れますが、newSettingsタグは空ですので、配列が認識されません。 – nathanr

+0

私はそれを固定して、おめでとう – ther