function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Turning Outbound Soap message into sObject?

Ok, I'm currently playing around with the Workflow Outbound messaging, sending the messages to a PHP script. Using an old SF proof-of-concept, I'm reading the SOAP via the following: Code:
$data = fopen('php://input', 'rb');
$contents = stream_get_contents($data);
Now this is a pretty simplistic way of reading it, but it does work. Using regular expression, I can nab the Session ID and the Partner URL out of the $contents string, and this is all good and happy. Now comes the tricky part... Code:
    <sObject xsi:type="sf:Opportunity" xmlns:sf="">
This is a small part of the SOAP message I've pinched from the $contents string also.

Now while it's easy to just collect the data in the tags, what I really want is to be able to stuff this into a sObject and get my field data through the object, so I won't need to use regex to collect every single field I need to work with one-by-one.

Anyone have any experience in this? A little demo code would be much appreciated.