Jitsi client XCAP file format

@damencho

Jitisi XCAP
I’m following above process,
i need help for jitsi XCAP file format , i have created xml file and returning it on request as below

T 172.16.16.163:59891 -> 172.16.16.63:80 [AP] #8707
GET /xcap-root/xcap-caps/global/index HTTP/1.1.
Connection: close.
Host: ecoweb.teledge.local.
User-Agent: Jitsi/2.10.5550.
.


T 172.16.16.63:80 -> 172.16.16.163:59891 [AP] #8709
HTTP/1.1 200 OK.
Server: nginx/1.12.2.
Date: Tue, 23 Jul 2019 08:53:11 GMT.
Content-Type: application/xcap-caps+xml; charset=utf-8.
Content-Length: 644.
Connection: close.
X-Powered-By: PHP/5.6.40.
Cache-Control: public.
Content-Transfer-Encoding: Binary.


<?xml version="1.0" encoding="UTF-8"?>
<xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'>
  <auids>
    <auid>rls-services</auid>
    <auid>pidf-manipulation</auid>
    <auid>xcap-caps</auid>
    <auid>resource-lists</auid>
    <auid>pres-rules</auid>
  </auids>
  <extensions>
  </extensions>
  <namespaces>
    <namespace>urn:ietf:params:xml:ns:rls-services</namespace>
    <namespace>urn:ietf:params:xml:ns:pidf</namespace>
    <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace>
    <namespace>urn:ietf:params:xml:ns:resource-lists</namespace>
    <namespace>urn:ietf:params:xml:ns:pres-rules</namespace>
  </namespaces>
</xcap-caps>

next it makes request as below

T 172.16.16.163:59892 -> 172.16.16.63:80 [AP] #8718
GET /xcap-root/resource-lists/users/sip:655@ecoweb.sip.teledge.local/index HTTP/1.1.
Connection: close.
Host: ecoweb.teledge.local.
User-Agent: Jitsi/2.10.5550.
.


T 172.16.16.63:80 -> 172.16.16.163:59892 [A] #8720
HTTP/1.1 404 Not Found.
Server: nginx/1.12.2.
Date: Tue, 23 Jul 2019 08:53:11 GMT.
Content-Type: text/html; charset=UTF-8.
Transfer-Encoding: chunked.
Connection: close.
X-Powered-By: PHP/5.6.40.
X-Debug-Tag: 5d36caf71c1df.
X-Debug-Duration: 67.
X-Debug-Link: /debug/default/view?tag=5d36caf71c1df.
Set-Cookie: _csrf=b86e180a4ca6e64af4158db351c03e441cdd4c13a208e48b8d111baaee5959eea%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22I9mQhx2pYCdETpG5HtG_DJ4CA9nnuyuZ%22%3B%7D; path=/; httponly.
Vary: Accept-Encoding.
.
7a89.

=======================================================

T 172.16.16.163:59893 -> 172.16.16.63:80 [AP] #8738
GET /xcap-root/pres-rules/users/sip:655@ecoweb.sip.teledge.local/presrules HTTP/1.1.
Connection: close.
Host: ecoweb.teledge.local.
User-Agent: Jitsi/2.10.5550.
.


T 172.16.16.63:80 -> 172.16.16.163:59893 [A] #8740
HTTP/1.1 404 Not Found.
Server: nginx/1.12.2.
Date: Tue, 23 Jul 2019 08:53:11 GMT.
Content-Type: text/html; charset=UTF-8.
Transfer-Encoding: chunked.
Connection: close.
X-Powered-By: PHP/5.6.40.
X-Debug-Tag: 5d36caf736fac.
X-Debug-Duration: 32.
X-Debug-Link: /debug/default/view?tag=5d36caf736fac.
Set-Cookie: _csrf=3e20709d558f67500641c31c2ac1d61732cc098937b6692f91aab817134f879ca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22ml-sL__i0_xWoBW3zz3hFJdRksmjg7CO%22%3B%7D; path=/; httponly.
Vary: Accept-Encoding.

.

=======================================================
I need help for what to do next.

Sorry but it was more than 4-5 years since I touched that code and all I can say it needs debugging …
What I see from your logs is that there is no ‘resource-lists’ for that user …

@damencho
can you just tell me what will be content type for

pres-rules

2019-07-23 15:14:53.117 SEVERE: [1142] impl.protocol.sip.SipLogger.logError().133 Error from the JAIN-SIP stack: Invalid argument address = ::0 port = 5060 transport = UDP
2019-07-23 15:14:58.974 SEVERE: [1153] impl.protocol.sip.ServerStoredContactListSipImpl.init().768 Error initializing serverside list!
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: PresRules cannot be parsed
at net.java.sip.communicator.impl.protocol.sip.xcap.XCapClientImpl.getPresRules(XCapClientImpl.java:303)
at net.java.sip.communicator.impl.protocol.sip.ServerStoredContactListSipImpl.getRule(ServerStoredContactListSipImpl.java:937)
at net.java.sip.communicator.impl.protocol.sip.ServerStoredContactListSipImpl.init(ServerStoredContactListSipImpl.java:738)
at net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl.registrationStateChanged(OperationSetPresenceSipImpl.java:3185)
at net.java.sip.communicator.service.protocol.AbstractProtocolProviderService.fireRegistrationStateChanged(AbstractProtocolProviderService.java:187)
at net.java.sip.communicator.impl.protocol.sip.SipRegistrarConnection.setRegistrationState(SipRegistrarConnection.java:735)
at net.java.sip.communicator.impl.protocol.sip.SipRegistrarConnection.setRegistrationState(SipRegistrarConnection.java:711)
at net.java.sip.communicator.impl.protocol.sip.SipRegistrarConnection.processOK(SipRegistrarConnection.java:502)
at net.java.sip.communicator.impl.protocol.sip.SipRegistrarConnection.processResponse(SipRegistrarConnection.java:917)
at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.processResponse(ProtocolProviderServiceSipImpl.java:851)
at net.java.sip.communicator.impl.protocol.sip.SipStackSharing.processResponse(SipStackSharing.java:762)
at gov.nist.javax.sip.EventScanner.deliverResponseEvent(EventScanner.java:317)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:148)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:185)
at gov.nist.javax.sip.DialogFilter.processResponse(DialogFilter.java:1514)
at gov.nist.javax.sip.stack.SIPClientTransactionImpl.nonInviteClientTransaction(SIPClientTransactionImpl.java:630)
at gov.nist.javax.sip.stack.SIPClientTransactionImpl.processResponse(SIPClientTransactionImpl.java:535)
at gov.nist.javax.sip.stack.SIPClientTransactionImpl.processResponse(SIPClientTransactionImpl.java:1622)
at gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:629)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:524)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:319)
at java.lang.Thread.run(Thread.java:748)
Caused by: net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP server returns invalid content type: application/rls-services+xml;
at net.java.sip.communicator.impl.protocol.sip.xcap.XCapClientImpl.getResource(XCapClientImpl.java:665)
at net.java.sip.communicator.impl.protocol.sip.xcap.XCapClientImpl.getPresRules(XCapClientImpl.java:294)
… 21 more
this is my rls-services

<rls-services><service uri="sip:technical-support@ecoweb.sip.teledge.local"><list name="Our technical support"><entry uri="sip:smith@ecoweb.sip.teledge.local"><display-name>Sffffmith</display-name></entry><entry uri="sip:joe@ecoweb.sip.teledge.local"><display-name>Jffffffoe</display-name></entry><entry uri="sip:agatha@ecoweb.sip.teledge.local"><display-name>Agffffatha</display-name></entry></list><packages><package>presence</package></packages></service></rls-services>