WebSphere brand IBM WebSphere XML Document Management Server, Version 7.0

SUBSCRIBE flow for xcap-diff using rls-services documents

The xcap-diff event header subscription processing differs from the UA-profile event header.

About this task
The following describes a possible flow of events during an xcap-diff subscription event:
  1. A user sends a subscribe request
  2. Subscription request entries are parsed
  3. The user receives 200 response, then initial notify
  4. User updates one of entries in one of the documents from the subscribed directory.
  5. Subscribed user receives a notify
  6. User receives one termination notify

Following is a detailed description of these events.

  1. A user sends a subscribe request.
    SUBSCRIBE sip:user1@example.com:5080;transport=UDP SIP/2.0
          Via: SIP/2.0/UDP example.com:5060
          From: <sip:user1@example.com:5060>
          To: <sip:tester1@example.com>
          Call-ID: 1
          Max-Forwards: 70
          Expires: 120
          Event: xcap-diff;diff-processing=xcap-patching
          accept: application/xcap-diff+xml
          CSeq: 1 SUBSCRIBE
          Contact: sip:user1@example.com:5060;transport=UDP
          Subject: UAS
    	     Content-type: application/resource-lists+xml
          Content-Length: 256
    
    <?xml version="1.0" encoding="UTF-8"?>
    <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
      		<list>
        		<entry uri="resource-lists/users/sip:xdms1@us.acme.com"/>
        		<entry uri="rls-services/users/sip:xdms1@us.acme.com/index"/>
        		<entry uri="resource-lists/global/doc.xml/~~/resource-lists/list[@name="friends"]"/>
        		<entry uri="resource-lists/global/doc.xml/~~/resource-lists/list[@name="buddies"]/@id"/>
        		<entry uri="resource-lists/users/sip:xdms2@us.acme.com/doc.xml"/>
        		<entry uri="bad_auid/global/dumb.xml"/>
      		</list>
    </resource-lists>
  2. Entries are parsed and sent through the filter chain for validation, authorization, and subscription addition.
    1. Entries 1 and 2 are valid and exist.
    2. Entries 3 and 4 are valid, exist, and match the node-selector template for their AUID.
    3. Entry 5 does not exist yet.
    4. Entry 6 is not valid.
  3. User receives a 200 response, then the initial notify.
    1. Document elements 1 and 2 were the only ones currently in the user directory.
    2. Document element 3 is from the second entry in the subscribe.
    3. Element element is from the third entry in subscribe, and shows contents.
    4. Attribute element is from the fourth entry in the subscribe, and shows value.
    5. Entry 5 from subscribe is in pending state and subscribed to, but not in notify.
    6. Entry 6 from subscribe was removed because it was not valid.
    NOTIFY sip:user1@example.com:5060;transport=UDP 
    Subscription-State: active;expires=120
    Event: xcap-diff;diff-processing=xcap-patching
    Content-Type: application/xcap-diff+xml
    <?xml version="1.0" encoding="UTF-8"?>
    <xcap-diff xmlns="urn:ietf:params:xml:ns:xcap-diff" 
         xcap-root="localhost:9080/services">
    
      		<document sel="resource-lists/users/sip:xdms1@us.acme.com/doc1.xml" 
                		new-etag="123213234"/>
     		<document sel="resource-lists/users/sip:xdms1@us.acme.com/doc2.xml" 
               		 new-etag="434543533"/>
      		<document sel="rls-services/users/sip:xdms1@us.acme.com/index" 
                		new-etag="454355765"/
     		 <element sel="resource-lists/global/doc.xml/~~/resource-lists/list[@name="friends"]" 
               		exists="true"/>
        			<list name="friends">
          				<display-name>Golf Friends</display-name>
          				<entry uri="sip:tiger.woods@example.com">
            				<display-name>Tiger Woods</display-name>
          				</entry>
          				<entry uri="sip:vijay.singth@example.com">
            				<display-name>Vijay Singh</display-name>
          				</entry>
        			</list>
     		 </element>
      		<attribute sel="resource-lists/global/doc.xml/~~/resource-lists/list[@name="buddies"]/@id" 
                		 exists="true"/>5</attribute>
    </xcap-diff>
  4. User updates one of entries in one of the documents from the subscribed directory.
    1. The user sends an xcap put to the following document selector: resource-lists/users/sip:xdms1@us.acme.com/doc1.xml/~~/resource-lists/list[@name="friends"]/entry[@uri="steve"] and the following content:
      <entry uri="steve">
      				<display-name>Stephen</display-name>
      			</entry>
  5. The user receives a notification.
    NOTIFY sip:user1@example.com:5060;transport=UDP 
    Subscription-State: active;expires=120
    Event: xcap-diff;diff-processing=xcap-patching
    Content-Type: application/xcap-diff+xml
    <?xml version="1.0" encoding="UTF-8"?>
    <xcap-diff xmlns="urn:ietf:params:xml:ns:xcap-diff" 
               xcap-root="localhost:9080/services">
     		<document sel="resource-lists/users/sip:xdms1@us.acme.com/index" 
                prev-etag="3413415" new-etag="4154351">
        		<replace sel="resourcelists/list[@name="friends"]
                      /entry[@uri="steve"]">
         			 <entry uri="steve">
           				 <display-name>Stephen</display-name>
          			</entry>
      			  </replace>
      		</document>
    </xcap-diff>
  6. User receives one termination notify.
    NOTIFY sip:user1@example.com:5060;transport=UDP 
    Subscription-State: terminated
    Event: xcap-diff;diff-processing=xcap-patching
    Content-Type: application/xcap-diff+xml



Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.