Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-13-2005, 02:22 PM
Member
 
Posts: 13
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 02:25 PM..
Reply With Quote
  #2 (permalink)  
Old 12-13-2005, 03:05 PM
Zimbra Employee
 
Posts: 4,792
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?
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 12-13-2005, 04:04 PM
Active Member
 
Posts: 42
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.
Reply With Quote
  #4 (permalink)  
Old 12-15-2005, 09:45 AM
Member
 
Posts: 13
Default

Thanks a lot for your help it works fine
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.