having multiple classes with WebMethods in single WebSerivce??

Discussion in 'ASP .Net Web Services' started by Farooq Khan, Dec 20, 2003.

  1. Farooq Khan

    Farooq Khan Guest

    hi everybody,
    i'm writing a web srevice having some functionality [WebMethods] that
    logically shouldnt be the part of a single class. i tried using multiple
    classes in the same .asmx.cs file (webservice). those classes are supposed
    to have WebMethods of their own. but i cannot do that. the problem is that i
    can only expose (as i have seen) single class having WebMethods.
    let me know if i'm right about that?? and if i am, is there any way to do
    that?? i just want to have different WebMethods in logically different
    classes, all combined in single webservice.
    Thanks.

    Best Regards,
    Farooq Khan
     
    Farooq Khan, Dec 20, 2003
    #1
    1. Advertising

  2. Farooq Khan

    BruceJohnson Guest

    Only one class in an asmx file can expose web methods. However, from an
    architectural perspective, I always felt it best to keep that class
    down to a minimum. So all of the business logic should be in separate
    classes anyway. But that's just one man's opinion. :)

    Bruce Johnson
    http://www.ObjectSharp.com/Bruce

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    BruceJohnson, Dec 20, 2003
    #2
    1. Advertising

  3. Farooq Khan

    Farooq Khan Guest

    thanks Bruce,
    That's what i thought of...anyway....thanks for ur help!!

    Best regards,
    Farooq Khan


    "BruceJohnson" <> wrote in message
    news:...
    > Only one class in an asmx file can expose web methods. However, from an
    > architectural perspective, I always felt it best to keep that class
    > down to a minimum. So all of the business logic should be in separate
    > classes anyway. But that's just one man's opinion. :)
    >
    > Bruce Johnson
    > http://www.ObjectSharp.com/Bruce
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Farooq Khan, Dec 20, 2003
    #3
  4. Farooq Khan

    Simon Gorski Guest

    Hello Farooq,
    look at this article....might help you...

    http://www.15seconds.com/issue/031215.htm

    simon g.

    "BruceJohnson" <> schrieb im Newsbeitrag
    news:...
    > Only one class in an asmx file can expose web methods. However, from an
    > architectural perspective, I always felt it best to keep that class
    > down to a minimum. So all of the business logic should be in separate
    > classes anyway. But that's just one man's opinion. :)
    >
    > Bruce Johnson
    > http://www.ObjectSharp.com/Bruce
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Simon Gorski, Dec 22, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hans

    webserivce reference without default url

    Hans, Jan 27, 2004, in forum: ASP .Net Web Services
    Replies:
    9
    Views:
    169
  2. doron

    Exposing a webserivce (Biztalk)

    doron, Sep 1, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    106
    Michael Nemtsev
    Sep 2, 2005
  3. Replies:
    0
    Views:
    117
  4. Kjartan Furnes

    calling axis webserivce with credentials in header

    Kjartan Furnes, Jan 3, 2008, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    614
    Roman Gallauner
    Jan 26, 2008
  5. Raymond

    ASP connect to dot net SOAP webserivce

    Raymond, Dec 14, 2006, in forum: ASP General
    Replies:
    0
    Views:
    118
    Raymond
    Dec 14, 2006
Loading...

Share This Page