Updating user image with API

We're running portal 9.0.4.1.0 (db is 9.0.1.5.0).
I have both dbms_ldap and java working, updating text attributes of a user in th eOID (name, phone etc).
How can I use any of the methods for setting a new jpegphoto for a user?
With dbms_ldap I've gotten it to run without error but with no effect.
Java gives me "javax.naming.directory.InvalidAttributeValueException: Malformed 'jpegphoto' attribute value;"
This version of dbms_ldap doesn't have blobs, just raws.
Any ideas?
Kind regards
Tomas Albinsson

Tomas,
I don't have an example... but careful cause the DBMS_LDAP API has support for binary attributes of sizes till 32k in 9x DB version. Why you don't use the ldapadd functionality? It will be a lot easier... Plus the images are not something you change that often.
I hope it helps...
Cheers,
Pedro.

Similar Messages

  • Update User Mapping ID api

    Hi,
    Does anyone know if there is an api to update user mapping ids for users in EP6.0 Portal Database.
    I know it can be done in the standard User Import with the inclusion of $usermapping$ but wanted to know of there is a way to do it in a bespoke program to help automate the addition of portal users who will require access to the connected R/3 system (of which there will be many).
    Thanks for any help you can offer,
    Steve.

    Hi Steve
    Try the following code.
    IPortalComponentRequest req = (IPortalComponentRequest) this.getRequest();
    IUserMappingService iumser = (IUserMappingService) PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);
    IUserMappingData iumdata = iumser.getMappingData("System Alias", req.getUser());
    Map map = new HashMap();
    try {
        iumdata.enrich(map);
    } catch (Exception e) {}
    String userid = (String)map.get ("user");
    String password = (String)map.get ("mappedpassword");
    The following code stores usermapping info.
    IPortalComponentRequest req = (IPortalComponentRequest) this.getRequest();
    IUserMappingService umapser = (IUserMappingService)
    PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);
    IUser userid = req.getUser();
    IUserMappingData iumdata = umapser.getMappingData ("System Alias", userid);
    Map map = new HashMap ();
    try {
         map.put("user","userid");
             map.put("mappedpassword","password");
            iumdata.storeLogonData(map);
    } catch (Exception e) {response.write(e.getMessage());}
    Hope this helps.
    Regards,
    Yoga

  • Updating User field with ListItemFormUpdateValue object and ValidateUpdateListItem for a file metadata

    Hi Every body,
    Please this is very argent I'm searching for this problem sine a week with no success
    how can I update a user field (single and multi) using ListItemFormUpdateValue object and ValidateUpdateListItem method
    Thanks in Advance
    khatib7

    Hi,
    Seems there are already replies in your another similar thread about this issue:
    https://social.technet.microsoft.com/Forums/en-US/5e67dc3d-c808-49ee-9aab-383a5cea5bce/sharepoint-angulr-rest-api-update-file-item-userd-field-property?forum=sharepointdevelopment
    Please check whether they are helpful to you.
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Adding & updating user tables with DI

    Hi, how to I add & update records of a user defined table with DI? Is there an object for this, or do I just do a DoQuery(insert etc) ?
    Thank you.
    Jose.

    Hi José,
    In the DI API you can use the UserTable object to add, update or delete records as long as the user table is not part of a UDO.
    Example:
    // Link to the UDT - Note: table name does not include @ prefix
    SAPbobsCOM.UserTable sboTable = (SAPbobsCOM.UserTable)_sboCompany.UserTables.Item("Test2");
    // To add a record
    sboTable.Code = "12345678"; // must be unique
    sboTable.Name = "My New Record";
    sboTable.UserFields.Fields.Item("U_MyUDF").Value = "TEST";
    if (sboTable.Add() != 0)
        _sboApp.SetStatusBarMessage("Record add failed: " + _sboCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, true);
    else
        _sboApp.SetStatusBarMessage("Record added successfully.", SAPbouiCOM.BoMessageTime.bmt_Medium, false);
    // To update a record
    if(sboTable.GetByKey("12345678"))
        sboTable.UserFields.Fields.Item("U_MyUDF").Value = "UPDATED";
        if (sboTable.Update() != 0)
            _sboApp.SetStatusBarMessage("Record update failed: " + _sboCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, true);
        else
            _sboApp.SetStatusBarMessage("Record update successfully.", SAPbouiCOM.BoMessageTime.bmt_Medium, false);
    else
        _sboApp.SetStatusBarMessage("Record 12345678 not found.", SAPbouiCOM.BoMessageTime.bmt_Medium, true);
    Kind Regards,
    Owen

  • Csvde update user info with csv file

    I see many ways how to do this online but I don't understand how to write the entire script myself from what's being showed online, being it from a video or from another forum - due to everyone else s' methods involves different scenarios.
    I would like know what does my excel/csv file need to look like if I'm updating only each AD object inside an OU with the following:
    TELEPHONE NUMBER, FAX NUMBER, MOBILE NUMBER, TITLE - the other entries are already there, such as web address, email address, display name.
    And then what am I going to add in the command line: CSVDE -i -f mailboxdetails.csv ect?

    I agree with Ed.
    If you have a Windows 2008 R2 AD in place , you can achive this goal by using a .csv file and a script with couple of lines in PowerShell  .
    First create the csv file which must contains the following header and its value  (any other if you want) :
    SamAccountName,Title,FaxNumber,MobilNumber,TelephoneNumber 
    then use the below script :
    Import-Module activeDirectory
    $allusers =Import-Csv c:\users.csv
    foreach($user in $allusers)
    Set-aduser -identity $user.samaccountname -Title $user.title -mobilePhone $user.mobileNumber -Fax $user.faxNumber -add @{TelephoneNumber=$user.telephonenumber }
    Note : just change the .csv file name and it's path .
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer. ---------- MCITP - Exchange 2010 | MCITP - Windows Server 2008 R2

  • Update Request User Details with updateRegistrationUserDetails

    Hi,
    I have the following scenario: The Self-Registration form is defined with the fields First Name, Middle Name, Last Name, Manager Login. When the request is created, based on the Manager Login, the other user's attributes are set according to the Manager's Attributes. So when the manager goes to approve the request, most of the user information are already set. To update the User Details in the request, I can call the updateRegistrationUserDetails of Request API.
    Problem: I can not update the fields other than those defined in the FormMetadata.Xml. So I have to add the fields and set them as optional but I don't want to show non required fields to the end-user. I wish to have those attributes as not visible in the self-request form. Then I can update the information using the API.
    Question: How to add fields to the User Details of the request and not show them in the self-request form?
    Thanks,

    As I've said, I could not update the request fields that were not declared in the FormMetadata.xml. You can try set them as not visible but I am not sure the visibile attribute works for the SelfRegistration form. If it is not a problem, you can show the fields and set them as optional true. In my exaple, the SelfReg form has a manager employee code field.
    Create an entity adapter and assign it to the Request object, pre-insert.
    1) create two variables: requestKey, requestObjecAction, managerEmpCode (in my example)
    2) test if the request object action is Create Entity.
    3) call the method to update the request. below is my example:
         // Updates the request with the information of manager: Manager Login,
         // Location, Department and Organization
         public String updateRequestWithManagerInfo(long requestKey, String managerEmpCode) {
              String result = JavaTaskBase.EXECUTION_ERROR;
              logger.debug("******** Starting updateRequestWithManagerInfo *************");
              logger.debug("requestKey: " + requestKey);
              logger.debug("managerEmpCode: " + managerEmpCode);
              try {
                   HashMap<String, String> filter = new HashMap<String, String>();
                   filter.put(JavaTaskBase.USR_UDF_EMPLOYEE_ID, managerEmpCode);
                   String[] columns = new String[] { JavaTaskBase.USER_KEY_FIELD,
                             JavaTaskBase.USER_LOGIN_FIELD, JavaTaskBase.USR_UDF_LOCATION,
                             JavaTaskBase.USR_UDF_HR_DEPARTMENT,
                             JavaTaskBase.ORGANIZATION_ATTRIBUTE_NAME };
                   logger.debug("Querying User by EmpCode...");
                   // Update Request Attributes: requestKey, ManagerId
                   tcResultSet resultSet = this.getUserOperations().findUsersFiltered(filter, columns);
                   logger.debug("tcResultSet.getTotaRowCount(): "+ resultSet.getTotalRowCount());
                   resultSet.goToRow(0);
                   String organizationName = resultSet.getStringValue(JavaTaskBase.ORGANIZATION_ATTRIBUTE_NAME);
                   String managerLogin = resultSet.getStringValue(JavaTaskBase.USER_LOGIN_FIELD);
                   String managerLocation = resultSet.getStringValue(JavaTaskBase.USR_UDF_LOCATION);
                   String managerDepto = resultSet.getStringValue(JavaTaskBase.USR_UDF_HR_DEPARTMENT);
                   String managerKey = resultSet.getStringValue(JavaTaskBase.USER_KEY_FIELD);
                   logger.debug("Manager Organization: " + organizationName);
                   logger.debug("Manager Login: " + managerLogin);
                   logger.debug("Manager Location: " + managerLocation);
                   logger.debug("Manager Department: " + managerDepto);
                   logger.debug("Manager Key: " + managerKey);
                   // Prepares the information to update the request
                   HashMap<String, String> values = new HashMap<String, String>();
                   values.put(JavaTaskBase.ORGANIZATION_ATTRIBUTE_NAME, organizationName);
                   values.put(JavaTaskBase.USR_UDF_LOCATION, managerLocation);
                   values.put(JavaTaskBase.USR_UDF_HR_DEPARTMENT, managerDepto);
                   values.put(JavaTaskBase.USER_MANAGER_LOGIN, managerLogin);
                   logger.debug("Updating Request Info...");
                   // Updates the request
                   this.getRequestOperations().updateRegistrationUserDetails(
                             requestKey, values);
                   logger.debug("Request Updated Successfulfy.");
                   result = managerKey;
              } catch (Exception ex) {
                   logger.error("Error in updateRequestWithManagerInfo method", ex);
                   ex.printStackTrace();
                   result = JavaTaskBase.EXECUTION_ERROR;
              return result;
    thanks,
    Renato.

  • How to update image with data from database?

    hi,
    is it possible to update an image object which serves as template with some data from a database table like user name etc. by converting it to image bytes and how? The final image would show user name as part of the image

    anybody?

  • Updating user with Org Units using NSAPI

    We have a requirement where we need to update users with different Organizational Units using an external system. The integration guide lists an NSAPI that might be used for this operation, Create/Update Person. This just says that we need to use the XML received from a Get person details API and use it as a request XML.
    The problem we are facing is figuring out where to place the new Org Unit details in the request XML.Would anyone know about that detail.
    Is this even the correct API for achieving the requirement or are we looking at the wrong thing here

    Hi,
    I've changed the input type to select(multiple) for that field and it works fine when I order it from the portal directly. Its able to set multiple values into the field when an sql query return more than one row.
    The problem only occurs when I use the RAPI for making a request to that service.
    The structure I use for passing data to that field is:
                       <req:Field>
                             <req:name>FieldName</req:name>
                               <req:value>                             
                                  <req:string>Value1</req:string>
                                  <req:string>Value2</req:string>
                               </req:value>
                        </req:Field>
    which is what you've pasted above.
    Even if I stop sending any value to this field and only send values to other single value fields, it still gives the same error message.

  • How to change Analyzer user password with Administration API?

    Hi,<BR>I would like to change Analyzer user password with Administration API. Can someone post some sample commands to do the task?<BR><BR>I would just like to write an application to change end user's Analyzer password.<BR>As I see I would need to do the following:<BR>1. login with admin userid/password<BR>2. execute some method to change password for required userid. I think the input parameter should be userid (of the user I would like to change password) and new password (the new password for the user).<BR>3. logout<BR><BR>Can someone post some sample code (commands to execute)?<BR><BR>Thanks,<BR>grofaty<BR><BR>My system:<BR>Analyzer Server 7.0.1.<BR>Essbase server 7.1<BR>Windows XP SP2<BR>

    <blockquote>quote:<br><hr><i>Originally posted by: <b>knightrich</b></i><BR>Hello Mr. Jordan.<BR><BR>I would like to exchange some thoughts about "housekeeping" Analyzer reports in preparation for migration from Analyzer 7.0.0.0.01472 to 9.x:<BR><BR>...<BR><BR>Did you solved such a problem or do you have an idea if it could be solved with the Admin API methods?<BR> ...<BR>Migration from 7.00 to 9.x: As we heard last week the "Migration Wizard for Reports" in 9.3 should be able to migrate reports. Do you have experience or more detailed information about that Wizard?<BR><BR>Many thanks in advance<BR><BR>knigthrich<hr></blockquote><BR><BR>knighrich, <BR>I'd like to be more help, but I have no experience with System 9. I did substantial cleanup when we migrated from Analyzer 6 to Analyzer 7.1, and even more cleanup when moving up to 7.2, but our installation is smaller in scale than yours and we didn't need to automate report cleanup.<BR><BR>You might be able to get the ownership information you need through the back door, doing a direct query on the database, but simpler might be an export users, at least from 7.0. (This facility probably doesn't exist in system 9; it was dropped in 7.2 in favor of an undocumented API) The export file is an xml file that could easily be parsed to identify reports that have the administrator as user and then a second pass to delete those with otuer ownership as well. As previously suggested, you might be able to get this by a well crafted SQL query against the repository.<BR><BR>Procedurally, we have both public reports that have the blessing of management and are widely available, owned by a "public owner", and private reports developed by indivdual users and shared or not. Our team maintains the public reports, but not the private reports. We may be asked to make a previously private report public and take over maintenance of it. <BR><BR>I hope that you can find a solution that meets your needs. Certainly a call to customer support to identify a poorly documented feature would be in order.<BR>

  • Image does not update in loop with control

    Hi all,
    I am trying to make a data playback vi.  I have some data recorded, and images recorded from another vi saved onto my computer.
    I want to sync the data with the video, so we can tell what was happening visually when there is something interesting happening on the waveform etc
    I successfully made a real-time playback of the data and video.  The speed of the playback is selectable and works well.  The image output is inside a while loop.
    However, I would also like to make a different case where the time is selectable via a slider.
    The setup for the video playback is almost identical.  The only difference is that instead of the loop iteration output hooked up to the image array indexing, the output of the
    front panel slider is hooked up.
    However, this small changes is a big problem!  The data in the wires updates as I slide the slider fine, but the image in the front panel does not.
    If I scroll around the front panel the image WILL update, or if I zoom in or out etc.  Any action except moving the slider updates the image.
    This is somewhat confusing because the image updates with no front panel activity at all when using the iteration # output... why should the refresh care about getting
    the indexing from one source or another?
    I tried playing around with my display settings, like resolution, acceleration, color depth.  I've also added wait times.  I also tried to put in a flat case structure with the image
    update first, then checking the slider value and shift registering that around the while loop.
    It is probably something weird with Windows, but is there some way to 'trick' LabVIEW into a redraw? 

    Ah, I'm dumb.
    So when you have a selectable case structure (lets say two cases) and an image out in each it creates two image out windows in the front panel!
    The other image out was like 3 screens away for whatever reason, and THAT one was updating just fine.
    Now to put the case structure inside the while loop instead of the other way around so I can just have one image out...

  • How does schedule with RESTful API a Webi report for a group of users ("Schedule For" to "Schedule for specified users and user groups" with one or more users/groups)?

    SAB BO 4.1 SP1
    Does it have an RESTful API to schedule a Webi report with the parameter to specify a group of users ("Schedule For" to "Schedule for specified users and user groups" with one or more users/groups)?

    Hello Ricardo,
    have you try a call like this one ?
        <schedule>
          <name>"test"</name>"
          <format type=\"webi\"/>
          <destination>
            <inbox>
             <to>userId1,userId2,userId3,groupId1,groupId12</to>
            </inbox>
          </destination>
        </schedule>
    Regards
    Stephane

  • IPod updates 2 touch with the new software, and from the update they are not connected with Time phase. They appear calling but never they enter the calls. I make calls with other users and if one connects but in these two not from the update

    iPod updates 2 touch with the new software, and from the update they are not connected with Time phase. They appear calling but never they enter the calls. I make calls with other users and if one connects but in these two not from the update

    I use Firefox 95% of the time, and there's no problem with flash content (and I'm still at .55 - downloaded .64 last week but I haven't got round to making the change yet). At the rate they've been changing it recently it may well be out of date already .
    I've been trying it in Safari, too with no problems apart from You Tube, but that's because I'm blocking Google cookies.
    One thought does occur - if your Flash preferences are set to block all Local Storage, it may be that the problem site is trying to use Flash cookies (LSOs). I had this problem recently with the BBC iPlayer streaming content. Little Snitch notified an attempt to connect to a new URL - emp.bbci.co.uk.
    If I disallowed it, no streaming; when I allowed the connection, it still wouldn't stream, so I did a bit of digging and came to the conclusion that it was trying to set a Flash cookie. When I unblocked, lo and behold - streaming resumed as normal.
    I now have LSOs blocked in a more subtle way that lets the site think it's being set (but it ain't) and the streaming still works.
    As for permissions repair - always repair from local; the permissions on the original disc will have been superceded by updates and new installations of Apple software.
    DU needs to be reading the packages on the HD, not the (now out of date) install disc.
    The recurring repair messages are normal and don't mean anything's wrong. As long as the final message is 'repair complete' there's no need to dwell on it.
    http://support.apple.com/kb/TS1448 (for Leopard and Snow Leopard - Lion no doubt has it's own set).

  • Set the ACL with API by non-admin user

    Hi experts,
    We are enhancing the file upload functionalities with setting the readers of the documents. The upload user is not admin user but he can have the full control or permission owner of the folder, but we found he can't still setting the ACL of the documents he created in the folder. While if he has the admin role, he can setting the ACL successfully.
    Can the permission owner be inherited? Or any other way to achieve this? Urgent! Any helpful anwser will be reward, many tks!!!!

    Hi,
    If you are doing it with API, always post the code.
    Did you check the logfile for exception, also post them.
    Is the current user permission owner of the folder/file?
    If not he cannot assign permissions/ACL.
    Check this for more:
    http://help.sap.com/saphelp_nw70/helpdata/EN/dc/2a2a17b8ae11d5993900508b6b8b11/frameset.htm
    Inheriting permission owner:
    If you save permissions on folder/file, the system stops inheriting permissions for the object in question.
    But already inherited ACL exist on the folder/file.
    Regards,
    Praveen Gudapati

  • Im trying to update db table in  user exit, with the internal table

    Im trying to update db table in user exit, with the internal table
    my scenario:
    loop at itekpo.
    updating itekpo -
    > at the end of user exit the db table ekpo have to be updated
    endloop.
    Im updating internal table, using 
    MODIFY itekpo TRANSPORTING INCO1 INCO2  WHERE ebeln = itekpo-ebeln
    where itekpo is internal table, but it is not updating the db table 'ekpo'.
    i also tried updating ekpo directly !
    Thanks in advance

    Hi,
    you can search in the forum itself,
    Try this link for instance
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=tocreateaBADI&adv=false&sortby=cm_rnd_rankvalue
    You can find a code for finding BADI as a report with the following Transaction
    finding badis
    How to find BADIs
    Reward if helpful
    Regards
    Byju

  • I have windows vista user account with administrator privilege. I am unable to update mozilla firefox to the latest version. It is saying "do not have required privileges". I already uninstalled the previous version :(

    I am unable to update mozilla firefox. I have user account with administrator privilege.

    Try to run the installer as Administrator via the right-click context menu (Run as Administrator).

Maybe you are looking for