BEA Systems, Inc.

BEA WebLogic SIP Server 2.2 API Reference


Package com.bea.wcp.profile

Support for accessing Profile information.

See:
          Description

Interface Summary
ProfileListener  
ProfileService Starting point for accessing the Profile service.
ProfileSubscription This is a class returned by ProfileService.subscribe.
 

Exception Summary
ProfileException  
 

Package com.bea.wcp.profile Description

Support for accessing Profile information.


Usage

An example usage may be like so:

    package com.bea.wcp.sip.profile;

    import com.bea.wcp.profile.*;

    import javax.servlet.sip.SipServletRequest;
    import javax.servlet.sip.SipServlet;

    import org.w3c.dom.Document;

    import java.io.IOException;

    public class FooServlet extends SipServlet implements ProfileListener {
      private ProfileService psvc;

      public void init() {
        psvc = (ProfileService) getServletContext().getAttribute(ProfileService.PROFILE_SERVICE);
      }

      protected void doInvite(SipServletRequest req) throws IOException {
        String docSel = "sh://" + req.getTo() + "/IMSUserState/";

        // example of a subscription
        psvc.subscribe(req.getApplicationSession(), docSel, null);

        // example of getting and changing a profile document
        Document doc = psvc.getDocument(docSel); // document is read only
        Document docCopy = (Document) doc.cloneNode(true);
        // futz with docCopy
        psvc.putDocument(docSel, docCopy);
        // do more processing
      }

      public void update(ProfileSubscription ps, Document document) {
        System.out.println("IMSUserState updated: " + ps.getDocumentSelector());
      }
    }
  

Documentation is available at
http://download.oracle.com/docs/cd/E13209_01/wlcp/wlss22/
Copyright 2006 BEA Systems Inc.