vibhu.ranjan Posted August 11, 2014 Share Posted August 11, 2014 i ahve tried with jquery and java client also. Link to comment Share on other sites More sharing options...
hozawa Posted August 11, 2014 Share Posted August 11, 2014 Your code is incorrect. You need to fix it. Since you haven't provided any code, that about all I can say;. Link to comment Share on other sites More sharing options...
vibhu.ranjan Posted August 12, 2014 Author Share Posted August 12, 2014 Please find below code which i have tried: $(document).ready(function(){ $("#btn3").click(function(){ var userID = $("#userID").val(); var password = $("#password").val(); var rootURL = "http://10.107.63.43:8080/jasperserver-pro/rest_v2/users/" + userID; alert("url is "+rootURL); $.ajax({ type: 'PUT', contentType: 'application/json', url: rootURL, dataType: "json", username : "superuser", password : "superuser", data: { "fullName":"joeuser", "emailAddress":"", "externallyDefined":false, "enabled":true, "tenantId":"Finance", "username":"joeuser", "roles":[ {"name":"ROLE_USER","externallyDefined":false}] }, success: function(data, textStatus, jqXHR){ alert('User created successfully'); }, error: function(jqXHR, textStatus, errorThrown){ alert('User Creation error: ' + textStatus); } }); }); }); Link to comment Share on other sites More sharing options...
shiv.verma Posted August 12, 2014 Share Posted August 12, 2014 I think your URL is incorrect. superuser is already in the server then why you are trying to create same user. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now