向WinForm项目添加服务引用时出错

时间:2013-02-26 07:16:06

标签: c# winforms visual-studio-2010 web-services

我想在我的项目中使用实时服务但是当我尝试添加其参考时,出现以下错误:

The document at the url https://exdev.www.property24.com/Services/P24ListingService19.asmx was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be  and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
- Report from 'DISCO Document' is 'Discovery document at the URL https://exdev.www.property24.com/Services/P24ListingService19.asmx could not be found.'.
  - The document format is not recognized (the content type is 'application/xhtml+xml; charset=utf-8').
- Report from 'WSDL Document' is 'There is an error in XML document (3, 2).'.
  -  was not expected.
Metadata contains a reference that cannot be resolved: 'https://exdev.www.property24.com/Services/P24ListingService19.asmx'.
Metadata contains a reference that cannot be resolved: 'https://exdev.www.property24.com/Services/P24ListingService19.asmx'.
If the service is defined in the current solution, try building the solution and adding the service reference again.

可以浏览服务URL:https://exdev.www.property24.com/Services/P24ListingService19.asmx

任何帮助都会很棒!

1 个答案:

答案 0 :(得分:1)

我尝试在“服务引用”下添加该Web服务引用,但是出现了上述错误

问题是Web服务已经老了所以我设法通过转到服务参考的“高级”并将其添加为“Web参考”来获得其工作参考。 由于Web Reference可以应对旧服务。 它对我有用,希望它也适合你!