I am trying to get some information about directory structure etc. via an XML web service. I have starting writing the webservice but not really got much of an idea about the "Returning data" bit!!! I have all the code to interate through directories/files
and get properties but how do I form this into something that a client I develop can access fine!!
If I were in your position, On Web service end I would have created an object(Class) which stres the data as I needed. Then I would have return that object(Serialized) from webmethod. On Client end, I woudl have accepted the data into that object(Deseralize)
and used it.
What would be the best way about this as for each folder I want the name of that folder and number of files to be passed. I have all of these variables so the wuestion is not obtaining them but just the best way to pass them out!
Hi Leeus i can understand that you have all the information, make a class that uses all the information that u have gathered and that would serialize into an xml like this below file1.txt 1111 file2.txt 1111 ................ the clien can consume this.
Exactly it, I was going to post something like that, how do I serialize it into that though??? I have a for and next loop, this seems to be causing me grief!!! I also need to get my head round this class stuff, any FAQ's??????
Check below example I tried to show in a small example how you can do serialize a class http://www.w3coder.com/contest/examples/WSObjMultiArr.asmx http://www.w3coder.com/contest/examples/WSObjMultiArr.asmx.txt http://www.w3coder.com/contest/examples/WSObjSer.Asmx
http://www.w3coder.com/contest/examples/WSObjSer.Asmx.txt Those should give you starting poient on how to solve your problem!
Leeus
Member
60 Points
12 Posts
XML Web Service an IO
Aug 19, 2003 08:58 PM|LINK
SreedharK
All-Star
18571 Points
3119 Posts
MVP
Re: XML Web Service an IO
Aug 19, 2003 11:07 PM|LINK
http://www.w3coder.org
weblog http://weblogs.asp.net/skoganti
Leeus
Member
60 Points
12 Posts
Re: XML Web Service an IO
Aug 20, 2003 07:16 PM|LINK
SreedharK
All-Star
18571 Points
3119 Posts
MVP
Re: XML Web Service an IO
Aug 20, 2003 11:40 PM|LINK
http://www.w3coder.org
weblog http://weblogs.asp.net/skoganti
badinar
Member
280 Points
59 Posts
Re: XML Web Service an IO
Aug 21, 2003 03:21 PM|LINK
Leeus
Member
60 Points
12 Posts
Re: XML Web Service an IO
Aug 21, 2003 06:28 PM|LINK
SreedharK
All-Star
18571 Points
3119 Posts
MVP
Re: XML Web Service an IO
Aug 21, 2003 09:46 PM|LINK
http://www.w3coder.org
weblog http://weblogs.asp.net/skoganti
Leeus
Member
60 Points
12 Posts
Re: XML Web Service an IO
Aug 22, 2003 06:04 AM|LINK