通过C#winforms使用.svc webservice

通过C#winforms使用.svc webservice,winforms,wcf,web-services,c#-4.0,svc,Winforms,Wcf,Web Services,C# 4.0,Svc,下面是第三方提供的集成到C#winforms中的Web服务: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs

下面是第三方提供的集成到C#winforms中的Web服务:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified"      targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="GetRecharge">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="account_no" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="smc" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="amount" type="xs:int" />
<xs:element minOccurs="0" name="Uniqueid" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetRechargeResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="GetRechargeResult" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element></xs:schema>

还提供了一个测试此Web服务的URL。我如何在C#winforms中使用这个svc Web服务。欢迎使用代码片段

编辑:我尝试在VS2010中将web引用添加到项目中,但出现以下错误:


这不是一项web服务。这只是XML架构。@约翰了解如何使用此XML架构和给定的测试服务URL与我的应用程序集成?将?wsdl添加到用于构建WCF客户端的URL中。您不能使用他们提供的内容。他们给了你一些不起作用的东西。此外,永远不要使用“添加Web参考”。使用“添加服务引用”。给你这个URL的人需要修复他们的服务。你可以点击“详细信息”链接来获取错误的详细信息,这样你就可以告诉他们。见“