Hi All,
Actually it is a SOAP service, because after I added the service refeference, below entry is made in config file.
<client>
<endpoint address="https://webservice.redf.gov.sa/RedfFinance.Finance.svc/RedfFinance"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFinance"
contract="ServiceReference_REDF.IFinance" name="WSHttpBinding_IFinance">
<identity>
<dns value="webservice.redf.gov.sa" />
</identity>
</endpoint>
</client>
We need to call their the service like below.
ServiceReference_REDF.Credential objCredential = new ServiceReference_REDF.Credential();//This Credential class is their's
objCredential.UserName = UserName;//Credentials to access each method.
objCredential.Password = Password;
ServiceReference_REDF.FinanceClient objCalc = new ServiceReference_REDF.FinanceClient();
objCalc.ClientCredentials.UserName.UserName = "redfweb";//Basic authentication,Credentials to access the service
objCalc.ClientCredentials.UserName.Password = Password;
var objREDFResponseBanks = objCalc.getBanks(objCredential);
Also our IP(client) should be whitelisted in their server. Their server firewall should not block us.