2012-05-16 86 views

回答

0

您必须添加Service Reference(在Solution Explorer中右键单击项目并选择Add service reference)。在url字段输入“http://www.restfulwebservices.net/wcf/WeatherForecastService.svc”,然后单击确定。 Master将为此WCF服务生成一个代理类。

然后,您可以使用此WCF服务作为任何其他Web服务。

正如您在wsdl中看到的,此服务提供了两种方法 - GetCitiesByCountry和GetForecastByCity。我认为这显然是他们做的。

我看不到此WCF服务的任何文档。我只找到Java的小样本。它调用GetCitiesByCountry方法: http://doc.nuxeo.com/display/NXDOC/Building+a+SOAP-based+WebService+client+in+Nuxeo