Using a node selector statement in the XCAP URI you can
select attributes to be added or edited in an existing document.
Before you begin
Before using the XDMS client and XCAP requests, make sure
that you have JDK
1.6.0 SR 3 installed
and configured in your system path variables.
About this task
Create or edit an XDM document of your choice, or use the
TestAttributeExample.xml document located in the
was_root/installableApps/xdms/clients/samples directory
and add it to the system using the xcap_put.sh command.
Note: was_root is
the installation root directory for
WebSphere® Application Server
Network Deployment.
By default, this directory is:
/usr/IBM/WebSphere/AppServer
/opt/IBM/WebSphere/AppServer
- Modify the TestLangAttrValue.txt
document and change the lang attribute value to en or
any other language value and save it.
- Switch to the was_root directory.
- Reach the command client by typing the following from the
command line:cd was_root/installableApps/xdms/client/
- Type the XCAP Put request.
./xcap_put.sh -user user_id -password password -filename file_name -content_type application/xcap-att+xml XCAP_URL/~~/root_element/element[@attributename="attributevalue"]/@newattribute
Note: This is one example of a Node Selector. Refer to
IETF RFC 4825 for information about other ways to specify a Node Selector
for an attribute.
For example, to post the sample
TestLangAttrValue.txt to the XDMS server for example.com, type the
following parameters on a single line. ./xcap_put.sh -user sip:xdms1@us.example.com -password password -filename samples/TestLangAttrValue.txt -content_type application/xcap-att+xml 'http://xdms.example.com:9080/services/resource-lists/users/sip:xdms1@us.example.com/TestResourceList.xml/~~/resource-lists/list[1]/list[1]/display-name/@xml:lang'
- Press Enter to send the request. The new content
now appears in the specified document.