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.setRequestContentLength(soap.length());

postMethod.addRequestHeader("Host", "zimbra.linfield.edu");
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) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

This is the error that's returned:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<AuthRequest xmlns="urn:zimbraAdmin">
<name>
admin@zimbra.linfield.edu
</name>
<password>
adin-passwd
</password>
</AuthRequest>
</soap:Body>
</soap:Envelope>


What I get back is:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><soap:Fault>
<soap:Code><soap:Value>soap:Sender</soap:Value></soap:Code><soap:Reason>
<soap:Text>unknown document: AuthRequest</soap:Text>
</soap:Reason><soap:Detail><Error xmlns="urn:zimbra">
<Code>service.UNKNOWN_DOCUMENT</Code>
<Trace> omitted </Trace>
</Error></soap:Detail></soap:Fault></soap:Body></soap:Envelope>


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

Thanks,

Rob Tanner
Linfield College