Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to download all of the WSDL files exposed by a WCF service?

What is the best way to download all of the WSDL files exposed by a WCF service?

For example, the root WSDL file references the following other WSDL files:

<xsd:import schemaLocation="http://localhost:80/?xsd=xsd0" namespace="http://tempuri.com"/>
<xsd:import schemaLocation="http://localhost:80/?xsd=xsd1" namespace="http://tempuri.com"/>

Ideally it would be possible to automate the download so that every time the WSDL changes it would be easy to distribute the files to a customer or incorporate into a document/SDK.

like image 249
Thomas Bratt Avatar asked Nov 13 '08 09:11

Thomas Bratt


People also ask

How do I get full WSDL?

Examine the wsdl to find the <wsdl:import> tag and the url you want browse to obtain the entire WSDL will be in the "location=" attribute of the tag. Now just browse to the location highlighted above and you will have the complete WSDL for the Organization Service.

How do I download WSDL from Chrome?

In Chrome, pull up developer tools and go to the Network tab before you click the Generate button. Click the wsdl. jsp item and copy out of the Response tab. Start highlighting at the first character and then Ctrl+Shift+End.

What is WSDL file in WCF?

WSDL stands for Web Service Description Language. The WCF service exposes the WSDL document for the clients, to generate proxies and the configuration file. The WSDL file provides the following information for the consumers of the WCF service.


2 Answers

Meanwhile, disco.exe is considered obsolete technology by Microsoft.

You can use svcutil.exe /t:metadata to achieve the same in the WCF age. Additional benefits are support for additional features, eg WS-Policy.

Save schema from URL:

svcutil /t:metadata http://host/pathtomy.svc?wsdl

Save schema from assembly, eg in automated build:

svcutil /t:metadata c:\wcfweb\pathToWcfServiceAssembly.dll

like image 119
Bernard Vander Beken Avatar answered Oct 07 '22 22:10

Bernard Vander Beken


If you own the service, another interesting option you could explore is using Christian Weyer's FlatWSDL behavior, which will force WCF to generate everything in a single WSDL document, which should make it a lot easier for you to distribute it.

like image 41
tomasr Avatar answered Oct 07 '22 23:10

tomasr