Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Should WebMethod argument be DataSet or XML object for cross platform?

Status
Not open for further replies.

mb22

Programmer
Sep 4, 2002
258
US
I am creating a web service.... and one of the web methods it will contain expects a DATASET as argument in order to produce a complex report! Say.. example

Public Class ProduceReportService
<WebMethod()>Public Function ProduceReport(ds as DataSet)
as Integer

...... some code to generate a report

End Function
End Class

The problem is I want this service to be available to any application that wants to use it. Now the DATASET object is a .NET object ... so presumable if say a Java developer wanted to use this service they cannot pass a Dataset object. (i don't know ... even though a dataset has some underyling XML ).

If I want to make the argument an XML object instead, how will I code it differently so that any application can call this service .. by me just suppling them the XML schema.
What is the best approach.... or will the DataSet work with any platform?

1. Should they create their own XML file on their own server, then maybe I have a URL as the argument pointing to the location of their input XML file.?

2.Can they actually send the XML in an HTML file? Say 2 or 3 tables with a total of about say ... up to 12 records.

Please help... just an idea about how I can go about it. What if the XML schema changes... say a new field is added to one table later ... how do I accomodate that?

thanks soo much!

Please provide example with an XML file with maybe 2 tables info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top