Overview of Profile Service API and Sh Interface Support

12-6 Developers Guide import javax.servlet.sip.SipServlet; import org.w3c.dom.Document; import java.io.IOException; public class MyServlet extends SipServlet implements ProfileListener { private ProfileService psvc; public void init { psvc = ProfileService getServletContext.getAttributeProfileService.PROFILE_SERVICE; } protected void doInviteSipServletRequest req throws IOException { String docSel = sh: + req.getTo + IMSUserState; Subscribe to profile data. psvc.subscribereq.getApplicationSession, docSel, null; } public void updateProfileSubscription ps, Document document { System.out.printlnIMSUserState updated: + ps.getDocumentSelector; } } Developing Custom Profile Service Providers 13-1 13 Developing Custom Profile Service Providers This chapter describes how to use the Profile Service API to develop custom profile rovider, in the following sections: ■ Section 13.1, Overview of the Profile Service API ■ Section 13.2, Implementing Profile Service API Methods ■ Section 13.3, Configuring and Packaging Profile Providers ■ Section 13.4, Configuring Profile Providers Using the Administration Console

13.1 Overview of the Profile Service API

OWLCS includes a profile service API, com.bea.wcp.profile.API, that may have multiple profile service provider implementations. A profile provider performs the work of accessing XML documents from a data repository using a defined protocol. Deployed SIP Servlets and other applications need not understand the underlying protocol or the data repository in which the document is stored; they simply reference profile data using a custom URL, and OWLCS delegates the request processing to the correct profile provider. The provider performs the necessary protocol operations for manipulating the document. All providers work with documents in XML DOM format, so client code can work with many different types of profile data in a common way. Figure 13–1 Profile Service API and Provider Implementation Each profile provider implemented using the API may enable the following operations against profile data: