Jan
Jan

Reputation: 113

Creating Platform Independent Web Services with Visual Studio

I am creating a web service in C# using Visual Studio 2010. I believe doing so generates a SOAP service. But my real question is what kinds of things should I avoid to ensure this web service is platform independent. I assume using parameters like DateTime would be bad, and returning types like DataSet or DataTable would also make non .NET clients unhappy.

Can someone shed some light on this?

Bonus: what is a good/quick/easy way to test a webservice to make sure it works outside of the .NET world?

Upvotes: 1

Views: 1447

Answers (3)

James Walford
James Walford

Reputation: 2953

In terms of simple data types you'd probably be best in sticking to what you can define with XML Schema. DateTime shouldn't be a problem, as long as it's formatted correctly. You can return complex data structures no problem, as long as you define it clearly. Just don't expect to be able top return an object serialized from asp.net and have someone able to plug it straight in when you return it to them :-)

If you haven't looked at WSDL then you might get something out of reading this: http://www.w3.org/TR/wsdl

Upvotes: 0

Seva Alekseyev
Seva Alekseyev

Reputation: 61388

DateTime is a part of SOAP. Datasets and datatables are more tricky; depending on client, it may come across as either XML or an ad-hoc dynamic data structure. PHP, if I recall correctly, does the latter.

Upvotes: 0

Related Questions