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
So the idea is that this does GetInfoRequest for email@example.com. So can anyone tell me what I'm doing wrong?
<?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/">
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.
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.
Where can I find documentation on zimbra's SOAP interface ?
Is SOAP interface in production level ?
Does Zimbra have REST interface as well?
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!