You could parse the dataset returned from the database into another dataset
then return the resulting product. For example, you return a dataset with 1
table with columns name, phone, address. Since client A is calling,
determine this however you have planned, we create a new datatable, copy the
2 datacolumns we want into a new datatable, add that to a new dataset and
return it. I don't think you can serialize a datatable, at least I never
could, so the need for putting the new table into a new dataset. Client B,
same deal just include the address as well. If you are sending any sizeable
amounts of data through you web services, I would strongly recommend using
WSE and creating a compression/decompression extension. After it serializes
the data into XML, you'll have more data fluff then a gallon of Cool Whip.
It'll speed up your app immensely.
HTH
Todd
"asha" <as**@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
Hi, I am new to .net so excuse me.
I need to create mutiple webservices (for multiple clients). The
webmethods
would essentially have the same parameters except for the return values.
say
they pass us an id, then depending on webserice called I might need to
return
values, if client A calls methodA then just return name and phone but for
client B calling methodA return name,phone and adress.. I want some
reuasability in code (since I read the same data from database each time
but
some other processing differ) and want to return the output as custom
object.
I have been trying to use abstract class to define all the webmethods..
not
very successful ..
If I create a custom object having all possible fields is it possible to
hide the non-required fields (i.e. Address when client A access the
service
for them), should I return XMLDocument..
what is the best design pattern for webservice..