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. Web services and c#

Web services and c#

Scheduled Pinned Locked Moved C#
csharpwcfbusinesshelpquestion
3 Posts 2 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.
  • E Offline
    E Offline
    ez2
    wrote on last edited by
    #1

    I not sure which is the best forum to place this question in so I will start here. I have an web application that has a business logic layer consisting of serveral files in c#. I want to expose some of those methods in the files via a web service. I belive I can expose them using the [WebMethod] attribute. Now, I can also generate an asmx (web service)file for the web services but I can not for the life of me figure out how the asmx file is supposed to find out about the webmethods in the business logic layer. Any suggestions. I can easily create an asmx file and write the code directly into the file but that defeats the purpose (i.e. now I have the same logic in two places) Please any help would be great.

    N 1 Reply Last reply
    0
    • E ez2

      I not sure which is the best forum to place this question in so I will start here. I have an web application that has a business logic layer consisting of serveral files in c#. I want to expose some of those methods in the files via a web service. I belive I can expose them using the [WebMethod] attribute. Now, I can also generate an asmx (web service)file for the web services but I can not for the life of me figure out how the asmx file is supposed to find out about the webmethods in the business logic layer. Any suggestions. I can easily create an asmx file and write the code directly into the file but that defeats the purpose (i.e. now I have the same logic in two places) Please any help would be great.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      The .asmx can be created in VS.NET where you can create a Web Service. The beauty in this is that you should also be able to allow VS.NET to create the wdsl portion, which exposes the methods available through the web services. Take a look at the wsdl that Chris has created for the XML web service that is up and running now. Code Project WSDL Contents HTH Nick Parker

      E 1 Reply Last reply
      0
      • N Nick Parker

        The .asmx can be created in VS.NET where you can create a Web Service. The beauty in this is that you should also be able to allow VS.NET to create the wdsl portion, which exposes the methods available through the web services. Take a look at the wsdl that Chris has created for the XML web service that is up and running now. Code Project WSDL Contents HTH Nick Parker

        E Offline
        E Offline
        ez2
        wrote on last edited by
        #3

        Hi Nick, Yes I understand that and have been able to do just that. My question is how does one create a web service (asmx file) that supports multiple classes in different .cs files? When creating an asmx file, you can associate a codebehind page but it seems to be able to support only one .cs file and one class. I want the codebehind page to show multiple cs files and multiple classes. (Does this make sense?) Can this be done? I might be missing something here so if you can elaborate, that would be great. For example, the link that you provided for the codeproject web service provides an asmx file in which the methods all reside in a single class. What I want is the ability to support mehtods from multiple cs files and choose multiple methods from classes within those cs files. Hopefully this makes sense.

        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