Part of our eval process is making sure that I can integrate Zimbra into our current account management system, which means I need to be able to create and delete users over the network using the SOAP interface -- but (and especially since I'm new to using SOAP) I'm having a little problem there. Just to try and figure out how to talk to the server, I wrote a short bit of java code using the Apache Commons Httpclient. This is the code:

PostMethod postMethod = new PostMethod( url );

postMethod.addRequestHeader("Host", "");
postMethod.addRequestHeader("Content-type", "text/xml; charset=utf-8");
postMethod.addRequestHeader("SOAPAction","AuthRequ est");

postMethod.setRequestBody( soap );

try {
int status = client.executeMethod( postMethod );
System.out.println("Return Status Code: " + status + "\n");

} catch (HttpException e) {
} catch (IOException e) {

This is the error that's returned:

<soap:Envelope xmlns:soap="">
<AuthRequest xmlns="urn:zimbraAdmin">

What I get back is:

<soap:Envelope xmlns:soap=""><soap:Body><soap:Fault>
<soap:Text>unknown document: AuthRequest</soap:Text>
</soap:Reason><soap:Detail><Error xmlns="urn:zimbra">
<Trace> omitted </Trace>

I have also tried it with a <header></header> section, and in all cases I get the same result. What am I missing?


Rob Tanner
Linfield College