xManish wrote:
                 PutMethod putMethod = new
PutMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Private/pages/NewPage01");
                 putMethod.addRequestHeader("Accept",
 MediaType.APPLICATION_XML.toString());
  
I was able to create the user by adding following lines of code. Actually I
was falling behind by thinking it would create the page and user at the same
time. However I had to create the page first and add the object of class
XWikiUser as the second step.
                ................
                PutMethod putMethod = new
PutMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/user001");
                putMethod.addRequestHeader("Accept",
MediaType.APPLICATION_XML.toString());
                httpClient.executeMethod(putMethod);
                PostMethod postMethod = new
PostMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/user001/objects");
                postMethod.setParameter("className", "XWikiUsers");
                postMethod.addRequestHeader("Accept",
MediaType.APPLICATION_XML.toString());
                httpClient.executeMethod(postMethod);
                ...........
Can anybody now tell me how to set the user details like firstname,
lastname, email, etc ?
Thankyou,
Manish
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Create-User-in-XWiki-from-REST-Api-tp5209…
Sent from the XWiki- Dev mailing list archive at 
Nabble.com.