I'm trying to call a service from a wsdl imported Screenshot
Here is an example of the code and I don't know how/where I have to pass the securityToken as header.
ProjectName.Service.ServiceClient serviceClient = new ProjectName.Service.ServiceClient();
int result = serviceClient.getDataFromDS(inputDTO); // <- Here i got the error because it doesn't find the SecurityToken in the header.
from Postman the call(POST) works, because I can put the header here: Screenshot
It also works using the (HttpWebRequest)WebRequest but I have to use the import wsdl as a client service. Here is an example of working call:
ProjectName.Service.LoginServiceClient loginServiceClient = new ProjectName.Service.LoginServiceClient();
loginServiceClient.login(loginDTO);
But here is so easy because it accepts only a xml input(inputDTO) and not a value in the header.
Thanks in advance.