- <definitions name="YwclService" targetNamespace="http://ihis.pub.ws" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ihis.pub.ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <types /> 
  <message name="Ywcl_bselect">
  <part name="arg0" type="xsd:int" /> 
  <part name="arg1" type="xsd:string" /> 
  <part name="arg2" type="xsd:string" /> 
  <part name="arg3" type="xsd:string" /> 
  <part name="arg4" type="xsd:string" /> 
  </message>
- <portType name="Ywcl">
- <operation name="bselect" parameterOrder="arg0 arg1 arg2 arg3 arg4">
  <input message="tns:Ywcl_bselect" /> 
  <output message="tns:Ywcl_bselectResponse" /> 
  </operation>
  </portType>
- <binding name="YwclBinding" type="tns:Ywcl">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <operation name="bselect">
  <soap:operation soapAction="" /> 
- <input>
  <soap:body namespace="http://ihis.pub.ws" use="literal" /> 
  </input>
- <output>
  <soap:body namespace="http://ihis.pub.ws" use="literal" /> 
  </output>
  </operation>
  </binding>
- <service name="YwclService">
- <port binding="tns:YwclBinding" name="YwclPort">
  <soap:address location="http://192.168.3.12:8080/Services/YwclService" /> 
  </port>
  </service>
  </definitions>谁能给出以上webservice C#的完整调用代码,测试成功后立即汇100元人民币到其银行账户,绝不食言!!

解决方案 »

  1.   

    很无语言了
    在你studio中新建一个winform 或者是console的工程
    添加web饮用
    把你的webservice的地址写上然后再你饮用里面就出来一个wbeservice1.cs 类文件
    里面就是你要测试的方法
      

  2.   

    wbeservice1 s=new wbeservice1()
      

  3.   

    有怎么简单就不会出来悬赏了.请仔细看xml格式好不好.
    直接添加web引用是不行的,因为.net不支持style=rpc和use=literal的组合
      

  4.   

    MSDN上看到的,应该不会错: .NET Framework 确实支持 RPC/literal 组合控制参数和返回值的格式设置
    对于用法(控制 Web 服务方法参数或返回值的格式设置),ASP.NET Web 服务中的默认选项是 literal 而非 SOAP encoded。但是,该选项还依赖于样式选项,涉及 SOAP Body 元素的第一级内容(并有可能涉及其第二级内容)的格式设置。 如果 Web 服务方法或对应的代理类方法使用 SoapRpcMethod 属性,则会自动使用 SOAP 编码。 .NET Framework 确实支持 RPC/literal 组合。 当 SoapRpcService 属性应用于 Web 服务类且未被应用于给定 Web 服务方法的 SoapDocumentMethod 属性重写时,情况也是如此。 另一方面,SoapDocumentMethod 和 SoapDocumentService 属性 (Attribute) 具有一个可能值为 SoapBindingUse.Literal 和 SoapBindingUse.Encoded 的 Use 属性 (Property)。主题如何:控制 Web 服务方法的参数和返回值的格式设置提供了有关如何设置 Use 属性的说明。
    =====================
    http://msdn.microsoft.com/zh-cn/library/4cxy91t2.aspx
    调用方法参考:
    http://msdn.microsoft.com/zh-cn/library/a561tby9.aspx
      

  5.   

    直接引用,看能不能调用Web Service。
    如果不行,只能自己解析Soap了。
      

  6.   

    直接引用出现不支持style=rpc和use=literal的组合的错误啊!
    自己解析soap怎么做呢,请提供代码啊,只要能调用成功,给现金!
      

  7.   

    自己写一个请求用的soap(xml文档),然后分析响应soap(xml文档)
      

  8.   

    项目文件上,右键添加web引用
    之后你就可以生成定义的ws对象,ws.function就可以了。
    不要钱了,给100分吧
      

  9.   

    参考:http://zhenglh.blog.35.com/2007/12/21/xml-rpc-for-net/