为什么这个WSDL文件生成VS2008空服务代理? [英] Why does this WSDL file generate an empty service proxy in VS2008?

查看:360
本文介绍了为什么这个WSDL文件生成VS2008空服务代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么这个WSDL文件生成VS2008空服务代理?

Why does this WSDL file generate an empty service proxy in VS2008?

如果你看一下生成Reference.cs文件,它是空的。任何想法?

If you look at the Reference.cs file generated, it's empty. Any ideas?

推荐答案

你读过你的错误列表?我得到了以下内容:

Have you read your error list? I got the following:

Custom tool warning: There was a validation error on a schema generated during export:
    Source: 
    Line: 144 Column: 12
   Validation Error: Wildcard '##any' allows element 'http://search.yahoo.com/mrss:text', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the particle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence.       

Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Cannot import invalid schemas. Compilation on the XmlSchemaSet failed.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://fliqz.com/services/search/20071001']/wsdl:portType[@name='IVideoSearchService']

Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://fliqz.com/services/search/20071001']/wsdl:portType[@name='IVideoSearchService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='basicHttpBinding_IVideoSearchService_20071001']

Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='basicHttpBinding_IVideoSearchService_20071001']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='VideoSearchService']/wsdl:port[@name='basicHttpBinding_IVideoSearchService_20071001']

Custom tool error: Failed to generate code for the service reference 'ServiceReference1'.  Please check other error and warning messages for details.



编辑:我做了一些挖掘,和我遇到以下链接来

I did some digging, and I came across the following links:

  • MSDN Question
  • Blog Entry

我试过以下通过ScottAnderson在第一个环节中的说明,但无法生成与他们的客户代理。也许你能有更好的运气。

I tried following the instructions by ScottAnderson in the first link, but was unable to generate a client proxy with them. Perhaps you can have better luck.

它出现的理由的这不起作用,是因为Fliqz使用XmlSerializer的,而不是DataContract / MessageContract其合同的定义,WCF没有按不想与他们发挥很好,并产生不适当的WSDL。如果你能控制的原合同,你也许可以解决这个问题,并用自己的方式;不幸的是,你可能完全出于运气。

It appears the reason this doesn't work is because Fliqz is using XmlSerializer rather than DataContract/MessageContract for its contract definitions, and WCF doesn't want to play nicely with them and generates inappropriate WSDL. If you could control the original contract, you could probably fix the issue and be on your way; unfortunately, you may be entirely out of luck.

如果你能得到的ServiceContract接口,并将其呈现的类型,你也许可以通过手工生成自己的客户端。由一些类名我在那里看到的情况来看,似乎是Fliqz在合同中露出内部对象,所以我怀疑,你可以,你知道的,叫他们起来,并要求他们为你可以引用一个.dll。

If you can get the ServiceContract interface and the types it exposes, you might be able to generate your own client by hand. Judging by some of the class names I see in there, it appears that Fliqz is exposing internal objects in their contract, so I doubt you could, you know, call them up and ask them for a .dll you can reference.

您可以尝试通过分析WSDL和XSD自己写出来的接口和数据/消息协定类型。看起来它会是大量的工作,虽然。

You could try to write out the interface and data / message contract types yourself by analyzing the WSDL and XSDs. Looks like it'd be a lot of work, though.

对不起,我不能帮助更多。这似乎是穷人WCF传统支持和Fliqz的一部分穷人架构/设计的组合。

Sorry I can't help more. This seems to be a combination of poor WCF legacy support and poor architecture/design on the part of Fliqz.

这篇关于为什么这个WSDL文件生成VS2008空服务代理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆