tags:

views:

5065

answers:

4

Hello all,

I have asked this question in another thread :

My question

I have misunderstood the task, basically I need to create a server based on this WSDL file.

How can I achieve this ? Thank you.

A: 

basically you need to construct the host? if so my friend that simply is reverse engineering through wsdl you can get the interface, method signatures but there is no way you can reverse engineer code from it. wsld doesn't contain business logic.. it's Web Service Description Language... which points you to web service reference (endpoint, interfaces etc).

Usman Masood
+7  A: 

Using svcutil, you can create interfaces and classes (data contracts) from the WSDL.

svcutil your.wsdl (or svcutil your.wsdl /l:vb if you want Visual Basic)

This will create a file called "your.cs" in C# (or "your.vb" in VB.NET) which contains all the necessary items.

Now, you need to create a class "MyService" which will implement the service interface (IServiceInterface) - or the several service interfaces - and this is your server instance.

Now a class by itself doesn't really help yet - you'll need to host the service somewhere. You need to either create your own ServiceHost instance which hosts the service, configure endpoints and so forth - or you can host your service inside IIS.

Marc

marc_s
I tried the same with svcutil, but didn't really succeed with faults. Do you maybe have some suggestions to my problem: http://goo.gl/dlen
Juri
+4  A: 

You could use svcutil.exe to generate client code. This would include the definition of the service contract and any data contracts and fault contracts required.

Then, simply delete the client code: classes that implement the service contracts. You'll then need to implement them yourself, in your service.

John Saunders
+6  A: 

There are good resources out there if you know what to search for. Try "Contract First" and WCF. or "WSDL First" and WCF.

Here is a selection:

Cheeso
To anyone who follows the *Basic overview of WSDL-First* article: Take note of the comment that talks about `ReplyAction="*"`. It appears you need to get rid of that. There is a trail of explanations from that comment that gives the reasoning, but I haven't read it.
dangph