Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-2011, 02:40 AM
Intermediate Member
 
Posts: 17
Default Looking for docs (or examples) of AuthRequest using Zimbra-over-JSON

Hello, all,

i have been tasked with writing an out-of-zimbra SOAP or JSON ((very) preferably JSON) program which uses Zimbra's calendar as the back-end for an internal "who's in/out of the office" calendar tool. On the surface this seemed simple enough to do, but i'm having problems getting the first steps working, apparently because of dissonance between SOAP and JSON representations of the requests.

i am looking for a document which describes the mapping between SOAP XML and JSON request/response structure. The docs i've read so far blithely imply/state that the structures are identical, but that is not possible because XML and JSON cannot always be mapped 1:1. (e.g.
Code:
<foo bar="...">baz</foo>
has no structurally identical JSON counterpart). i'm not so terribly concerned with the response structure (i can see those) but more the request structure (which currently requires trial and error (so far only error ).

In particular, i'm looking for one specific request: AuthRequest. If i can get an AuthRequest working then i'll at least have reached a point where Zimbra and i can start to chitchat and i can then experiment with the rest. For most requests i can snoop the Zimbra web client traffic to see what the requests look like, but AuthRequest is a special case which (to the best of my knowledge) is not actually used by the Zimbra web client (which posts the initial login data via a form).

i have looked through, e.g.:

ZCS 6.0:Zimbra REST API Reference - Zimbra :: Wiki

but have not yet found anything approaching what i'm looking for. (That particular reference is essentially useless for outside-of-Zimbra development because it documents operations which require a login, but does not document how to perform the login!)

Any tips would be greatly appreciated!
Reply With Quote
  #2 (permalink)  
Old 09-27-2011, 05:48 AM
Project Contributor
 
Posts: 92
Default

Quote:
Originally Posted by sgbeal View Post
In particular, i'm looking for one specific request: AuthRequest. If i can get an AuthRequest working then i'll at least have reached a point where Zimbra and i can start to chitchat and i can then experiment with the rest. For most requests i can snoop the Zimbra web client traffic to see what the requests look like, but AuthRequest is a special case which (to the best of my knowledge) is not actually used by the Zimbra web client (which posts the initial login data via a form).
You are absolutely right. "AuthRequest" is not used by ZimbraWebClient for normal login.
Actually login.jsp receives the login data via form and send AuthRequest to themselves.

But there is one exception as far as I know.
When authtoken is expired while you login, login screen will showup.
And there you push login button, AuthRequest is sent to servers.
Reply With Quote
  #3 (permalink)  
Old 09-27-2011, 06:41 AM
Intermediate Member
 
Posts: 17
Default

Quote:
Originally Posted by yutaka View Post
But there is one exception as far as I know.
When authtoken is expired while you login, login screen will showup.
And there you push login button, AuthRequest is sent to servers.
That's my problem - i'm writing a non-HTML client, so there's no screen and no user to click a button. It has no user interface, it only collects calendar data for caching purposes in a local db which will be used to render a "who's in/out of the office" page (a separate app).

In any case, i got AuthRequest working using a SOAP request, and have moved the client code (which was supposed to be JS+JSON) to PHP+SOAP so that i can (A) avoid the Same Origin Policy problem and (B) don't have to spend tons of time figuring out how the JSON API works.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.