1

I am trying to update profile images from a Domino Java agent using the Connections Java API. I have followed this guide and used this sample from greenhouse for inspiration.

Although I don't get any exceptions, the images are not updated. Updating the telephone number works. Strange thing is, updating the jobtitle is also not working.

What I am doing is:

Create a basic endpoint

ConnectionsBasicEndpoint endpoint = new ConnectionsBasicEndpoint();
endpoint.setUser("MY_USERNAME");
endpoint.setPassword("MY_PASSWORD");
endpoint.setUrl("MY_COMPANY_CONNECTIONS_URL");
endpoint.setForceTrustSSLCertificate(true);

Get my Profile via the ProfileService and update the fields

ProfileService profileService = new ProfileService(endpoint);
Profile profile = profileService.getProfile(id);
profile.setTelephoneNumber("123-123-123"); // this works
profile.setJobTitle("my title"); //this does not work

And to upload an image

String id = profileService.getMyUserId();
profileService.updateProfilePhoto(file, id); //file is a java.io.File

Has anybody experienced a similar issue? I also tried it with a user with administration rights, but that made no difference. I am working on IBM Domino 9.0.1, IBM Connections 5.0 CR1 and I am using the latest Social Business Toolkit from openntf.

wmichi
  • 11
  • 1
  • do you have any logging ? or the SystemOut.log from your connections server? – Paul Bastide Dec 12 '14 at 14:43
  • On the Domino side everything seems fine (nothing in the logs). And in the connections log (profiles, common) there's also nothing. Maybe I should change the logging level on the connections server (profils cluster) to finest? – wmichi Dec 12 '14 at 14:50
  • 1
    I recommend you use CURL and test the API call out before you go down that route. http://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Adding_a_photo_to_a_profile_ic50&content=apicontent – Paul Bastide Dec 12 '14 at 15:04
  • Thanks Paul for your input. I was able to update/delete my profile photo by using CURL. I also tried it with a small standalone Java app using Apache HttpClient and the Connections API directly and this also worked. I will have a look at the connections logs on monday again. – wmichi Dec 12 '14 at 19:58
  • I tried upload photo by CURL: `curl "https://apps.na.collabserv.com/profiles/photo.do?key=...&lastMod=..." -o log.out -v -k -u user@mail.com:password -X PUT -H "Content-Type: image/jpg" -T 1.jpg` It returns: `The type of the photo file you provided is not supported`. I'm really confused (this file could be successfully uploaded in SC web interface). What I'm doing wrong? – pstr Jan 26 '15 at 15:03

0 Answers0