Connect. Communicate. Collaborate. Securely.

Home » Developer Zone » API/SDK Writers » CalDAV/CardDAV Connector for Kerio Connect (Need Help Choosing Domain/ Editing Description)
  •  
Xaserx8

Messages: 17
Karma: 0
Send a private message to this user
Hello Community,

I am developing an applikation which creates contacts and calendar entries via the CalDAV/CardDAV Connector for Kerio Connect which I downloaded from https://github.com/Kerio/cdav-connector.

I am relatively new to Java so I am not that skilled here.

A lot of the functions are finished but I am having two issues now.

The forst one is that I can only create contacts and calendar entries for users that are in the domain which is declared as the primary domain.

If I try to use another domain the Security-Log of the Kerio-Web-Server say:
"The user user<_at_>primarydomain does not exists."
So it seems like I am doing something wrong here but I can not find out what exactly.

Another thing is that I can not use the function "HttpsConnection.GetVEvents" if only one of the entries in that Calendar have a description longer than 56 characters.
But I can create entries which have a description longer than 56 characters if i don not try to read it out afterwards.
It seems like the reason for this is that after 56 characters there is a break in the *.eml file.

Here is an example:

This is a example description with more than fifty-six characters.

would be in the EML-File:

DESCRIPTION:This is a example description with more than fifty-six c
haracters.

The error I would get:

[ haracters.] is not a valid field name


I see the problem here but since the part where the eml file is beeing parsed is binary i can not change the code.
Is there any way of reading such events with the existing API (link above).

I would be grateful if anybody could help me with one of these problems.

Thank you.
  •  
macti

Messages: 37
Karma: 3
Send a private message to this user
My guess is that you are using HTTPSConnection. You should use DavStore instead.

https://github.com/Kerio/cdav-connector/blob/master/src/zswi /protocols/communication/core/DavStore.java

DavStore implements all features of the main CalDAV RFC. It will work with secondary domains, and it will works for multi-line properties.
  •  
Xaserx8

Messages: 17
Karma: 0
Send a private message to this user
Thank you very much.
I will try this soon.
Sounds like the right track.
  •  
Xaserx8

Messages: 17
Karma: 0
Send a private message to this user
So.
I found out that I had an old version of the API where there was no support included outside the main domain.
I've downloaded the newest version.

I have found this post at github: https://github.com/pascalrobert/cdav-connector/commit/281eba 3c662c0226a0903b8eb42488445045f75f

Which says, that it is possible to use secondary domains.
I definetly have the exact same code as the one posted.

I connect to the server like this:
objConnTest = new HTTPSConnection(exampleservername, "exampledomain.com", "user<_at_>exampledomain.com", "examplepassword", 443, true);


But if i try this:
objSCals = objConnTest.getCalendars();

(objSCals is a List<ServerCalendar>)

The server responds that this would be an unauthorized access.

I tried to use a DavStore object directly. I got it connected (not sure if it was with the right domain) but couldn't use the functions since i didn't find a way to get existing CalendarCollections from the server which are expected when calling any .get-event (except .getClass). But I don't really think i should use the DavStore directly.

If anyone could tell me what I'm doing wrong or has another idea of what to try I would gladly accept your help.

Thank you in advance.
  •  
Xaserx8

Messages: 17
Karma: 0
Send a private message to this user
I've found out why I could not use domains beyond the primary one.

The problem was the path which is build for the PROPFIND request.


At the beginning of the path there are the login informations:
https:// username : password <_at_> servername ...

And at the end there is also the username build in the the target path:
... / full-calendars / domain / username

The problem was that both positions were filled with the same parameter but for the login information it had to be username<_at_>domain for non primary domains and just username at the end of the path.

If i give the constructor username@domain as username and cut of everything after the <_at_>-symbol for the second position it's used at everything works fine.

I'm not sure if I just couldn't figure out how to use the HttpsConnection-constructor the right way or if this is an error in the API. But who cares, I solved it! YEAH!
  •  
macti

Messages: 37
Karma: 3
Send a private message to this user
You can, and you should, use DavStore. This is where I did 90% of the job, and it works with not only Kerio, but also Google Calendar, iCal Server and fruux (useful if, for example, you want to do a migration for one of those implementations to Kerio).
Previous Topic: Kerio Connect API - Java version
Next Topic: FIrefox console?
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Tue Jul 25 14:36:03 CEST 2017

Total time taken to generate the page: 0.00503 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.