log*_*eks 5 c# web-services asmx wshttpbinding webhttpbinding
我正在尝试在C#中使用Web服务。每当我尝试从Web服务类调用该函数时,都会收到“不理解SOAP标头操作”的信息。我在项目中添加了指向Web服务的Web参考[not service reference]。采取了以下步骤来添加Web参考
1)右键单击项目->添加WebReference
当我在Web浏览器中检查Web服务时,我在标题中找到了这个
<wsdl:definitions name="MyService" targetNamespace="http://tempuri.org/">
<wsp:Policy wsu:Id="WSHttpBinding_ICAIService_policy">
<wsp:ExactlyOne><wsp:All><sp:TransportBinding>
<wsp:Policy>
Run Code Online (Sandbox Code Playgroud)
我已完成以下代码来调用Web服务功能
WebStruct webS = new WebStruct();
webS.Name = "Peter";
webS.ID = 22;
webS.Find(webS);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15493 次 |
| 最近记录: |