在Visual Studio 2010中为eBaySvc.wsdl生成服务引用的错误

时间:2015-02-14 14:20:20

标签: c# visual-studio-2010 wsdl ebay ebay-api

我们很难使用visual studio 2010为ebay交易api添加服务参考。

我们有一个旧项目需要做一些维护。以前的一切工作(最后一次服务更新至少是18个月前)。

Visual Studio指出: http://developer.ebay.com/webservices/latest/eBaySvc.wsdl

错误是:

The document at the url http://developer.ebay.com/webservices/latest/ebaySvc.wsdl 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 <schema> and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
- Report from 'DISCO Document' is 'Discovery document at the URL http://developer.ebay.com/webservices/latest/ebaySvc.wsdl could not be found.'.
- The document format is not recognized.
- Report from 'WSDL Document' is 'There is an error in XML document (33950, 8).'.
- The element was not expected in this context: <CallInfo xmlns='urn:ebay:apis:eBLBaseComponents'>..</CallInfo>. Expected elements: http://www.w3.org/2001/XMLSchema:annotation, http://www.w3.org/2001/XMLSchema:element, http://www.w3.org/2001/XMLSchema:sequence, http://www.w3.org/2001/XMLSchema:any, http://www.w3.org/2001/XMLSchema:choice, http://www.w3.org/2001/XMLSchema:group.
Metadata contains a reference that cannot be resolved: 'http://developer.ebay.com/webservices/latest/ebaySvc.wsdl'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
If the service is defined in the current solution, try building the solution and adding the service reference again.

使用fiddler,visual studio追加/ mex,服务器返回405。

任何想法有什么变化以及我们如何解决它?

1 个答案:

答案 0 :(得分:0)

实际上,最新版本在任何情况下都不起作用。所以我试图使用较旧的一个,它对我有用。 http://developer.ebay.com/webservices/903/eBaySvc.wsdl 我希望这对某人有用,我在这个问题上花了一天时间。