【问题标题】:Exporting XSD and WSDL from WCF Service (SVCUTIL)从 WCF 服务 (SVCUTIL) 导出 XSD 和 WSDL
【发布时间】:2014-11-01 17:31:00
【问题描述】:

我有一个 Wcf 服务,方法很简单。我需要生成 WSDL 和 XSD 文件,以移交给需要使用 Web 服务的第三方。

解决方案是在 Visual Studio 2013、.NET 4.5 中完成的。从 BIN 文件夹中,我运行 SVCUTIL /t:metadata {name of dll file}。不久之后,我现在同时拥有了一个 WSDL 和一个 XSD 文件。 WSDL 文件包含:

[SAPI XML] tempuri.org.wsdl(2): unknown tag <wsdl:definitions>.
[SAPI XML] Compulation Failed!
[W3C XML tempuri.org.wsdl(2) : The name of the root element in the grammar must be     "grammar", not "definition".
[W3C XML] Compilation Failed!

XSD 文件的输出几乎相同。

有什么想法吗?

谢谢 弗兰克

【问题讨论】:

    标签: wcf xsd wsdl svcutil.exe


    【解决方案1】:

    在 VS2012 中加载项目(在另一台 PC 上),构建并运行 SVCUTIL.EXE - 这次没有问题。可能与我安装了 VS2013 的 PC 上安装的 SVCUTIL 有关。

    【讨论】:

      猜你喜欢
      • 2023-03-13
      • 2012-07-09
      • 2010-12-08
      • 2013-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多