通过PHP更新WSDL中的值

时间:2019-04-22 11:18:00

标签: php soap wsdl

我想从wsdl下面更新NUMBER的值:

<subscriberProfile>
<!--Zero or more repetitions:-->
<entry>
   <!--Optional:-->
   <key>NUMBER</key>
   <!--Optional:-->
   <value>23546</value>
</entry>
</subscriberProfile>

用于更新此内容的php脚本是:

<?php
try {
  $client = new SoapClient("http://urlwsdl/services/SubscriberService?wsdl",  array('trace' => 1));
  $data = $client->wsUpdateSubscriberProfile(array('IMEI' => '123456789', 'subscriberID' => '6282818964330'));
  print_r($data);
} catch (SoapFault $fault) {
   trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
   exit();
}

但是上面的脚本没有发送此部分:

<subscriberProfile>
<!--Zero or more repetitions:-->
<entry>
   <!--Optional:-->
   <key>NUMBER</key>
   <!--Optional:-->
   <value>23546</value>
</entry>
</subscriberProfile>

并给我答复:

<return>
    <responseCode>401</responseCode>
    <responseMessage>Subscriber profile not received</responseMessage>
</return>

任何想法,如何解决?

0 个答案:

没有答案