[sr-dev] Problem with xpath updates of XCAP documents

Peter Dunkley peter.dunkley at crocodile-rcs.com
Wed Apr 4 18:19:10 CEST 2012


Hi,

I have been experimenting with uploading, and modifying existing, XCAP
documents.  I have been trying out the example from RFC 4827 and I can't
get it to work with Kamailio.

To upload the document (this works) I use the command: curl --digest -u
111:111 -T pidf.xml -X PUT
http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index

To modify the document (this doesn't work) I use the command: curl
--digest -u 111:111 -T pidf_modify.xml -H "Content-Type:
application/xcap-el+xml" -X PUT
http://192.168.0.130:5060/xcap-root/pidf-manipulation/users/sip:111@mydomain/index~~/presence/tuple%5b@id='x8eg92n'%5d/note

When I try to modify the document I get the error: "Apr  4 17:12:08
pd-laptop-linux kamailio[16862]: ERROR: xcap_server [xcap_server.c:596]:
no new content"

I went through the XCAP server code and added some debug and found that
the check on xcap_misc.c:491 is succeeding (which means "no selection
for xpath parent expression") and the document is not being changed.
Also, from my limited understanding of XPath and libxml2, I would have
expected the code path which should have been followed to go through the
else clause of the conditional on xcap_misc.c:468 - which means I don't
think that the xcaps_xpath_set() function is doing the right thing at
all.

Is there anyone here that is more familiar with libxml2 that can give me
any pointers here.  As far as I can tell the XCAP server code looks OK
to me, and I believe the documents (attached) and my XCAP queries are
correct as well.

Thanks,

Peter

-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120404/ec55f1ca/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pidf.xml
Type: application/xml
Size: 987 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120404/ec55f1ca/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pidf_modify.xml
Type: application/xml
Size: 55 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120404/ec55f1ca/attachment-0001.xml>


More information about the sr-dev mailing list