Hello all,
I have asked this question in another thread :
I have misunderstood the task, basically I need to create a server based on this WSDL file.
How can I achieve this ? Thank you.
Hello all,
I have asked this question in another thread :
I have misunderstood the task, basically I need to create a server based on this WSDL file.
How can I achieve this ? Thank you.
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).
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
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.
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: