2012-08-31 14 views
6

我有WSDL,PHP皁maxOccurs的無界=

<xs:complexType name="merchantDetails"><xs:sequence> 
<xs:element maxOccurs="unbounded" minOccurs="0" name="did" nillable="true" type="xs:string"/> 
<xs:element maxOccurs="unbounded" minOccurs="0" name="flowid" nillable="true" type="xs:string"/> 

我試圖如下(的var_dump)發送的數組。

object(merchantDetails)#3 
    ["did"]=> 
    array(1) { 
    [0]=> 
    string(8) "81985801" 
    } 
    ["flowid"]=> 
    array(1) { 
    [0]=> 
    string(16) "MerchantMOTOMID1" 
    } 

__getLastRequest輸出不顯示任何標記爲沒有或flowID

如果發送未綁定的數據,請幫忙。

+4

你需要提供更多信息 - WSDL可能會有所幫助,以及您的提交代碼,以及您收到的確切錯誤 – ernie

回答

0

設置的maxOccurs爲界

準確的說,請把你的完整的源代碼

1

之後應該做的伎倆,如果我正確讀取WSDL指令。發佈所需的SOAP請求將是非常有益...

$param = array(
    'did'=>'81985801', 
    'flowid'=>'MerchantMOTOMID1' 
) 


$soap_instance->merchantDetails($param); 

$param = new stdObject(); 
$param->did = '81985801'; 
$param->flowid = 'MerchantMOTOMID1'; 

$soap_instance->merchantDetails($param); 

其中任意一個沒有經過測試...

0
//You should try to send like this 

$arOperationFilter = array(
    'did' => array('81985801','81985802','...') 
); 


$client = new SoapClient($your_url, $arSoapOptions); 

$result = $client->yourSoapOperation($arOperationFilter); 
+2

嗨,謝爾蓋。感謝您的貢獻,但請您解釋問題的癥結所在,以及您的代碼爲何解決此問題。代碼 - olny答案不鼓勵。 – Vincent

+0

A **好的答案**將總是解釋所做的事情以及爲什麼這樣做,不僅是爲了OP,而且是爲了將來SO的訪問者。 –