Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

Adding a custom SOAP header in the asp.net web application at run time

$
0
0

I have imported the web reference from wsdl file in to my asp.net web application. Also i have build my web service with TLS 1.2, to access the web service i have to pass the below header authentication while accessing the method.

X-IBM-Client-Secret X3yI1dK4cA4rP4fO8sF6wD4xR2wX1nQ8cR5oO1yQ4eF4iX0cL3

X-IBM-Client-Id af829919-5ea9-49ee-96b6-2b60fa3babf2

Also please find the below code i have used to access the details from web service.

ServicePointManager.SecurityProtocol=SecurityProtocolType.Tls12;XmlNode nodeVerfiedResult = objPANInquiry.GetPanStatus(txtPANNo.Text,"DIGITALDOST","1500000004","Pass@123","");XElement elementVerfiedResult =XElement.Parse(nodeVerfiedResult["APP_PAN_INQ"].OuterXml);string strAppStatus = elementVerfiedResult.Descendants("APP_STATUS").Select(x => x.Value).ToArray()[0].ToString();

Please guide me to add the above mentioned header in my application. Thanks in advance.

Please find the attached image which i have tried in soap UI it is working fine as expected

Please share code snippet to help me.

Many Thanks..


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>