Creating Web service from the interface (WSDL)

Discussion in 'ASP .Net Web Services' started by James Bradley, Oct 6, 2003.

  1. Hello all,

    I am new to .NET and web services so any guidance is appreciated!

    I have created a (C#) web service the .NET way, creating the code
    first and having .NET auto generate the WSDL. This was pretty
    straightforward, and after adding a few atrributes to clean up the
    SOAP requests and responses, I have a nice interface.

    Now, what I want to do is lock down the interface (WSDL) and code to
    that, not the other way around. So, I grabbed a copy of the WSDL and
    started a new solution.

    I have two projects, one a simple project that builds the abstract
    class for the webservice (WSDL /Server), and the other which includes
    the .CS from that. I then derive from this base class and implement
    my service. I have copied all of the attributes and prototypes
    straight from the base class. I have changed the namespace/class
    structure to more accurately represent the final resting place for
    this service.

    Now, when I add a test project and attempt to add a Web Reference to
    my service, it fails. I select my .WSDL through localhost, and the
    response is "The specified module could not be found". I have no idea
    what the real problem is here, but the IIS log is showing two entries,
    401 then 500 for the WSDL. I'm not sure what authorization problem I
    am having to access the WSDL, and I don't know how to find any details
    beyond this message.

    Do I still need an ASMX page, or is this irrelevant now that I am
    working from the WSDL?

    Does anyone know of some tutorials on doing this kind of thing? All I
    can find are articles based on code --> interface for .NET, now the
    other way around.

    I really hope that I can do this, because I want to have my interface
    locked down and I will soon need to deal with nillable value types :-(

    Thanks for any help you can give!

    Jami
    James Bradley, Oct 6, 2003
    #1
    1. Advertising

  2. James Bradley

    richlm Guest

    Hi James

    First I think you are taking an excellent approach! One
    of the best ways to fully understand web services is to
    start with the WSDL, and you are sort of going that route.

    I think the article:
    "Place XML Message Design Ahead of Schema Planning to
    Improve Web Service Interoperability" from MSDN magazine
    might help - link at
    http://msdn.microsoft.com/msdnmag/issues/02/12/webservices
    design/default.aspx

    Please let us know if it helps.

    Richard.

    >-----Original Message-----
    >Hello all,
    >
    >I am new to .NET and web services so any guidance is

    appreciated!
    >
    >I have created a (C#) web service the .NET way, creating

    the code
    >first and having .NET auto generate the WSDL. This was

    pretty
    >straightforward, and after adding a few atrributes to

    clean up the
    >SOAP requests and responses, I have a nice interface.
    >
    >Now, what I want to do is lock down the interface (WSDL)

    and code to
    >that, not the other way around. So, I grabbed a copy of

    the WSDL and
    >started a new solution.
    >
    >I have two projects, one a simple project that builds

    the abstract
    >class for the webservice (WSDL /Server), and the other

    which includes
    >the .CS from that. I then derive from this base class

    and implement
    >my service. I have copied all of the attributes and

    prototypes
    >straight from the base class. I have changed the

    namespace/class
    >structure to more accurately represent the final resting

    place for
    >this service.
    >
    >Now, when I add a test project and attempt to add a Web

    Reference to
    >my service, it fails. I select my .WSDL through

    localhost, and the
    >response is "The specified module could not be found".

    I have no idea
    >what the real problem is here, but the IIS log is

    showing two entries,
    >401 then 500 for the WSDL. I'm not sure what

    authorization problem I
    >am having to access the WSDL, and I don't know how to

    find any details
    >beyond this message.
    >
    >Do I still need an ASMX page, or is this irrelevant now

    that I am
    >working from the WSDL?
    >
    >Does anyone know of some tutorials on doing this kind of

    thing? All I
    >can find are articles based on code --> interface

    for .NET, now the
    >other way around.
    >
    >I really hope that I can do this, because I want to have

    my interface
    >locked down and I will soon need to deal with nillable

    value types :-(
    >
    >Thanks for any help you can give!
    >
    >Jami
    >
    >.
    >
    richlm, Oct 11, 2003
    #2
    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. Dark
    Replies:
    1
    Views:
    4,610
    milfar
    Nov 14, 2008
  2. Chris Bedford
    Replies:
    0
    Views:
    565
    Chris Bedford
    Aug 21, 2003
  3. Bert Leu
    Replies:
    1
    Views:
    449
    Cowboy \(Gregory A. Beamer\)
    Nov 23, 2007
  4. Stephen Edgecombe

    WSDL.EXE: WSDL Import Directive

    Stephen Edgecombe, Aug 13, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    229
    Stephen Edgecombe
    Aug 13, 2003
  5. Bert Leu

    Creating a Web Service (Service, not Client) from WSDL

    Bert Leu, Nov 23, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    263
    Cowboy \(Gregory A. Beamer\)
    Nov 23, 2007
Loading...

Share This Page