Last post Feb 20, 2010 12:41 PM by msman88
Jan 10, 2007 01:08 PM|Sweeperq|LINK
I'm just getting started with web services and have a few questions. Almost all of the web service examples I have seen are part of a .NET project (presentation and web service layers are combined). I found one article that showed how to create a web reference
to another service and it worked great in Visual Studio.
If I were to create a web service that will be consumed by php, asp, .net, java, etc., what is the ideal way to transfer data between the web service and the client apps?
For example, if I was in the administrative interface and wanted to return a list of Countries and their properties [Country(ID, Abbr, Name, ShipTo, Active)]... Can I return a generic list of countries (e.g. IList <Country>), should I return it as a .NET
DataSet/DataTable, or as something else? How do asp/php/java know what a collections/DataSets/DataTables look like? How would they pass the information back?
Jan 10, 2007 03:03 PM|Nullable|LINK
The reponse is returned in soap.. (so it's just XML)... so ASP, PHP, ColdFusion, Java and .NET can handle it however the feel like :)
Jan 10, 2007 04:02 PM|Sweeperq|LINK
So, for instance, if I return an IList <Country> and each Country in the list has an IList <Province>... it will automatically serialize the structure to XML/SOAP? I assume the party using the Web Service would then use the WDSL to reconstruct the objects
from the XML on their end?
Thanks for your response,
Jan 10, 2007 08:31 PM|Nullable|LINK
Yeah, that's up to them to do. What you can do is build your web-service... then take a look at it in Internet Explorer.... Visual Studio should allow you to "test" it in a browser, and you'll see the XML that it returns.
Jan 11, 2007 12:51 AM|webdevl|LINK
Yes you can return complex types from a webservice however if you are going to be pulling other languages into the mix there are things you should be aware or. Things are sometimes lost in translation. Here are a couple article that might be useful on
Jan 11, 2007 09:32 AM|Sweeperq|LINK
Feb 20, 2010 12:41 PM|msman88|LINK
Could I have a webservice return value in shape of text only not xml