Results 1 to 4 of 4

Thread: Create user with SOAP

  1. #1
    Join Date
    Nov 2005
    Posts
    13
    Rep Power
    10

    Default Create user with SOAP

    is this posible?? i try with the CreateAccountRequest

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra"></context>
    </soap:Header>
    <soap:Body>
    <CreateAccountRequest xmlns="urn:zimbraAdmin">
    <name>axel2@ufm.edu.gt</name>
    <password>axel2</password>
    </CreateAccountRequest>
    </soap:Body>
    </soap:Envelope>

    but y only get


    soap:Senderunknown document: CreateAccountRequestservice.UNKNOWN_DOCUMENTcom.zi mbra.cs.service.ServiceException: unknown document: CreateAccountRequest
    at com.zimbra.cs.service.ServiceException.UNKNOWN_DOC UMENT(ServiceException.java:113)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:215)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:163)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:84)
    at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:226)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardContextValve.invo ke(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.invok e(StandardEngineValve.java:107)
    at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:526)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:825)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:738)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:526)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)


    Thanks for your help
    Last edited by axel16; 12-13-2005 at 03:25 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Are you sending this to the SSL admin port?

    https://<server>:7071/service

    Did you first auth with an admin user and include a valid auth token?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    10

    Default include authtoken

    you need to add an authtoken element with the authentication token of an administrator account. <authToken> should be located in the <context> tag which is located in the <soap:Header> tag.

    example request to create an account:


    Code:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <authToken>authToken goes here</authToken>
    </context>
    </soap:Header>
    <soap:Body>
    <CreateAccountRequest xmlns=\"urn:zimbraAdmin\">
    <name>test@mydomain.com</name>
    <password>myverystrongpassword</password>
    </CreateAccountRequest>
    </soap:Body>
    </soap:Envelope>
    the request to get an authentication token for an administrator account is:

    Code:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra"/>
    </soap:Header>
    <soap:Body>
    <AuthRequest xmlns="urn:zimbraAdmin">
    <name>admin@mydomain.com</name>
    <password>mystrongpassword</password>
    </AuthRequest>
    </soap:Body>
    </soap:Envelope>
    the authToken is returned in the following tag (this is an xml path): soap:Envelope/soap:Body/AuthResponse/authToken

    make sure to change the appropriate fields.

    these soap requests should be submitted to:

    https://mydomain.com:7071/service/admin/soap/

    hope this helps.

    if you require any clarity just reply.

  4. #4
    Join Date
    Nov 2005
    Posts
    13
    Rep Power
    10

    Default

    Thanks a lot for your help it works fine

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  3. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 11:34 PM
  4. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 10:19 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 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
  •