Nate Bross
Well-known member
Im just wondering what the best practice for Web Service design is. For example, lets say I am creating an RSS Reader.
If I were creating a Class Library (dll) project, I would have two classes.
1) A class to download and process RSS XML feeds.
2) A Data class to hold all the data (Title, Description, OriginalURL, etc)
Now the first class would have a method like GetRSS(String URL) and it would return an array of the data class (arraylist, collection or something along these lines); however, with a Web Service I cannot return an arraylist of User Defined Objects, so what is the best practice?
Secondly, what is the best organization of code in a 2005 Web Service, and how do I reference it in my client application?
For example, I have these two classes above, so that creates two *.asmx files, with two separate .cs files in the App_Code directory. In the client, do I make a reference to both .asmx files?
Thanks in advance!
If I were creating a Class Library (dll) project, I would have two classes.
1) A class to download and process RSS XML feeds.
2) A Data class to hold all the data (Title, Description, OriginalURL, etc)
Now the first class would have a method like GetRSS(String URL) and it would return an array of the data class (arraylist, collection or something along these lines); however, with a Web Service I cannot return an arraylist of User Defined Objects, so what is the best practice?
Secondly, what is the best organization of code in a 2005 Web Service, and how do I reference it in my client application?
For example, I have these two classes above, so that creates two *.asmx files, with two separate .cs files in the App_Code directory. In the client, do I make a reference to both .asmx files?
Thanks in advance!