如何在C#中的SOAP / WSDL客户端? [英] How to make a SOAP/WSDL client in C#?
本文介绍了如何在C#中的SOAP / WSDL客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在玩弄在PHP与它得到的东西的工作,我所做的是:
I have been playing around in PHP with it and got something to work, what i did was:
$client = new SoapClient("http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl");
$fetchedArr = $client->GetCityForecastByZIP(array("ZIP" => "10451")); //get the weather in the bronx YO!
,现在我想我的应用程序WPF / C#做同样的。 C#中的等价物是什么?
And now i would like my application i WPF/C# to do the same. What is the equivalent in c#?
推荐答案
最简单的方法就是使用VS,并添加Web引用。这自动为您
The simplest way is to use VS and add a web reference. This automatically creates the stub for you
这篇关于如何在C#中的SOAP / WSDL客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文