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 11-14-2006, 10:44 AM
Junior Member
 
Posts: 8
Default SOAP question

I've been trying to work with zimbra's SOAP interface with limited success. I'm able to do an AuthRequest, but now when I try doing a GetInfoRequest it doesn't work. I'm a bit of a novice at this so I was hoping someone could give me a hand. I'm sending the following request to https://ourzimbraserver:7071/service/admin/soap

Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:zimbraAccount" xmlns:ns2="urn:zimbra" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<ns2:nosession/>
<ns2:authToken>valid authtoken</ns2:authToken>
<ns2:account>user@domain.com</ns2:account>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:GetInfoRequest/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
So the idea is that this does GetInfoRequest for user@domain.com. So can anyone tell me what I'm doing wrong?
Reply With Quote
  #2 (permalink)  
Old 11-14-2006, 01:35 PM
Zimbra Employee
 
Posts: 1,434
Default What was the error?

Without the resulting SOAP fault, it's hard to diagnose your issue. And your life may be made much easier by turning on the debug window on the web client and watching the SOAP fly from the client to the server.

The big thing I see wrong with your SOAP is that you're putting elements directly into the SOAP <Header> instead of in the Zimbra <context> subelement, which means your auth token won't be picked up.

In general, don't include <account> in the <context> unless you're specifying an account other than the authenticated user. If you do include <account>, make sure to also include by="name"; a "by" value is required.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 11-15-2006, 01:20 PM
Junior Member
 
Posts: 8
Default

Thanks, this was enough to get me pointed in the right direction.

Tip for other PHP developers out there, don't try using PHP5's SOAP client for talking to Zimbra, its unbelievably cumbersome for anything that doesn't have a WSDL.
Reply With Quote
  #4 (permalink)  
Old 11-16-2006, 02:30 PM
Intermediate Member
 
Posts: 19
Default

Where can I find documentation on zimbra's SOAP interface ?
Reply With Quote
  #5 (permalink)  
Old 11-16-2006, 02:33 PM
sam sam is offline
Zimbra Employee
 
Posts: 821
Default

http://zimbra.svn.sourceforge.net/vi...raServer/docs/

soap.txt
soap-calendar.txt
etc
__________________
Sam Khavari

:: :: [ Zimbra ] :: :: [ Bugzilla ] :: :: [ Product Portal ] :: :: [ Wiki ] :: :: [ Downloads ] :: :: [ . ] ::
Reply With Quote
  #6 (permalink)  
Old 11-17-2006, 08:26 AM
Intermediate Member
 
Posts: 19
Default

Is SOAP interface in production level ?

Does Zimbra have REST interface as well?
Reply With Quote
  #7 (permalink)  
Old 11-17-2006, 10:48 AM
Zimbra Employee
 
Posts: 1,434
Default Yes and yes.

The SOAP interface is the server's primary interface; all Zimbra's clients use the SOAP interface.

Zimbra also has a REST interface for fetching data; please search the wiki for details!
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
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.