Reputation: 1954
How do I convert SOAP response like this to php array using SimpleXML?
<?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>
Upvotes: 0
Views: 1986
Reputation: 12244
You might want to look at SoapClient class then? It'll save HEAPS of trouble.
Upvotes: 3