获取对xml的SOAP响应

时间:2018-07-31 10:15:53

标签: php xml soap

Stack Overflow充满了类似这样的问题,我知道。但是,所有问题和公认的答案都没有为我解决。

我收到这样的SOAP响应:

string(402482) "ZSDSD1BKA00_DE_02DE00010000001083212550JVBERi0xLjUNJeLjz9MNCjExNCAwIG9iag08PC9MaW5lYXJpemVkIDEvTCAxMDgzMjEvTyAxMTYv RSAxODY2Mi9OIDEyL1QgMTA3Nzk3L0ggWyA1MDMgMjc2XT4+DWVuZG9iag0gICAgICAgICAgICAg DQoxMzQgMCBvYmoNPDwvRGVjb2RlUGFybXM8PC9Db2x1bW5zIDQvUHJlZGljdG9yIDEyPj4vRmls dGVyL0ZsYXRlRGVjb2RlL0lEWzwxREZGRkVGMUM4Q0E0NTI4QjBBMUYxOUEyNTMwREQ2OD48RURD QTlGRDBFNTE4N0M0N0JGRUZCOEM0MjlCRTUwMjE+XS9JbmRleFsxMTQgMzZdL0luZm8gMTEzIDAg Ui9MZW5ndGggOTMvUHJldiAxMDc3OTgvUm9vdCAxMTUgMCBSL1NpemUgMTUwL1R5cGUvWFJlZi9X WzEgMiAxXT4+c3RyZWFtDQpo3mJiZBBgYGJg/g0kGEKABONRIMHiCiSYNEASK0DEG5AEP4i4CZKI ABHiQEJIDyTWDiL+AwmuVhCLDaTDCsQtBHHZgcReIMHIwAiyg4GRIuI/Y9NngAADAOlxDEINCmVu ZHN0cmVhbQ1lbmRvYmoNc3RhcnR4cmVmDQowDQolJUVPRg0KICAgICAgICAgDQoxNDkgMCBvYmoN PDwvRmlsdGVyL0ZsYXRlRGVjb2RlL0kgMjE3L0wgMjAxL0xlbmd0aCAxODcvUyAxNDM+PnN0cmVh bQ0KaN5iYGBgZmBg8mZgZWDg38PAx4AAfEAZVgYWBo6qZQyMDAwCDNf1/NQ/HVzCrMDAO79pAssO rrZJjgW7zB7nbQCqZvMMlpJUbfRmmsaqwzPpwFIQCyjGNI2BvaIBhBoqgIipAkyzAzFW04AG+TMw TgYZKATEwmCHtDP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zzfhPf2tnp5HEl4/iOPQWLAatwSLMzsLC2y/NdfSVboLbnXP8nXqkjLd2buPi00NTMw YewP8V1ipuKm1s3yid5XdZHmxvTNovEBzLxJ82w5Kde5JozGjS7+IWF7M1yKYOts01Q1/d67hLki RhPXHDj4Y7msVlm5pt+yclJus06fZfW2mT6lNfHE3gEm+fHZfU7bJVwIGj//aBBMUj9rg6qDBr5X 

...但更长。

然后,我使用simplexml_load_string对其进行转换,从而导致一个看似空的对象。现在,我知道该对象不是空的。 print_rvar_dump没有帮助,我使用了simplexml_tree.php来获得帮助。但是我现在对如何访问结果中的属性一无所知。我尝试了一堆不同的变体,其中的大多数都使我留了空白页或错误500。

这是我期望的答复:

enter image description here

像我所写的那样,尝试访问属性ORBLK并进行了许多更改都没有成功。多数民众赞成在我目前的尝试(导致空白页):

$resultRow = (string)$xml->children('soap-env', true)->Body->children('n0', true)->Z_SDB_GET_SDB_FOR_MATERIALResponse->T_SDB->item->DOKAR;

如何访问属性 ORBLK

0 个答案:

没有答案