Nevermind. I figured it out.
In case any other newbies are wondering about this in the future:
You can just use:
Return dsWhatever
in your webservice. Note that this returns an *array* to PHP, not XML.
The XML you're expecting is containing within the "any" element of the
returned array (which also has a "schema" element.
So you on the PHP end, you can get the results and pull the XML out of
the array using:
$result = $client->GetAllContactNames()->GetAllContactNamesResult;
$xml = $result->any;
$xml = simplexml_load_string($xml);
//...and so on.
And you can parse it from there. Now, there are probably some handy
SOAP-related functions in PHP5 that make it easy to parse that XML, but
I haven't gotten that far yet.
adm
ad*****@yahoo.com wrote:
Hi, I've spent quite a bit of time looking into this, but am having
trouble finding a straighforward solution.
What is the best/recommended way to return an ADO.NET data set to a PHP
SOAP client?
I've been using stuff like:
Dim dsWhatever as Dataset
[...]
Return dsWhatever.GetXML
and that sends back a string of nice XML which I can parse without too
much trouble in PHP. It works fine, but it seems like there is probably
a better way to do this that I am not aware of.
Thoughts?
Thanks,
Alan