Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate a wsdl file of a wcf service library project?

I have a few Wcf service library projects (not Wcf service application) in my solution. I have to give the .wsdl files of the projects to my collegue who will consume the services.

How can I do that?

Thanks in advance,

like image 558
anilca Avatar asked Feb 03 '12 12:02

anilca


2 Answers

You can use the WCF Service Host to start a new instance of your service, and then add ?wsdl to the service address to access the wsdl (http://localhost:1234/MyService.svc?wsdl for instance).

WcfSvcHost's syntax is the following:

WcfSvcHost.exe /service:<PathToServiceDLL> /config:<PathToServiceConfig>
like image 146
vc 74 Avatar answered Oct 13 '22 13:10

vc 74


Follow these steps:

  1. Go to IIS add new application under the default web site.(alias:test physicalPath: c:\test), dont press test connection
  2. On your wcf project right click and run publish choose your new application on IIS.
  3. Goto IIS to test application, right click on the svc file and browse - its open IE.
  4. On the url address on the IE add to the address ?wsdl. and ENTER it.

good luck

like image 41
Ziv.Ti Avatar answered Oct 13 '22 11:10

Ziv.Ti