This little sample was implemented in an Abstract Portal Component. Using WebDynpro Java should work this way, too, but was not tested.
The System was an Enterprise Portal 7.0 SP 16.
Make familiar with the KM Repository Structure
All contacts for a specific portal users will be stored in KM Repository “ume”. Within the subfolder “mycontacts” you can see all portal users. If you select one user you can see all contacts, the user has added to his contact list.
Accessing the UME Service
To get access to this service by runtime also, you have to add a Sharing Reference to “com.sap.netweaver.kmc.people”.
Accessing the user’s contacts
All-in-one sample code