I need to call web service using WEF. To access my web service I need to pass user credentials. I dont have any idea how to pass the user credential.
In web service builder:WS-Security section, we can see to options ( User Token and LTPA) but I am not very sure in which scenario, which one should get used.
Being confused, I passed the credential in 3 places in web service builder.
1. WS-Security section , I selected Username token and passed the credential.
2. In advanced section, username(basic auth) and password (basic auth)
3. In advanced section : Additional soap headers. For that I created one xml variable
But when I invoke my web service for the first time, always it gives [INVALID USERID/PASSWORD]. Next time it works. Again if I didnt execute the same web service for quite longer time (more than a hr)and then executes,same error arises. next time it works.
Could anybody help me in resolving this.