Connecting Tech Pros Worldwide Help | Site Map

Return DataTable from WCF service to PHP client

Newbie
 
Join Date: Mar 2009
Posts: 5
#1: Aug 4 '09
Hi all!

I am creating a WCF service (my first). I am going to have a variety of clients, one of which is a PHP client.

Now, I've already established that I can return a normal string to the PHP client as wellas an array of strings. I also want to return a DataTable object in such a way that the PHP client will be able to understand the DataTable. Thus far, when a DataTable is returned to the PHP client, the result is one long continuous string with all the data that is in the DataTable.

How can I return a DataTable from my service so that the PHP client will be able to understand it?
Newbie
 
Join Date: Mar 2009
Posts: 5
#2: Aug 4 '09

re: Return DataTable from WCF service to PHP client


Or to put it better, I would like to enable the PHP client to receive any complex data type that the WCF service may return.

Can anyone please help?
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,081
#3: Aug 5 '09

re: Return DataTable from WCF service to PHP client


Have you tried using XML Serialization on the DataTable?
This should produce an XML file that you could parse in your PHP code.
Reply

Tags
complex, datatable, php client, wcf