无法在VS2010中使用WSDL

我试图在VS2010中使用以下WSDL并且我遇到了似乎特定于WSDL的错误。

我将其添加为Web服务引用,并且最初没有创建任何代理类或任何内容 – 向导成功完成,我在项目中的〜/ Web References /下获得了.wsdl和Reference.map文件,但是服务是代码不可用。

如果我在其上执行“更新Web引用”,则会收到以下错误:

Custom tool error: Unable to import WebService/Schema. The element attribute is not allowed on encoded message parts. The erroneous part is named 'textReturnObject' in message 'singleTextResponse'. (File: Reference.map line 1 column 1) 

如果我尝试将“element”重命名为“type”,我会遇到一大堆其他问题:

 The custom tool 'MSDiscoCodeGenerator' failed. Cannot find definition for http://schemas.xmlsoap.org/wsdl/:exampleServiceNameBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing. Parameter name: name 

任何人都可以对此有所了解吗? 我已经把WSDL放到了一些在线工具中并且它们很好地使用它 – VS2010是否存在某些类型的WSDL问题?

                                         

是的,VS2010无法从某些WSDL创建Web服务引用。 必须为那些人编写自定义包装器。 或者以某种方式编辑您的WSDL,以便VS可以使用它。 例如,如果这些引用为您造成麻烦,您可以删除不打算使用的方法的Web服务方法引用。

我在SO上有一个问题,我在添加服务引用时遇到了麻烦。 我最终按照建议使用了svcutil,它解决了这个问题。 我的情况略有不同,但值得一试。

.net web服务:无法添加服务引用,仅限web引用