Provides interfaces to build Sh applications as per TS 29.329.


Interface Summary
ProfileData represents user profile data
UserProfileConnection A logical handler enabling applications to operate on user profile information on a particula HSS server.
UserProfileMessageListener listener to receive incoming message requests and responses.
UserProfileNotificationRequest message sent by Diameter server to a Diameter client in order to notify changes in the user data in the server.
UserProfileNotificationResponse sent by a client in response to the Push-Notification-Request command.
UserProfileReadRequest sent by a Diameter client to a Diameter server in order to update user data in the server.
UserProfileReadResponse sent by a Diameter server to a Diameter client in response to the User-Data-Request command.
UserProfileServer Identifies Home Subscriber Server
UserProfileSubscriptionRequest represents user data notification request from Home Subscriber Server(HSS).
UserProfileSubscriptionResponse is sent by a server in response to the Subscribe-Notifications-Request command
UserProfileUpdateRequest is sent by a Diameter client to a Diameter server in order to update user data in the server.
UserProfileUpdateResponse sent by a server in response to the Profile-Update-Request command.

Class Summary
ProfileKey Base class representing Keys to construct UDR,SNR,PNR requests to HSS.
ReadProfileKey Represents information needed to construct User Data Request(UDR)
SubscribeKey Represents information needed to construct Subscribe-Notifications-Request (SNR)
UpdateKey Represents information required to build Profile-Update-Request (PUR)
UserProfileServerFactory factory to create logical connection handle to Home Subscriber server.

Enum Summary

Exception Summary
KeyValidationException Indicates the missing information in UpdateKey, SubscribeKey, ReadProfileKey

Package Description

Provides interfaces to build Sh applications as per TS 29.329.

Following are message interfaces that represent request and reponse messages between a diameter client application and a Home Subscriver Server(HSS).

  1. UserProfileReadRequest
  2. UserProfileReadResponse
  3. UserProfileSubscriptionRequest
  4. UserProfileSubscriptionResponse
  5. UserProfileUpdateRequest
  6. UserProfileUpdateResponse
  7. UserProfileNotificationRequest
  8. UserProfileNotificationResponse
ProfileKey and its subclasses aid in creating valid request and response messages.
  eg: Using Sh API in a SIP/Http Servlet.
        InitialContext context = new InitialContext();
        // Look up a connection factory
        UserProfileServer connectionFactory = (UserProfileServer) context.lookup("sh2");
        UserProfileConnection connection = connectionFactory.createConnection();

        ReadProileKey rpk = new ReadProfileKey();
        UserIdentity uID = new UserIdentity("sip:bob@open-ims.test", UserIdentityType.PUBLIC_USER_ID);

        UserProfileReadResponse response =,false);
        ProfileData data =  response.getProfileData();
        System.out.println(new String(data.toBytes()));

For asynchronous way to invoke operations on Home Subscriber server One can either register a UserProfileMessageListener or implement a Message Driven Bean(MDB)listening to UserProfileMessageListener

eg one: below code shows how to register a listener and process received messages
      UserProfileMessageListener uml = new UserProfileMessageListener() {

          public void doPNR(UserProfileNotificationRequest message) {

          public void doUDA(UserProfileReadResponse message) {
                ProfileData data = message.getProfileData();
                System.out.println("Profile Data is" + new String(data.toBytes()));
      UserProfileReadResponse urr =, true);

eg two:

      UserProfileReadResponse urr =, true);
      ProfileData data = urr.getProfileData();
      Future future = (Future )urr;
         ProfileData data = urr.getProfileData();