I need to accept an unmodifiable SOAP message that includes some data. It is posted to my WSDL file and then PHP SoapServer. How can I extract specific data (wrapped in an xml key) in the message via my wsdl or php?
Data flow (actions are arrows, with the second arrow originating from the SoapServer.php bubble and receiving a response):
Turns out that the best way to do what I'm looking for is simply
file_get_contents("php://input")
.This is an easy way to trigger scripts by listening for POSTs. I simply point a service's webhook url to the script, which
file_get_contents("php://input")
, cast to anarray
, and thensimplexml_load_string()
to parse it and use one of the keys' data as the parameter for my script.