- <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元人民币到其银行账户,绝不食言!!
<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元人民币到其银行账户,绝不食言!!
在你studio中新建一个winform 或者是console的工程
添加web饮用
把你的webservice的地址写上然后再你饮用里面就出来一个wbeservice1.cs 类文件
里面就是你要测试的方法
直接添加web引用是不行的,因为.net不支持style=rpc和use=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
如果不行,只能自己解析Soap了。
自己解析soap怎么做呢,请提供代码啊,只要能调用成功,给现金!
之后你就可以生成定义的ws对象,ws.function就可以了。
不要钱了,给100分吧