Creating Web service from the interface (WSDL)

J

James Bradley

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
 
R

richlm

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top