php soap maxoccurs = unbounded

时间:2012-08-31 16:14:47

标签: php soap wsdl

我有WSDL,

<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输出未显示did或flowID的任何标记。

如果发送未绑定的数据,请提供帮助。

3 个答案:

答案 0 :(得分: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);

其中一个尚未经过测试......

答案 1 :(得分:0)

将maxOccurs设置为有界

确切地说,请发布完整的源代码

答案 2 :(得分:0)

//You should try to send like this

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


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

$result = $client->yourSoapOperation($arOperationFilter);
相关问题