以C#调用SOAP Web服务API(SOAP请求格式)

以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>