0

如何使用 SimpleXML 将这样的 SOAP 响应转换为 php 数组?

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <eWAYHeader xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
      <eWAYCustomerID>9******5</eWAYCustomerID>
      <Username>ac****@si****.com.sand</Username>
      <Password>*******</Password>
    </eWAYHeader>
  </soap:Header>
  <soap:Body>
    <CreateRebillCustomerResponse xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
      <CreateRebillCustomerResult>
        <Result>Success</Result>
        <ErrorSeverity />
        <ErrorDetails />
        <RebillCustomerID>60066328</RebillCustomerID>
      </CreateRebillCustomerResult>
    </CreateRebillCustomerResponse>
  </soap:Body>
</soap:Envelope>
4

1 回答 1

3

你可能想看看SoapClient类呢?它会省去很多麻烦。

于 2012-06-20T19:36:32.157 回答