Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Problem in a webservice!!! [modified]

Problem in a webservice!!! [modified]

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kmuthuk
    wrote on last edited by
    #1

    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.

    E L 2 Replies Last reply
    0
    • K kmuthuk

      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.

      E Offline
      E Offline
      ednrgc
      wrote on last edited by
      #2

      try something like this: public class MyClass : Microsoft.Web.Services2.WebServicesClientProtocol,IMyClass IMyClass is an interface you declare for your class.

      1 Reply Last reply
      0
      • K kmuthuk

        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.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups