Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice authentication not working (only via popup)

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

0 Kudos

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