6

我有 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

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

4

3 回答 3

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

其中任何一个都没有经过测试...

于 2012-10-24T19:20:41.693 回答
0

将 maxOccurs 设置为有界

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

于 2012-09-21T04:17:45.760 回答
0
//You should try to send like this

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


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

$result = $client->yourSoapOperation($arOperationFilter);
于 2017-03-14T13:23:53.730 回答