2012-03-22 61 views
1
C: \ Program Files \ Microsoft Visual Studio 10.0 \ VC> svcutil wsdl.wsdl/out: Proxy. 
Microsoft (R) Service Model Metadata Tool 
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] 
Copyright (c) Microsoft Corporation. All rights reserved. 

Error: Can not import wsdl: portType 
Details: Generated an exception at run time extension of import WSDL: 
System.ServiceModel.Description.DataContractSerializerMessageContractImporter 
Error: element complexType "http://api-new.begun.ru/index.php:Region" is already a Listing 
flax. 
XPath to Error Source:// wsdl: definitions [@ targetNamespace = 'http://api-new.be 
gun.ru/index.php ']/wsdl: portType [@ name =' AdvertiserServicePortType '] 


Error: Can not import wsdl: binding 
Details: Failed to import wsdl: portType, on which the wsdl: binding. 
XPath to wsdl: portType:// wsdl: definitions [@ targetNamespace = 'http://api-new.begun 
.ru/index.php ']/wsdl: portType [@ name =' AdvertiserServicePortType '] 
XPath to Error Source:// wsdl: definitions [@ targetNamespace = 'http://api-new.be 
gun.ru/index.php ']/wsdl: binding [@ name =' AdvertiserServiceBinding '] 


Error: Can not import wsdl: port 
Details: Failed to import wsdl: binding, which depends on the wsdl: port. 
XPath to wsdl: binding:// wsdl: definitions [@ targetNamespace = 'http://api-new.begun. 
ru/index.php ']/wsdl: binding [@ name =' AdvertiserServiceBinding '] 
XPath to Error Source:// wsdl: definitions [@ targetNamespace = 'http://api-new.be 
gun.ru/index.php ']/wsdl: service [@ name =' AdvertiserService ']/wsdl: port [@ name =' Adve 
rtiserServicePort '] 


Generating files ... 
Warning: No code was generated. 
If you were trying to generate a client, this could be because the metadata docu 
ments did not contain any valid contracts or services 
or because all contracts/services were discovered to exist in/reference assembl 
ies. Verify that you passed all the metadata documents to the tool. 

Warning: If you would like to generate data contracts from schemas make sure to 
use the/dataContractOnly option. 

如何解決?我需要在C#代理類如何從wsdl創建代理類?

更新:

http://www.2shared.com/file/JAoRmgXI/wsdl.html

+2

我不明白你的問題......尤其是,由於錯誤信息是俄語(?)...需要幫助的其他相關信息:您使用的是什麼.NET版本?看到WSDL itsefl可能也會有很大幫助! – Yahia 2012-03-22 15:17:18

+0

我更新了我的文章 – Mediator 2012-03-22 15:50:09

+0

這個更新並沒有真正的幫助......你能發佈你使用的.NET版本嗎? – Yahia 2012-03-22 16:24:12

回答

3

我猜WSDL引用一些其他文件(.XSD?)不在同一目錄中。

更新:第一誤差大約地區是那裏,因爲地區被定義了兩次(線253和274)。
Update2:RegionArray也被聲明瞭兩次。客戶端代理生成工作通過刪除兩次兩次聲明並使用wsdl.exewsdl.exe wsdl.wsdl /out:Proxy.cs

+0

我沒有任何xsd文件 – Mediator 2012-03-22 15:50:37

+0

您是否想要生成**客戶端**代理? – brgerner 2012-03-22 16:58:48