以C#调用SOAP Web服务API(SOAP请求格式) [英] Call SOAP webservice API in C# ( SOAP Request format)

查看:426
本文介绍了以C#调用SOAP Web服务API(SOAP请求格式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,

我的客户给了我SOAP请求格式的WSDL文件.这是基于SOAP的Web服务-并具有用于身份验证的令牌.

My Client has given me WSDL File with SOAP request format. This is SOAP based webservice-- and having tokens to authenticate.

请让我知道如何调用c#进行身份验证或使用API​​?

Please let me know how to call in c# to authenticate or consume API?

< soapenv:信封xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env =" http://xxxxxxxxxxxx/ISL/xxxxxxxxxxxxx">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://xxxxxxxxxxxx/ISL/xxxxxxxxxxxxx">

   < soapenv:Header>
< INF:INF_Security xmlns:INF ="http://com.INF.us.Security/">
< INF:APIKey> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIKey>
< INF:APIToken> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIToken> 
</INF:INF_Security>
</soapenv:Header>

   <soapenv:Header>
<INF:INF_Security xmlns:INF="http://com.INF.us.Security/">
<INF:APIKey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIKey>
<INF:APIToken>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIToken> 
</INF:INF_Security>
</soapenv:Header>

   < soapenv:Body>
      < env:getclientsbyids>
         < clientId> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</clientId>
         < tokenId> TK.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:-7086</tokenId>
      </env:getClientById>
   </soapenv:Body>
</soapenv:信封>

   <soapenv:Body>
      <env:getclientsbyids>
         <clientId>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</clientId>
         <tokenId>TK.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:-7086</tokenId>
      </env:getClientById>
   </soapenv:Body>
</soapenv:Envelope>

Reddy

推荐答案

Hi,

我的客户给了我SOAP请求格式的WSDL文件.这是基于SOAP的Web服务-并具有用于身份验证的令牌.

My Client has given me WSDL File with SOAP request format. This is SOAP based webservice-- and having tokens to authenticate.

请让我知道如何调用c#进行身份验证或使用API​​?

Please let me know how to call in c# to authenticate or consume API?

< soapenv:信封xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env =" http://xxxxxxxxxxxx/ISL/xxxxxxxxxxxxx">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://xxxxxxxxxxxx/ISL/xxxxxxxxxxxxx">

   < soapenv:Header>
< INF:INF_Security xmlns:INF ="http://com.INF.us.Security/">
< INF:APIKey> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIKey>
< INF:APIToken> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIToken> 
</INF:INF_Security>
</soapenv:Header>

   <soapenv:Header>
<INF:INF_Security xmlns:INF="http://com.INF.us.Security/">
<INF:APIKey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIKey>
<INF:APIToken>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</INF:APIToken> 
</INF:INF_Security>
</soapenv:Header>

   < soapenv:Body>
      < env:getclientsbyids>
         < clientId> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</clientId>
         < tokenId> TK.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:-7086</tokenId>
      </env:getClientById>
   </soapenv:Body>
</soapenv:Envelope>

   <soapenv:Body>
      <env:getclientsbyids>
         <clientId>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</clientId>
         <tokenId>TK.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:-7086</tokenId>
      </env:getClientById>
   </soapenv:Body>
</soapenv:Envelope>


这篇关于以C#调用SOAP Web服务API(SOAP请求格式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆