Problem in a webservice!!! [modified]
-
Hi guys I have created a webservice in VS2003, and I have some webmethods and classes in it. Those webmethods are shown in the client applicaiton after adding a web reference to it, but not the classes i created in web service. How do I make my classes in WS to display in the client application? Can anyone help in this? Here is the sample code: namespace WebserviceNS { public class MyService: System.Web.Services.WebService { [WebMethod] public void MyMethod() { //...// } } public class MyClass { public MyClass() { //...// } public void ClassMethod() { //...// } } } Here MyClass is not shown in the client side. Do I have to declare any attribute for displaying? Thanks Muthu.
-
Hi guys I have created a webservice in VS2003, and I have some webmethods and classes in it. Those webmethods are shown in the client applicaiton after adding a web reference to it, but not the classes i created in web service. How do I make my classes in WS to display in the client application? Can anyone help in this? Here is the sample code: namespace WebserviceNS { public class MyService: System.Web.Services.WebService { [WebMethod] public void MyMethod() { //...// } } public class MyClass { public MyClass() { //...// } public void ClassMethod() { //...// } } } Here MyClass is not shown in the client side. Do I have to declare any attribute for displaying? Thanks Muthu.
-
Hi guys I have created a webservice in VS2003, and I have some webmethods and classes in it. Those webmethods are shown in the client applicaiton after adding a web reference to it, but not the classes i created in web service. How do I make my classes in WS to display in the client application? Can anyone help in this? Here is the sample code: namespace WebserviceNS { public class MyService: System.Web.Services.WebService { [WebMethod] public void MyMethod() { //...// } } public class MyClass { public MyClass() { //...// } public void ClassMethod() { //...// } } } Here MyClass is not shown in the client side. Do I have to declare any attribute for displaying? Thanks Muthu.
Hi When you create a webservice and import it in another project as WebReference, a Wrapper - Dll is automatically created (similarly like when you reference a COM - Library). This Library Implements the WebService as Class AND all Types that are returned by any call of a Method of that webservice. so. if you have a class in your Web-Service -dll that is never returned (or used as Parameter) by a call of the webservice, you will not get this class on the client side. greets m@u