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. bzoj4330:JSOI2012 爱之项链

    题目大意:一串项链由n个戒指组成,对于每个戒指,一共有M个点,R种颜色,且旋转后相同的戒指是相同的,然后一串项链又由N个戒指组成,同时要满足相邻的两个戒指不能相同,这串项链上某个位置插入了一个特殊的东 ...

  2. python 自动化之路 day 面向对象基础

    1.面向對象基础概述 面向过程: 根据业务逻辑从上到下垒代码(如果程序修改,对于依赖的过程都需要进行修改.) 函数式: 将某功能代码封装到函数中,如后便无需重复编写,仅需要调用函数即可 面向对象: 世 ...

  3. nginx 代理 proxy_pass设置

    #img.test.com/img1 实际访问的路径是 http://127.0.0.1:123/a1 #img.test.com/img2 实际访问的路径是 http://127.0.0.1:123 ...

  4. 【实习记】2014-09-04浏览代码查middle资料+总结我折腾过的源码浏览器

        浏览着代码,看源码可以先看make文件,make文件有制造的流程信息. 一般可以从运行的程序对应的cpp看起.然而如果有框架,那就不容易了,会关系错纵复杂. 总结一下我折腾过的源码阅读器. s ...

  5. Yii Swiftmailer 发送中文附件

    所用的是Yii2 的basic框架.它本身集成了邮件发送插件swiftmailer,发送邮件是很方便的,但是当发送的邮件带有中文名称的附件时,就出现了问题,邮件所带的附件显示名称错误.比如原名&quo ...

  6. 深入了解line-height

    1.定义   行高:两行文字baseline(基线)之间的距离 示意图: 2.为何line-height可以让单行文本垂直居中       其实并没有垂直居中,除非将font-size:0; 3.li ...

  7. php 商务网站购物车联动地址

    数据表如下: CREATE TABLE IF NOT EXISTS `china` (`region_id` smallint(5) unsigned NOT NULL,  `parent_id` s ...

  8. dom例子

    //凡是html标签中的属性和值是一样的,那么在js中用true或者false 1,阅读协议倒计时 <input type="button" name="name& ...

  9. 读取xml文件(可执行文件根目录debug)

    xml文件格式如下 <?xml version="1.0" encoding="utf-8" ?> <root> <appKey& ...

  10. DIV+CSS 网页布局之:一列布局

    1.网页布局 布局(layout)即对事物的全面规划和安排,页面布局是对页面的文字.图像或表格进行格式化版式排列.网页布局对改善网站的外观非常重要,又称版式布局,大多数网站会把内容安排到多个列中,就像 ...