WebServices and classes
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I'll preface this by saying that I'm a Webservice novice. I get the concept, but I know next to nothing about the details. It's something I need to remedy, especially with SOA/WCF/etc. That being said... I have two Web Site Projects. One is exposed to the other as different webservices. I have a class in the service project that I'd like to consume in the other project. This class contains properties and methods. I've noticed a few things:
- The class won't be exposed in the wsdl unless it's used by the asmx.cs file. Simply having the class in the same assembly doesn't mean anything.Is that correct?
- When I use the class as a return type of one of the service's web methods, it's defined in the wsdl as a compex type bt with no fields or methods. Is this because the service will only expose the fields of the class (i.e. not the properties or the methods)?
- Assuming the above to be true, is there any way for my consumer project to consume this class and use its methods without exposing the methods in the web service? Or am i going about this the wrng way entirely?
Thanks for your help.