10-31-2011 11:43 AM
HI,
I have tried several ways to authenticate my user for a webservice call in Adobe Flex.
1)
webservice.setCredentials(ifUserId,ifPassword);
2)
webservice.setRemoteCredentials(ifUserId,ifPassword);
3)
webservice.headers = {Authorization:"Basic " + encoder.toString()}; //encode is encoded userid:password
4)
webservice.headers [ "sap-password" ] = ifPassword;
webservice.headers [ "sap-user" ] = ifUserId;
Some of these ways are working in case of correct logins. But when I provide a wrong userid/password combination, the popup is shown to provide the correct credentals. When I provide the correct ones, the popup is coming again and again, because it still uses the wrong credentials.
Can someone help me with the logon procedure.
Thanks in advance and kind regards,
Bart
12-15-2011 9:49 AM
Hi Bart,
You can set basic authentication headers in the headers property. Please check the documentation below:
http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/AbstractWebServic e.html#headers
Best Regards,
Tarun
12-16-2011 7:16 AM
Hi Tarun,
Could you please explain that a little bit and give me an example.
Because I already tried that...
It was not working, so I think I probably miss something smalll.
Thanks in advance and kind regards,
Bart