https://msdn.microsoft.com/en-us/library/aa347733.aspx

The ServiceModel Metadata Utility tool is used to generate service model code from metadata documents and metadata documents from service model code.

SvcUtil.exe

The ServiceModel Metadata Utility Tool can be found at the Windows SDK installation location, specifically, C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin

Functionalities

The following table summarizes the various functionalities provided by this tool and the corresponding topic that discusses how it is used.

Timeout

The tool has a 5 minute timeout when retrieving metadata.

This timeout only applies to retrieving metadata over the network.

It does not apply to any processing of that metadata.

Multi-targetting

The tool does not support multi-targeting.

If you want to generate a .NET 4 artifact from svcutil.exe, you have to use the svcutil.exe from the .NET 4 SDK.

To generate a .NET 3.5 artifact, use the executable from the .NET 3.5 SDK.

Accessing WSDL Documents

When you use Svcutil to access a WSDL document that has a reference to a security token service (STS), Svcutil makes a WS-MetadataExchange call to the STS.

However, the service can expose its WSDL documents using either WS-MetadataExchange or HTTP GET.

Therefore, if the STS has only exposed the WSDL document using HTTP GET, a client written in WinFX will fail.

For clients written in .NET Framework 3.5, Svcutil will attempt to use both WS-MetadataExchange and HTTP GET to obtain the STS WSDL.

Using SvcUtil.exe

Common Usages

The following table shows some commonly used options for this tool.

参数:

/directory:<directory>

描述:

Directory to create files in. Default: The current directory.

Short form: /d   缩写

Metadata Export

Service Validation

Metadata Download

XmlSerializer Type Generation

Examples

Maximum Nametable Character Count Quota

Security Concerns

How to: Use Svcutil.exe to Download Metadata Documents

To download metadata using Svcutil.exe

  1. Locate the Svcutil.exe tool at the following location:

    C:\Program Files\Microsoft SDKs\Windows\v1.0. \bin

  2. 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.

  3. 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.

ServiceModel Metadata Utility Tool (Svcutil.exe)的更多相关文章

  1. ServiceModel 元数据实用工具 (Svcutil.exe)

    ServiceModel 元数据实用工具用于依据元数据文档生成服务模型代码,以及依据服务模型代码生成元数据文档 一.SvcUtil.exe ServiceModel 元数据实用工具可在 Windows ...

  2. 快速访问WCF服务--ServiceModel 元数据实用工具 (Svcutil.exe)

    基本定义 ServiceModel 元数据实用工具用于依据元数据文档生成服务模型代码,以及依据服务模型代码生成元数据文档. SvcUtil.exe ServiceModel 元数据实用工具可在 Win ...

  3. C# 如何使用 svcutil.exe 创建 WCF 客户端代码

    工具:svcutil.exe 参数:指定wsdl.输出源码文件.输出配置文件 示例: D:\>svcutil.exe http://localhost:8087/DataService/?wsd ...

  4. win8, VS2013 .NET 4.5在哪找svcutil.exe?

    我这个纠结呀,公司用win8, .NET 4.5.想做一个很简单的项目,就是wcf宿主iis,项目根目录下有aspx文件和svc文件.于是参考了一个博客http://www.cnblogs.com/y ...

  5. 关于svcutil.exe

    添加环境变量 name NETFX4 value C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools Server.Pr ...

  6. 通过SvcUtil.exe 生成 Wcf 客户端代理

    WCF服务调用通过两种常用的方式:一种是借助代码生成工具SvcUtil.exe或者添加服务引用的方式,一种是通过ChannelFactory直接创建服务代理对象进行服务调用. SvcUtil.exe ...

  7. WCF 客户端代理生成 通过SvcUtil.exe

    WCF服务调用通过两种常用的方式:一种是借助代码生成工具SvcUtil.exe或者添加服务引用的方式,一种是通过ChannelFactory直接创建服务代理对象进行服务调用. 下面简单说下如何通过Sv ...

  8. WCF通过SVCUtil.exe生成客户端代理类和配置文件(转)

    WCF服务调用通过两种常用的方式: 1:一种是借助代码生成工具SvcUtil.exe或者添加服务引用的方式. 2:一种是通过ChannelFactory直接创建服务代理对象进行服务调用. 本文只针对通 ...

  9. 使用svcutil.exe 工具来生成调用文件

    svcutil.exe http://localhost:9065/ServiceDemo.svc?wsdl 这将生成一个配置文件和一个包含客户端类的代码文件. 下面我们就用这个是怎么生成的: 1,打 ...

随机推荐

  1. C++ socket开发1

    服务端 setlocale(LC_ALL,"Chinese-simplified"); WORD wVersionRequested; WSADATA wsaData; int e ...

  2. 获取通讯录的信息(关于iOS9.0之后新的框架-ContactFramework)

    转载自:http://my.oschina.net/u/2340880/blog/511995?p={{totalPage}} 一.引言 在以前iOS开发中,涉及联系人相关的编程,代码都非常繁琐,并且 ...

  3. linux 搭建pptpd vpn(转,备忘)

    1.第一步需要安装PPTP,以用来提供VPN服务.sudo apt-get install pptpd注:如果有问题的话比如提示找不到之类的,apt-get update 一下应该就可以了,然后再来一 ...

  4. 系统监控的一些工具w , vmstat

    w 命令:--w 查看的是系统整体上的负载 # w 15:23:46 up 3:34, 2 users, load average: 0.03, 0.05, 0.00 USER TTY FROM LO ...

  5. user-agent查询

    浏览器地址栏输入:javascript:window.navigator.userAgent通过网站查询:http://www.enhanceie.com/ua.aspxhttp://www.user ...

  6. HTML 5 video 视频标签全属性详解

    Video标签的使用 Video标签含有src.poster.preload.autoplay.loop.controls.width.height等几个属性, 以及一个内部使用的标签<sour ...

  7. Mysql 与 php动态网站开发 入门教程

    这个系列的教程由表单开始写,因为表单可以把数据库和web 之间的交互表现得很明显.提交表单 ,数据库记录注册信息. 本教程属于基础教程.大神请略过.        对于php和mysql之间的稳固性很 ...

  8. sitecustomize.py 用法

    1.在python安装目录下的lib下的site-packages 目录中,新建文件sitecustomize.py.这是个特殊的文件,在python启动时会自动执行其中的语句.在sitecustom ...

  9. Win7 + VS2015 + CMake3.6.1-GUI编译库

    CMake生成Unicode版本VC工程 Just add this line in your top CMakeLists.txt file:     add_definitions(-DUNICO ...

  10. shell编程的一些例子2

    控制语句: 1.if语句 demo_if #!/bin/bash if [ $# -ne 1 ] then echo "参数多于一个" exit 1 fi if [ -f &quo ...