How to retrieve the username/password of logged user so to use web services

Hi Experts,
we are using web services from a web dynpro application, the web services we use are CAF web services; actually we are "hardcoding" username and password so to be able to execute these web services, using this code before calling the web service:
wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,"testuser");
  wdContext.currentRequest_ReporteDeRendicionDetallada_RElement().modelObject().setInvokerProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,"testpassword");
but as this is not a very good practice, we want to replace the "testuser" with the logged user and, of course, retrieve the password and use it instead of "testpassword".
How can we achieve this? I couldn´t find any tips on this.
Best regards,
Marco.

Hello,
thanks for your anwsers, although I´ve followed both links I couldn´t find the answer to my problem.
I need to know how to retreive user and password from the UME of the portal so to be able to execute web services in the java stack, the UME is connected to a LDAP in our corporation.. so may be the passwords are not stored in the UME?
If it is not possible to retrieve the passwords of the users , which is the best practice to deal with username/passwords to execute CAF webservices from web dynpro java? Hardcoding is not a very good practice..
Best regards,
Marco.

Similar Messages

  • How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

    How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
    I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
    Unable to retrieve the data in multiple rows within webservice method.

    Hi Paul,
    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
    this is my code
    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
    for(var i=0; i<count; i++)
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    Thanks
    Hussam

  • How to get the list of values for a dynamic parameter using Web Services SDK?

    <p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>

    <p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>

  • How to get the username/password of the current owner of the running code

    Dear friends,
    Our product is running on the App Server(weblogic/websphere...) and we also use security provider(OpenLDAP) and kerberos to support SSO. Before, when a user tyies to login in the first time, the way we use to authenticate the user is:
    1) Accept the username/password
    2) Query the security provider(OpenLDAP) to get the principles.
    3) verity if the username/password is corrent or not.
    As we know, to query the principles, we need to provide a search user(both username and password) if we configured the access control of the ldap server:
    I have configured my envirioment as follows
    1) In the LDAP server, configured the Middle Tire user(The Operating System user running the App Server) to have the permission to query principles.
    2) The server is configured to runing on SSO envirioment.
    My question is could I get the username/password of the OS user running the App Server at runtime so that I can query the ldap server without explicitly providing the search user?
    Thanks,
    RR
    Edited by: Ricky Ru on Oct 9, 2011 1:50 AM

    Thanks EJP.
    I have made some progress on this. But I have met another issue.
    *1) Using JAAS to login.*
    loginContext.login();
                   Subject subject = loginContext.getSubject();
                   ldapContext = (LdapContext) Subject.doAs(subject, this);
    *2) Init the ldapContext to use the GSSAPI authentication*
    // this is called automatically by login()
         public Object run() {
              Hashtable ldapEnv = new Hashtable();
              ldapEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              ldapEnv.put(Context.PROVIDER_URL, "ldap://9.30.215.197");
              ldapEnv.put(Context.SECURITY_AUTHENTICATION,"GSSAPI");
              ldapEnv.put(Context.SECURITY_PRINCIPAL,"");
              ldapEnv.put(Context.SECURITY_CREDENTIALS,"");
              //System.setProperty("sun.security.krb5.debug", "false");
              // This tells the GSS-API to use the cached ticket as
              // credentials, if it is available
              System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");     
              try {
                   InitialLdapContext ctx = new InitialLdapContext(ldapEnv,null);
    But I got the following exception when excuting new InitialLdapContext(ldapEnv,null);
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is [email protected]
    Commit Succeeded
    javax.naming.AuthenticationException: GSSAPI [Root exception is javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))]]
         at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:150)
         at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694)
         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
         at LDAPKerbService.run(LDAPKerbService.java:66)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at LDAPKerbService.login(LDAPKerbService.java:40)
         at LDAPKerbService.main(LDAPKerbService.java:82)
    Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))]
         at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:194)
         at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)
         ... 16 more
    Caused by: GSSException: No valid credentials provided (Mechanism level: Integrity check on decrypted field failed (31))
         at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:663)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:230)
         at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
         at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:175)
         ... 17 more
    Caused by: KrbException: Integrity check on decrypted field failed (31)
         at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:61)
         at sun.security.krb5.KrbTgsReq.getReply(KrbTgsReq.java:185)
         at sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:294)
         at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:106)
         at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:562)
         at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:594)
         ... 20 more
    Caused by: KrbException: Identifier doesn't match expected value (906)
         at sun.security.krb5.internal.KDCRep.init(KDCRep.java:133)
         at sun.security.krb5.internal.TGSRep.init(TGSRep.java:58)
         at sun.security.krb5.internal.TGSRep.<init>(TGSRep.java:53)
         at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:46)
         ... 25 more
    Do you have any clue on this? Thanks.

  • How to retrieve the username of the logged in user

    Hi, I've been looking for a possibility retrieve some user data like the username of the currently logged in user since yesterday but could not find anything proper. I'm relatively new to APEX. Could someone perhaps point me to an easy-to-understand document? I would be glad if it would also cover the basic of authentication and authorization schemes.

    Hi, thanks for your reply. I've already changed my handle but the system said that it would take about one hour for the change to be done.
    Actually I have the following situation. I have a table that associates IDs to names. The names are the same as the user names of the users in APEX. On an APEX-Page I have a select-box that lists all available IDs. What I want to do is to automatically pre-select the ID of the currently logged in user. So I have created an authentication scheme as described in the help using following options:
    Based on a pre-configured scheme from the gallery > Show Login Page and Use Application Express Account Credentials
    And then I made the new authentication scheme the application's current scheme. Then I went to the page definition and created a new process, selecting "On Load - After Regions" as "Process Point", and entered the following source:
    declare
    nID number;
    begin
    :P2_TEMP := :APP_USER; -- this is just for debug purposes
    select b.ID into nID from MYTABLE b where b.NAME = :APP_USER;
    :P2_ID := nID;
    exception
    when others then
    null;
    end;
    But it doesn't work. Since the text field P2_TEMP stays empty I believe I am doing something wrong with APP_USER. Anybody who can help me with that?
    Edited by: user10977071 on 05.04.2009 08:57

  • How to retrieve the data stored in BLOB field in MySql using java?

    Hi all!
    i stored a file content into the MySql database in BLOB field.
    and i now want retrieve the data......
    Please help me out in doing the task...........
    Thanx...........

    Thrisha..
    When u get a result set u can have rs.getBlob() function that will give u a BLOB object that can be captured using Blob interface of javax.sql package...
    Blob interface has getBinaryStream, getBytes etc as functions...
    i think i cleared u
    regards
    Shanu

  • How to retrieve the Source XML Payload into an External System using message ID?

    Dear Experts,
    I have a requirement to retrieve the inbound XML message payload based on Message ID into Backend ERP system for reference or re-process as needed. Request you to let me know the technique to get the source payload of successful message.
    Kind Regards,
    Madhu

    Hi,
    Check following links:
    http://help.sap.com/saphelp_nw04/helpdata/en/31/6c5c3c3806af06e10000000a11402f/content.htm
    http://wiki.sdn.sap.com/wiki/display/Snippets/PI+Monitoring+Functionality+-+Fetching+Data+from+SXMB_MONI+Standard+Tables+-+Part+I
    https://wiki.sdn.sap.com/wiki/display/Snippets/PI+Monitoring+Functionality+-+Fetching+Data+from+SXMB_MONI+Standard+Tables+-+Part+II
    -Deepak

  • How to retrieve the saved passwords from a hard drive?

    Hello,
    My laptop mobo died so I removed the hard drive and installed into my desktop. I am able to explore all files. Is it possible to retrieve these passwords?

    http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile

  • How to retrieve the value of field in user exit EXIT_SAPMF(in the include)

    Hello All,
    I am using user exit EXIT_SAPMF02K_001 for limiting the user to input the PAN number upto 10 character and first 4 character should be alphanumeric.I have done the logice and its running fine. The problem i am facing is that i could not get the screen input in the include where i have written the code ie. i am not able to get the screen field when the user exit is executed .In short i m not getting the value of the field ie(J_1IMOVEND-J_1IPANNO) in the code which i have written in the include.
    Can you pls tell me how do i get the value of the field PAN in the code . I have debug the program and it doesnot show any value.
    Reply ASAP.
    Thanks in Adv.
    Pravesh Deshbhratar

    Hi ,
    The Transaction code used is FK02.
    Secondly when i am using the debugger the i m getting into the INCLUDE Of the User Exit EXIT_SAPMF02K_001.
    So i dont think i am using incorrect user exit.
    what is required is field value in the include of EXIT_SAPMFO2K_001.
    Thanks
    Pravesh

  • How to retrieve the xml data into datagrid in vb6.0 using dom method

    <?xml version="1.0" standalone="yes"?>
    <Student_Details>
      <Student>
        <Name>sandeep</Name>
        <Age>12</Age>
        <Mobile>123456789</Mobile>
      </Student>
      <Student>
        <Name>ololjk</Name>
        <Age>kjlokmo</Age>
        <Mobile>njonojniohuj</Mobile>
      </Student>
      <Student>
        <Name>Sandeep Pr</Name>
        <Age>12</Age>
        <Mobile>9865231870</Mobile>
      </Student>
      <Student>
        <Name>ololjk</Name>
        <Age>kjlokmo</Age>
        <Mobile>njonojniohuj</Mobile>
      </Student>
      <Student>
        <Name>ololjk</Name>
        <Age>kjlokmo</Age>
        <Mobile>njonojniohuj</Mobile>
      </Student>
      <Student>
        <Name>ololjk</Name>
        <Age>kjlokmo</Age>
        <Mobile>njonojniohuj</Mobile>
      </Student>

    this forum is for vb.net, for vb6 you could try
    http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier
    http://forums.codeguru.com/forumdisplay.php?4-Visual-Basic-6-0-Programming
    PS. vb6 is ancient software you might want to consider a language from this century

  • Urgent! How to create a ebook using web services?

    Hi I would need some help on how to creating a e-book using web services. Sample code would be good for me.
    I had been finding sources for quite sometime but i doesn't seems to be easy to find as compare to andriod.
    Description:
    Windows 8.1 SDK Sliverlight.
    The e-book will on PDF format.
    Once user click e-book icon, i would link to my database to retrieve all the ebook available via web services.
    Then user select the e-book, the content will be again retreive from my database to the users.
    Is there any solution? I need it quite urgent.

    Hi Ding Zheng,
    >>Once user click e-book icon, i would link to my database to retrieve all the ebook available via web services. Then user select the e-book, the content will be again retreive from my database to the users.
    According this approach, I would suggest you make good use of build-in API to render PDF in store app. see more classes in the following namespace.
     http://msdn.microsoft.com/en-us/library/windows/apps/windows.data.pdf.aspx. Using this APIs need PDF file in local storage, so I list the following steps
    for you to try.
    Step 1, Store PDF file in web site folder and save the PDF URL in database.
    Step 2, Use Web service/WCF/REST service to public the PDF to store app.
    Step 3, Store app uses service to get PDF list and then display them.
    Step 4, User choose one PDF, get the PDF download URL from service and then download it on local storage. Store app support download file form server, you can use BackgroundDownloader. See from
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounddownloader.aspx.
    Step 5, Use PDF APIs to render it in store app. See code sample
    https://code.msdn.microsoft.com/windowsapps/PDF-viewer-sample-85a4bb30#content.
    Please feel free to let me know if you have any concerns.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • How to retrieve the admin console password

    hi,
    How to retrieve the password for the admin console. I have forgotten it. I am
    using 8.1
    Thanks
    Ashwani

    Hi,
    I don't know of a way to retrieve the administrators password. Are you sure there
    is one? I know how to change or reset it from the command line. Then you'll
    know what it is :)
    I did the following:
    %JAVA_HOME%\bin\java -cp %WL_HOME%\WLS\server\lib\weblogic.jar weblogic.Admin
    -adminurl localhost:8301 -username system -password patbumpus invoke -mbean Security:Name=myrealmDefaultAuthenticator
    -method changeUserPassword system patbumpus password
    You can also try -method resetUserPassword and you don't have to know the original
    password.
    There is a problem with changing the administrator's password. You need to update
    the boot.properties file in the domain directory as well which you can do in a
    sed script. If you don't, then the server won't boot. Also, there might be issues
    with changing the administrator's password and then being able to start managed
    servers. I had a problem, but didn't investigate enough to rule out user error.
    This is supposed to be all fixed in WLS 9.x.
    I know that I didn't answer your question, but maybe something was useful.
    pat
    "Ashwani Kalra" <[email protected]> wrote:
    >
    hi,
    How to retrieve the password for the admin console. I have forgotten
    it. I am
    using 8.1
    Thanks
    Ashwani

  • *** How to get the username in a custom password change routine....

    How to get the username in a custom password change routine / procedure / form when a user's password has expired and is redirected automatically to this custom program?
    We use the 2nd parameter in LOGIN_URL column in WWSSO_LS_CONFIGURATION_INFO$ table to get to this custom change-password proc.

    OK !
    Use that maybe good :
    select USERID into v_user from sys.aud$
      where ntimestamp#=(
      select max(ntimestamp#)
      from sys.aud$ );

  • How to send the username logged in to a URL

    Hi everyboy!
    I have a question about ORacle Portal version 10
    I have created a portlet which contains a page, in this page have several URL. This URL can be jsp, asp, etc.
    Do you know how to send the username to the URL?,
    I want to send the username in a parameter.
    Is it necessary create an omniportlet?
    How do I must do?
    I expect your prompt reply, any help will be very appreciated.
    Thank you in advance.
    Best Regards

    Hi Angrydot
    Thank you for helped me,
    But I want that the username be stored in a parameter and this parameter must be sent by method post.
    In the oracle portal when I created the URL I only want to write only url, without writting ?variableusername=valuevariableusername.
    How do I must create this variable?
    Any help will be very appreciated.
    Best Regards

  • Hi, I recently changed my username for my iTunes/iCloud account. Can anyone tell me how i change the username on my iCloud iPad? When I go onto setting to change it it keeps the username grey so I can't even select it?

    Hi, I recently changed my username for my iTunes/iCloud account. Can anyone tell me how i change the username on my iCloud iPad? When I go onto setting to change it it keeps the username grey so I can't even select it?

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
    In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > iTunes & App store, scroll down and tap your ID)
    If you are using iMessages or FaceTime, you will also need to log out and into your ID there too.

Maybe you are looking for

  • Oracle XSLT Transformation not preserving space in text element

    If we have a BPEL process which is calling a XSLT transformation contains the code similar as below: for Populating an element with white space only <tns:TargetField> <xsl:text disable-output-escaping="yes"> </xsl:text> <!--Note the whitespace , also

  • TS3297 What can I do for Message 'Your request cannot be processed Error code: 1009  ?

    Message 'Your request cannot be processed Error code: 1009 What can I do for above error?

  • Need help - nokia 6600 fold

    Hi, have had nokia 6600 fold for couple of years - love it ! no probs, but have just found a strange symbol on  screen which ive never seen before ? Its a yellow message envelope  which spins and then becomes what loooks like a paper clip ? Cannot fi

  • EEM policy: Syslog ED & logging Discriminator = Crash

    Hi everyone! I found a new bug in cisco IOS 15.1(4)M3 when running EEM script with syslog event detector. If system logging performed using the "logging discriminator" and run concurrently EEM script with syslog event detector, then Cisco router cras

  • Frozen and Blank Mac Mail

    Today my Mail has suddenly Frozen. There are quite a few topics on this and i have tried all the suggestions so far, Permissions, moving Mail from libery etc but as yet nothing has worked. When i start mail from the dock it, after a while, opens but