2007 Nov 19 6:31 PM
Hi,
I am trying to authenticate from Flex. I have attached the credentials to the WSDL (i.e. ?wsdl=1.1&sap-user=<username>&sap-password=<password>) and I have also tried using the setRemoteCredentials() and setCredentials methods. None of them are authenticating as I still recieve a popup box asking for credentials or a Stream Error. Below is a snippet of what I have.
service.wsdl ="http://abcde:8000/sap/bc/srt/rfc/sap/z_ws_service?wsdl=1.1&sap-user="userName"sap-password="+password;
service.ZDpGetUserInfo.resultFormat="e4x";
service.addEventListener(LoadEvent.LOAD, userInfoLoad);
service.addEventListener(ResultEvent.RESULT, userInfoResult);
service.addEventListener(FaultEvent.FAULT, faultHandler);
service.loadWSDL();
also does not work with...
service.wsdl ="http://abcde:8000/sap/bc/srt/rfc/sap/z_ws_service?wsdl=1.1";
service.setRemoteCredentials(userName, password);
any ideas? If I set a service account as the user in "Logon Data" in the Maintain Service (sicf) transaction, it works fine, but I want users to authenticate individually and not use the service account.
Hi,
I am trying to authenticate from Flex. I have attached the credentials to the WSDL (i.e. ?wsdl=1.1&sap-user=<username>&sap-password=<password>) and I have also tried using the setRemoteCredentials() and setCredentials methods. None of them are authenticating as I still recieve a popup box asking for credentials or a Stream Error. Below is a snippet of what I have.
service.wsdl ="http://abcde:8000/sap/bc/srt/rfc/sap/z_ws_service?wsdl=1.1&sap-user="userName"sap-password="+password;
service.ZDpGetUserInfo.resultFormat="e4x";
service.addEventListener(LoadEvent.LOAD, userInfoLoad);
service.addEventListener(ResultEvent.RESULT, userInfoResult);
service.addEventListener(FaultEvent.FAULT, faultHandler);
service.loadWSDL();
also does not work with...
service.wsdl ="http://abcde:8000/sap/bc/srt/rfc/sap/z_ws_service?wsdl=1.1";
service.setRemoteCredentials(userName, password);
any ideas? If I set a service account as the user in "Logon Data" in the Maintain Service (sicf) transaction, it works fine, but I want users to authenticate individually and not use the service account.
2007 Nov 19 7:10 PM
may be because you havent mentioned the sap-client in the url, its going to a default client and the password you are providing is for a different client
Raja
2007 Nov 19 7:17 PM
When specifying the client in the URL, I have the same issues.
2007 Nov 19 7:20 PM
in sicf , is the logon data required check box is checked?
(ps: i currently do not have access to system, but can check it up and let you know tomorrow)
Message was edited by:
Durairaj Athavan Raja
2007 Nov 19 7:27 PM
2007 Nov 20 5:29 AM
just check the check box "All Logons" and try it should take the uid/pwd passed thru url and should not prompt for authentication.
Raja
2007 Nov 20 4:24 PM
In ECC6, in the "Create/Change" service area inside "Maintain Service" (sicf), there are no check boxes named "All Logins". In the logon data tab, the closest thing would be the "Procedure" drop down which contains "Required with Logon Data" (tried), "Alternative Logon Procedure", "Required With Client Certificate (SSL), and "Standard Procedure" (tried).
2007 Nov 21 7:23 PM
sorry about the delay. in my case i am using a standard login and i dont have the problem you have.
I am trying to simulate your case, if successful, will post the results here.
Raja
2007 Nov 21 8:23 PM
2007 Nov 24 7:06 AM
may be FQDN is the problem.
try setting up the Fully Qualified Domain Name for you server and check again.
more on FQDN
https://wiki.sdn.sap.com/wiki/display/BSP/FullyQualifiedDomainName%28FQDN%29
2007 Nov 27 2:27 PM
2007 Nov 28 8:49 PM
Dennis -
I got the authentication stuff to work easily using the sap-username on the end of the WSDL. I think the syntax you are using is wrong in your example:
?wsdl=1.1&sap-user="+userName+"sap-password="+password;should be:
?wsdl=1.1&sap-user="+userName+"&sap-password="+password;That worked for me. The set[Remote]Credentials methods have nothing to do with what you are trying, they are for LiveCycle Data services. There is another more secure way to do this which is to base-64 encode the username and password and add it to the header of the HTTP request but, that is a bit cumbersome as if the U/P is wrong there is no easy way to notify the user.
I never do it the way you are showing here though, I simply put the SWF in the Mime repository and make sure you need a u/p to access it. When the user does their normal login thing their browser will get the MYSAPSSO2 ticket allowing them to use any webservices you have SSO configured for. This way is much cleaner and you don't have to worry about authorization in your Flex app that is consuming WebServices the browser handles it for you.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |