XML vs vCard when retrieving contacts through API

Discuss the Scalix Messaging Services

Moderator: ScalixSupport

paultt
Posts: 25
Joined: Tue Oct 17, 2006 10:48 pm
Location: Melbourne, Australia

XML vs vCard when retrieving contacts through API

Postby paultt » Sun Jun 17, 2007 6:05 am

I wrote a simple address book search interface, using the Scalix API, which has stopped working since upgrading from 11.0.4 to 11.1.

Under Scalix 11.0.4, URLs of the form:

/api/<user>/mailbox/Contacts/<dref>?output=xml

tended to return 1 or 3 "parts". Any notes were contained in parts with content type "text/plain" and "text/html", and the main contact details were in an "application/scalix-properties" part.

Under Scalix 11.1, the "application/scalix-properties" part has been replaced by a "text/x-vcard" one.

Rewriting the parsing code to deal with vcards, rather than Scalix's XML schema, shouldn't be difficult. However, I've noticed that the vcards do not contain all the information which was present in the XML version. For example, the postal addresses are missing.

Is there any way to retrieve the full contact details in XML form? Or indeed in any form?

Many thanks,


Paul.

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Mon Jun 18, 2007 12:51 pm

Hi Paul,

I've started investigating this and will continue tomorrow. Interestingly, when accessing my contacts, I see what you are seeing, but a colleague sees the expected XML for his contacts on the same server, so this is not a straight forward issue.

Regards,
Gren.

paultt
Posts: 25
Joined: Tue Oct 17, 2006 10:48 pm
Location: Melbourne, Australia

Postby paultt » Mon Jun 18, 2007 6:28 pm

Hi Gren,

Thanks for having a look. Interestingly, I've found that when I fetch the same URLs in a browser (rather than through Python's liburl2), I *sometimes* see the application/scalix-properties part, but it's not consistent. From liburl2, it seems to show the text/x-vcard one every time. Rather puzzling behaviour. If there's anything you'd like me to test against our server, let me know.

Cheers, Paul.

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Tue Jun 19, 2007 10:39 am

Hi Paul,

I have submitted bug https://bugzilla.scalix.com/show_bug.cgi?id=15534 to track this
issue. Thanks for finding it. The API needs to be consistent and it isn't.

Regards,
Gren.

paultt
Posts: 25
Joined: Tue Oct 17, 2006 10:48 pm
Location: Melbourne, Australia

Postby paultt » Tue Jun 19, 2007 6:21 pm

Hi Gren,

Thank you -- I'll watch with interest. In the meantime, can you think of any workarounds to get the server to divulge some more complete contact details when it doesn't choose to show the application/scalix-properties part?

Cheers, Paul.

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Wed Jun 20, 2007 4:26 am

Hi Paul,

I'm afraid the current VCARD rendering is hard coded and provides only minimal information. A project I'm working on should improve that significantly but it is not ready for prime time yet.
The best approach is to fix the current code to always give scalix-properties. I'm exploring that. If the worst comes to the worst, you could apply a patch to the Open Source Scalix platform code rather than wait for the next release.

Regards,
Gren.

paultt
Posts: 25
Joined: Tue Oct 17, 2006 10:48 pm
Location: Melbourne, Australia

Postby paultt » Wed Jun 20, 2007 4:52 am

Hi Gren,

OK -- I'll wait and see what you come up with.

If you were wondering about the use case, it's as follows: the simple web-based contact lookup I built on the API is mostly used by one person who has several thousand contacts and, when travelling, tends to have to use connections which make SWA unbearably slow. He needs to be able to query the server (rather than simply carrying around a snapshot) because his staff here update the contacts constantly.

I might be able to get him to use Outlook+SmartCache, but we had a bad experience with it during his last trip: we ran in to bug 14949, and clearing the IMAP cache (as suggested in several forum threads) invalidated his SmartCache, breaking his Outlook profile.

As a quick work-around, I got him to use Thunderbird+IMAP. While LDAP would seem the obvious way to query his address book, with his number of contacts, the server takes 45 seconds to respond to each query -- hence the need for another approach.

A related question: do you include accounts with large numbers of contacts and calendar entries in your test suite?

Cheers, Paul.

GS

Progress?

Postby GS » Tue Oct 09, 2007 6:47 am

Is there any progress on this topic?

We bumped into the same problem when we upgraded our Scalix license and got the advize to upgrade, so now all our applications that rely on the API are broken!

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Tue Oct 09, 2007 12:18 pm

We'll see if we can fix the bug referenced above for the next release of Scalix.

Florian.
Florian von Kurnatowski, Die Harder!

GS

Postby GS » Wed Oct 10, 2007 3:04 am

Thanks!

TRACKS
Posts: 106
Joined: Mon Feb 19, 2007 4:56 pm

Postby TRACKS » Wed Oct 24, 2007 3:24 pm

What happened with this topic? I am running 11.0.2 and 11.2 neither of these systems send Vcards correctly.
TRACKS
4000+ users

GS

Progress?

Postby GS » Wed Jan 16, 2008 8:26 am

Any progress on this topic?

Eugene
Posts: 44
Joined: Wed Jan 23, 2008 11:39 pm

Slow System Address Book

Postby Eugene » Mon May 26, 2008 5:36 am

Good day all

We have an issue that I believe is related to this post.

We have around 160 users on Scalix version 11.3 running on CentOS 5. Most of these users use the SWA as their mail client.

The system address book in the SWA is painfully slow to show up initially when using the To.. or CC.. or BCC buttons and when adding attendees to meeting requests / appointments.

It then reports that it is showing an incomplete list and when you do a search it seems to find the contacts in a reasonable amount of time.

One of our developers wrote an application that uses the API to query the system address book and it is really, really fast - it takes a second or two to search the entire list of contacts in the address book and display them.

Is there any way to speed the address book up?

I've noticed three other posts along similar lines with no replies on them as yet even though the post are several months old.

Thanks in advance
______
Eugene


Return to “Scalix Messaging Services”



Who is online

Users browsing this forum: No registered users and 3 guests