r/PHPhelp • u/thmsbrss • Feb 03 '26
Solved SOAP Response Object Tree from XML String
In a project we have a SOAP Service with about 500 generated Classes that are described in a WSDL. We are using WsdlToPhp for generating the PHP services, enums and structs. Everything is working fine so far.
We are storing the SOAP response - the raw XML - in a database. From time to time we need the information from the SOAP response. Which brings me to my question:
Is it possible to get the PHP object tree instantiated by an XML string (from the database) and not from a SOAP service call?
P.S. And with possible I mean something that is not too hacky.
View all comments
Show parent comment
1
u/thmsbrss Feb 03 '26
Thanks for the detailed answer. I'll definitely have to check this out.
Since the API is not under our control, versioning and the handling of possible breaking changes is the important question to discuss.
And since we already have XML only in our database and the app has to behave kind of backward compatible, the original question will maybe popup again.