to save the metadata to local files. For HTTP and HTTPS URL schemes,
Svcutil.exe attempts to retrieve metadata using WS-MetadataExchange
and XML Web Service Discovery. For all other URL schemes, Svcutil.exe
uses only WS-MetadataExchange.
By default, Svcutil.exe uses the bindings defined in the
MetadataExchangeBindings class. To configure the binding used for
WS-MetadataExchange, you must define a client endpoint in the
configuration file for Svcutil.exe (svcutil.exe.config) that uses the
IMetadataExchange contract and that has the same name as the Uniform
Resource Identifier (URI) scheme of the metadata endpoint address.
To download metadata using Svcutil.exe
Locate the Svcutil.exe tool at the following location:
C:\Program Files\Microsoft SDKs\Windows\v1.0.\bin
At the command prompt, launch the tool using the following format.
svcutil.exe /t:metadata <url>* | <epr>
You must specify the /t:metadata option to download metadata.
Otherwise, client code and configuration are generated.
The <url> argument specifies the URL to a service endpoint that
provides metadata or to a metadata document hosted online. The <epr>
argument specifies the path to an XML file that contains a
WS-Addressing EndpointAddress for a service endpoint that supports
WS-MetadataExchange.
For more options about using this tool for metadata download, see
ServiceModel Metadata Utility Tool (Svcutil.exe).
Example
The following command downloads metadata documents from a running service.
svcutil /t:metadata http://service/metadataEndpoint
No comments:
Post a Comment