473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Best way to return a ADO.NET dataset to a PHP SOAP client?

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

Mar 2 '06 #1
1 3633
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


Mar 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
2
by: Steve | last post by:
I developed a desktop app that reads an XML file into a dataset. (The desktop app has the XML schema built in, so it already knows what format the XML file should be in.) My problem is that I...
4
by: Brian Keating | last post by:
wonder if anyone can help me here, i've a framework 1.1 dataset which i serialize in framework 1.1 and deserialize in framework 2.0. This is fine, problem is that i want to modify some of the...
0
by: Sham Ramakrishnan | last post by:
guys... I have a SOAP service at my clients that I have to use to call the exposed methods... well... there are supposedly 3 ways in which I can look at doing it... 1. Create a proxy for the...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
3
by: GBR | last post by:
I have a collection object inherited from collection base that is used to carry my object entities from server to client through a web service. I want to add a dataset to this collection object and...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
3
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links...
2
by: Ben Joyce | last post by:
Hi all. I'm confused as to what the best or expected approch is to Web Service design under .Net, mainly with regards to Methods and Parameters. This is a bit awkward to explain so please bear...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.