SOAP对接JAVA接口


//工具SoapUI

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wser="http://www.wservicedddddd.com/"> <soapenv:Header> <osbappid>osbappid</osbappid> <osbappkey>osbappkey</osbappkey> </soapenv:Header> <soapenv:Body> <wser:InterfaceName> <!--Optional:--> <arg0> <!--Optional:--> <input>JSON</input> </arg0> </wser:InterfaceName> </soapenv:Body> </soapenv:Envelope>
 
 

 using System.ServiceModel;
 using System.ServiceModel.Channels;

//引用SOAP代理之后 调用配置接口信息
MySOAPClient MySOAPClient = new MySOAPClient("PORT", CommonConfig.ApiUrlConfig);
using (OperationContextScope scope = new OperationContextScope(MySOAPClient.InnerChannel))
{
  //接口请求表头密钥
    OperationContext.Current.OutgoingMessageHeaders.Add(MessageHeader.CreateHeader("osbappid", string.Empty, "osbappid"));
    OperationContext.Current.OutgoingMessageHeaders.Add(MessageHeader.CreateHeader("osbappkey", string.Empty, "osbappkey"));

    MySOAPClient.CallInterface(new netIvrReq { input = JSON });
}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM