Results 1 to 3 of 3

Thread: SOAP Authentication Error

  1. #1
    Join Date
    May 2007
    Posts
    3
    Rep Power
    8

    Default SOAP Authentication Error

    I can get authentication working when working with "urn:zimbraAccount" and reading Contacts. But I need to access the admin requests (CreateAccountRequest, ModifyAccountRequest, DeleteAccountRequest, etc...)


    Request:
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <AuthRequest xmlns="urn:zimbraAdmin">
    <name xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:string">maven.admin@mybrokerpage.com</name>
    <password xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:string">*******</password>
    </AuthRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    Response:
    Code:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><soap:faultcode>soap:Client</soap:faultcode><soap:faultstring>unknown document: AuthRequest</soap:faultstring><soap:detail><Error xmlns="urn:zimbra"><Code>service.UNKNOWN_DOCUMENT</Code><Trace>com.zimbra.common.service.ServiceException: unknown document: AuthRequest
    	at com.zimbra.common.service.ServiceException.UNKNOWN_DOCUMENT(ServiceException.java:189)
    	at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:224)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:168)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:90)
    	at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:223)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:162)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:595)
    </Trace></Error></soap:detail></soap:Fault></soap:Body></soap:Envelope>
    Documentation:
    Code:
    ----------------------------
     <AuthRequest xmlns="urn:zimbraAdmin">
       <name>...</name>
       <password>...</password>
     </AuthRequest>
     
     <AuthResponse>
       <authToken>...</authToken>
       <lifetime>...</lifetime>
     </AuthResponse>
    
    Note: Only works with admin/domain-admin accounts
    Last edited by eblanchette; 05-15-2007 at 07:26 AM.

  2. #2
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default

    Quote Originally Posted by eblanchette View Post
    I can get authentication working when working with "urn:zimbraAccount" and reading Contacts. But I need to access the admin requests (CreateAccountRequest, ModifyAccountRequest, DeleteAccountRequest, etc...)


    Request:
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <AuthRequest xmlns="urn:zimbraAdmin">
    <name xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:string">maven.admin@mybrokerpage.com</name>
    <password xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:string">*******</password>
    </AuthRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    Response:
    Code:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><soap:faultcode>soap:Client</soap:faultcode><soap:faultstring>unknown document: AuthRequest</soap:faultstring><soap:detail><Error xmlns="urn:zimbra"><Code>service.UNKNOWN_DOCUMENT</Code><Trace>com.zimbra.common.service.ServiceException: unknown document: AuthRequest
    	at com.zimbra.common.service.ServiceException.UNKNOWN_DOCUMENT(ServiceException.java:189)
    	at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:224)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:168)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:90)
    	at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:223)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:162)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:595)
    </Trace></Error></soap:detail></soap:Fault></soap:Body></soap:Envelope>
    Documentation:
    Code:
    ----------------------------
     <AuthRequest xmlns="urn:zimbraAdmin">
       <name>...</name>
       <password>...</password>
     </AuthRequest>
     
     <AuthResponse>
       <authToken>...</authToken>
       <lifetime>...</lifetime>
     </AuthResponse>
    
    Note: Only works with admin/domain-admin accounts

    Check your path and port. The admin service is typically on a different port.

  3. #3
    Join Date
    May 2007
    Posts
    3
    Rep Power
    8

    Default

    Yeah I had a bunch of things wrong, path hast to be '/service/admin/soap' and it has to be SSL.

    Thanks,

    Eric

Similar Threads

  1. Replies: 23
    Last Post: 01-24-2013, 02:44 PM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  3. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 PM
  4. Replies: 14
    Last Post: 12-22-2005, 03:59 PM
  5. Building native libraries on MacOS X
    By ajmas in forum Developers
    Replies: 3
    Last Post: 10-14-2005, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •