2012-10-04 100 views
0

我要消耗 错误消费Web服务4.0

所以我想使用web服务的WSDL地址(https://service/Services.wsdl)添加一个服务引用内置的Axis2从净

第三方web服务,我也得到以下错误:

The document was understood, but it could not be processed. 
- The WSDL document contains links that could not be resolved. 
- There was an error downloading https://service/Services.xsd. 
...etc 

最后一个错误(错误下载.xsd)可能是什么原因导致我这个问题。这是因为VS2010试图在这个地址下载:https://service/Services.xsd

但实际上它奠定了这里:https://service/GoodServices.xsd

编辑

我怎么能告诉VS2010采取从上面的正确链接XSD而不是由错误的wsdl导致错误的解决方案?

+0

看看wsdl本身。应在文档或其中一个引用的文档中的某处提及“错误的”URL。这通常是服务提供商的问题。 –

+0

是的,它在wsdl的某个地方,我发现如何自己解决它:https://preprodservices.crif-online.ch/CrifSS/CrifSoapServiceV1?xsd= sacrif-soap-service_v1.0.xsd,但现在我怎么知道VS2010检查那里而不是它检查 –

回答

3

这可能还有很长的路要走,但对我很有帮助。

  • 下载从浏览的WSDL并将其保存为XML
  • 包含此XML在您的项目在Visual Studio
  • 打开在Visual Studio中WSDL XML文件。
  • 第6行到正确的位置XSD,即修改架构位置(“的schemaLocation”属性),https://preprodservices.crif-online.ch/CrifSS/CrifSoapServiceV1?xsd=crif-soap-service_v1.0.xsd
  • 保存文件
  • 现在右键单击该项目并选择“添加服务引用...”
  • 在地址:框中,输入下载/修改的wsdl的物理路径(C:\test\project....)。
  • 打开去
+0

很好的描述! – oberfreak

+0

谢谢Oberfreak。 –

+0

这正是我在此期间所做的一切^^非常感谢您的回答! –