简体   繁体   English

使用提供的WSDL从C#调用PHP Webservice

[英]Calling PHP Webservice from C# using supplied WSDL

I've been passed a WSDL from a third party. 我已经从第三方获得了WSDL。 Their web service is PHP on Apache. 他们的Web服务是Apache上的PHP。

I can call its methods from within XMLSpy and Validwsdl.com. 我可以从XMLSpy和Validwsdl.com内调用其方法。 But cannot get my C#/Visual Studio project to build/validate the WSDL. 但是无法让我的C#/ Visual Studio项目构建/验证WSDL。 When I add it to my project - it shows all of the methods and seems fine but won't build. 当我将其添加到项目中时,它会显示所有方法,并且看起来不错,但无法构建。

I've tried add web ref, add service ref, I've tried command line WSDL.exe. 我试过添加Web参考,添加服务参考,我试过命令行WSDL.exe。 Nothing works. 什么都没有。 Should I be having to hack at their WSDL document? 我应该不得不修改他们的WSDL文档吗? Do I need extra libraries/includes? 我需要额外的库/包含吗?

I don't understand why it's not working. 我不明白为什么它不起作用。

The WSDL is :- WSDL是:-

http://www.gesundsolutions.com/epp/application/heiq.wsdl http://www.gesundsolutions.com/epp/application/heiq.wsdl

Any Ideas? 有任何想法吗?

Have you used the "Add Web Reference" from the menu in VS? 您是否使用过VS中菜单中的“添加Web参考”?

A simple and quick tutorial that shows you what is needed for communicating with a web service from elsewhere is this post on op0.com . op0.com上的此帖子是一个简单而快速的教程,向您展示了与其他地方的W​​eb服务进行通信所需的内容 Check it to find out what you're possibly missing. 检查它以找出您可能缺少的东西。

Yes, just the WSDL is enough if you know the location of the web service. 是的,如果您知道Web服务的位置,仅WSDL就足够了。 No, you should never change the WSDL, as that is the calling convention. 不,您永远不要更改WSDL,因为这是调用约定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM