我可以通过soapCall获得属性值吗?

时间:2019-01-29 03:27:11

标签: php xml soap

我这样称呼肥皂:

 $context = stream_context_create([
    'ssl' => [
    'verify_peer'       => false,
    'verify_peer_name'  => false,
    'allow_self_signed' => true
    ]
 ]);
 $soapClient = new SoapClient('my_url', [
     'connection_timeout' => '60',
     'stream_context'     => $context,
     'trace'              => 1,
     'cache_wsdl'         => WSDL_CACHE_NONE
 ]);
 $response = $soapClient->__soapCall('create', array($soapParameters));

结果应该是这样的:

<SOAP>
  <BEGIN>
    <STATUS Value="OK">
    <CATEGORY Value="12">
  </BEGIN>
</SOAP>

但这是结果: {  “开始”:{    “状态”:””,    “类别”:””   } }

0 个答案:

没有答案