时运行wsdl.exe 在WSDL我创造的,我得到这个错误:

错误:无法进口结合'SomeBinding'从namespace'SomeNS'.

  • 无法进口作'someOperation'.
  • 这些成员可能不得出的。

我使用的文件的文字风格,并最好的我所知我如下的所有规则。

总之,我有一个有效的WSDL,但该工具并不喜欢它。

我在寻找什么是如果有人有很多经验wsdl.exe 工具和知道的一些秘密地方,我不要。

有帮助吗?

解决方案

我遇到了同样的错误信息。后挖一段时间,发现了一个能源划文件中除wsdl文件。所以列入/进口。划的文件,除此之外。wsdl在结束wsdl命令如下:

wsdl.exe myWebService.wsdl myXsd1.划myType1.划myXsd2.划...

Wsdl了一些警告,但它没有创建一个确定的服务接口。

其他提示

有时候你改变你的代码。消息部分的名称不应该相同;)

<wsdl:message name="AnfrageRisikoAnfrageL">
    <wsdl:part name="parameters" element="his1_0:typeIn"/>
</wsdl:message>
<wsdl:message name="AnfrageRisikoAntwortL">
    <wsdl:part name="parameters" element="his1_0:typeOut"/>
</wsdl:message>

这样的:

<wsdl:message name="AnfrageRisikoAnfrageL">
    <wsdl:part name="in" element="his1_0:typeIn"/>
</wsdl:message>
<wsdl:message name="AnfrageRisikoAntwortL">
    <wsdl:part name="out" element="his1_0:typeOut"/>
</wsdl:message>

@thehhv解决方案是正确的。有的解决方法,不需要你来加 xsds手。

去你的服务随后而不是去 ?wsdl?singleWsdl (下图)

enter image description here

然后拯救页 .wsdl 文件(它将提供 .svc 所以改变它)

然后打开 Visual studio command prompt 你可以找到它的(赢7)启动>所有程序->Visual studio2013->Visual Studio工具-->VS2013 64地工具的命令提示的(可能是我)
然后运行以下命令 Visual studio command prompt (而不是在那里C:\WebPricingService.wsdl 是你救了你的wsdl,除非这样,我们认为非常都和选择有相同文件的名称和位置这是令人担忧)

wsdl.exe C:\WebPricingService.wsdl

它应该给你一些警告作为@thehhv所述,但仍然产生的客户 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\WebPricingService.cs (或无论它把它放在你的机器检查,控制台,输出它在哪里读的写作文件')

enter image description here

希望这样可以节省一些时间。

在我的情况的问题是不同的,是很好的描述 在这里,:

每当名称的一部分是"参数"。净假定doc/lit/包裹是使用并产生代理。如果尽管这个词"参数"是用wsdl不doc/lit/包裹(如在最后一个例子)。净可以给我们一些错误。其中的错误?你猜对了:"这些成员可能不被来".现在我们可以理解的错误意味着:.净试图忽略的根本元素,因为它认为doc/lit/包裹是使用。但是这件无法移除,因为它不是假的-它应该是积极选择的用户出的一些源类型。

该修正如下,和工作完美地为我说:

的方式来解决它打开然一个文本编辑器和更改名称的一部分 "参数""parameters1".现在。净将知道,以生成doc/lit/裸代理。这意味着一个新的包装类将出现的根本参数的代理。虽然这可能是一个小小的更多繁琐的api,这将不会有任何影响在线格式和代理是完全的互操作性。

(语气加重字句由我)

在情况下,有人打这堵墙,这里是什么导致了错误在我的情况:

我有一个运作:

<wsdl:operation name="FormatReport">
  <wsdl:documentation>Runs a report, which is returned as the response</wsdl:documentation>
  <wsdl:input message="FormatReportRequest" />
  <wsdl:output message="FormatReportResponse" />
</wsdl:operation>

这需要一个输入:

<wsdl:message name="FormatReportRequest">
  <wsdl:part name="parameters" element="reporting:FormatReportInput" />
</wsdl:message>

和另一个操作:

<wsdl:operation name="FormatReportAsync">
  <wsdl:documentation>Creates and submits an Async Report Job to be executed asynchronously by the Async Report Windows Service.</wsdl:documentation>
  <wsdl:input message="FormatReportAsyncRequest" />
  <wsdl:output message="FormatReportAsyncResponse" />
</wsdl:operation>

把一个输入:

  <wsdl:message name="FormatReportAsyncRequest">
    <wsdl:part name="parameters" element="reporting:FormatReportInputAsync" />
  </wsdl:message>

和输入要素的实例两种类型:

<xsd:element name="FormatReportInput" type="reporting:FormatReportInputType"/>
<xsd:element name="FormatReportInputAsync" type="reporting:FormatReportAsyncInputType"/>

这里是追赶的 reporting:FormatReportAsyncInputType 类型的延伸(源自) reporting:FormatReportInputType 类型。这是什么混淆的工具而造成的"这些成员可能不得出的。"错误。你可以到处去,以下德建议中所接受的答案。

如果你是这样做与我们的发运户你要交换的开发,以促使网址的时候你正在建设的不同区域(调试、开发、生产)等。你想用下面的命令产生一个vb或C#文件从船上。户然后复盖值,在这种情况下船。vb文件。

WSDL /Language:VB /out:"C:\wsdl\Ship.vb" "C:\wsdl\Ship.wsdl"  C:\wsdl\UPSSecurity.xsd  C:\wsdl\ShipWebServiceSchema.xsd  C:\wsdl\IFWS.xsd  C:\wsdl\common.xsd
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top