Results 1 to 3 of 3

Thread: fail to create an account programmatically

  1. #1
    nickzm is offline Intermediate Member
    Join Date
    Apr 2011
    Posts
    15
    Rep Power
    4

    Default fail to create an account programmatically

    Need to programmatically create a user account. Following is the simple code:
    Code:
    SoapProvisioning sp = new SoapProvisioning();
    			sp.soapSetURI("http://server/service/soap/");
    		
    				sp.soapAdminAuthenticate("admin", "notapass");
    				Map m=new HashMap();
    				m.put("firstName", "firstname");
    				m.put("lastName", "lastname");
    				sp.createAccount("test1@example.com", "123456", m);
    The server works well with web interface. But there is always an exception in above code:
    Code:
    com.zimbra.common.soap.SoapFaultException: unknown document: AuthRequest
    ExceptionId:com.zimbra.common.service.ServiceException: unknown document: AuthRequest
    ExceptionId:btpool0-11://server/service/soap/AuthRequest:1303653495132:7c57c89c6bf314e2
    Code:service.UNKNOWN_DOCUMENT
    	at com.zimbra.common.service.ServiceException.UNKNOWN_DOCUMENT(ServiceException.java:262)
    	at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:343)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:287)
    	at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:158)
    	at com.zimbra.soap.SoapServlet.doWork(SoapServlet.java:294)
    	at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:215)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    	at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:208)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:814)
    	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    	at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(SetHeaderFilter.java:79)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    	at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    	at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:155)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:218)
    	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:422)
    	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.handler.rewrite.RewriteHandler.handle(RewriteHandler.java:230)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.handler.DebugHandler.handle(DebugHandler.java:77)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.Server.handle(Server.java:326)
    	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:543)
    	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:946)
    	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
    	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
    	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
    
    Code:service.UNKNOWN_DOCUMENT
    	at com.zimbra.common.soap.Soap12Protocol.soapFault(Soap12Protocol.java:88)
    	at com.zimbra.common.soap.SoapTransport.extractBodyElement(SoapTransport.java:344)
    	at com.zimbra.common.soap.SoapTransport.parseSoapResponse(SoapTransport.java:303)
    	at com.zimbra.common.soap.SoapHttpTransport.invoke(SoapHttpTransport.java:260)
    	at com.zimbra.common.soap.SoapHttpTransport.invoke(SoapHttpTransport.java:164)
    	at com.zimbra.common.soap.SoapTransport.invoke(SoapTransport.java:397)
    	at com.zimbra.common.soap.SoapTransport.invoke(SoapTransport.java:360)
    	at com.zimbra.cs.account.soap.SoapProvisioning.invoke(SoapProvisioning.java:321)
    	at com.zimbra.cs.account.soap.SoapProvisioning.soapAdminAuthenticate(SoapProvisioning.java:274)
    Can anyone tell me why? Thanks.
    Last edited by nickzm; 04-24-2011 at 07:59 AM.

  2. #2
    nickzm is offline Intermediate Member
    Join Date
    Apr 2011
    Posts
    15
    Rep Power
    4

    Default

    Does anyone know how to avoid the UNKNOWN_DOCUMENT exception?

    Or are there any other methods to create an account programmactically using java?

  3. #3
    taichimaro is offline Intermediate Member
    Join Date
    Jun 2011
    Posts
    17
    Rep Power
    4

    Default

    Quote Originally Posted by nickzm View Post
    Does anyone know how to avoid the UNKNOWN_DOCUMENT exception?

    Or are there any other methods to create an account programmactically using java?
    Hello,
    Have you got the solution ? on how to use SoapProvisionning or ZMailBox ???
    Marouane

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] how to create a spy account in zimbra
    By mkhurram92 in forum Administrators
    Replies: 1
    Last Post: 04-09-2011, 01:46 AM
  2. [SOLVED] Web Service to create mailbox account
    By jv1410 in forum Developers
    Replies: 1
    Last Post: 10-19-2007, 04:31 PM
  3. service(s) to invoque to create a new zimbra account
    By majodo in forum Administrators
    Replies: 0
    Last Post: 05-07-2007, 03:19 AM
  4. Replies: 3
    Last Post: 03-04-2007, 10:53 PM
  5. Replies: 3
    Last Post: 02-09-2006, 10:19 AM

Posting Permissions

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