Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Soap服务器返回字符串_Php_Soapserver - Fatal编程技术网

Php Soap服务器返回字符串

Php Soap服务器返回字符串,php,soapserver,Php,Soapserver,当我在从soap服务器返回时通过_udorequest xml方法发送请求时,我得到了字符串 string(490) " 0Message0000 " 当我通过soapCall传递数组时,我得到了我想要的xml对象 object(stdClass)#2 (2) { ["Headers"]=> object(stdClass)#3 (2) { ["Code"]=> int(0) ["Message"]=> string(7) "Messa

当我在从soap服务器返回时通过_udorequest xml方法发送请求时,我得到了字符串

string(490) "
0Message0000
"
当我通过soapCall传递数组时,我得到了我想要的xml对象

object(stdClass)#2 (2) {
  ["Headers"]=>
  object(stdClass)#3 (2) {
    ["Code"]=>
    int(0)
    ["Message"]=>
    string(7) "Message"
  }
  ["Item"]=>
  object(stdClass)#4 (9) {
    ["LocalID"]=>
    int(991)
    ["ItemID"]=>
    int(0)
    ["SItemID"]=>
    int(0)
    ["UOM"]=>
    string(3) "UOM"
    ["ItemName"]=>
    string(8) "ItemName"
    ["ItemDescription"]=>
    string(15) "ItemDescription"
    ["Local"]=>
    string(5) "Local"
    ["Synonyms"]=>
    object(stdClass)#5 (1) {
      ["Synonym"]=>
      object(stdClass)#6 (2) {
        ["SynonymValue"]=>
        string(12) "SynonymValue"
        ["Contractor"]=>
        int(0)
      }
    }
    ["Properites"]=>
    object(stdClass)#7 (1) {
      ["Property"]=>
      object(stdClass)#8 (2) {
        ["PropertyKey"]=>
        string(11) "PropertyKey"
        ["PropertyValue"]=>
        string(13) "PropertyValue"
      }
    }
  }
}
此请求的我的服务器方法:

public function GetItemData($parametersIn) {
    srand((double) microtime() * 1234567);
    $xml = 'XML'; // my response in xml
    $parametersOut = simplexml_load_string($xml);
    return $parametersOut;
}

为什么当我使用doRequest时会得到这个奇怪的字符串?如何将其转换为数组或对象

您在浏览器中查看的是隐藏XML标记的输出。使用页面上的view source查看真正的内容。

或者,XML不是XML,而是XML,这一事实又如何呢

这意味着simplexml\u load\u字符串将不会返回XML