Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Unable to create new user using JSONWS API :add-user-with-workflow
Hi ,
We are invoking the API 'add-user-with-workflow'using the following request body:
Getting resnse :
We are invoking the API 'add-user-with-workflow'using the following request body:
Getting resnse :
"Conversion failed: ; <--- java.lang.NumberFormatException: For input string: \"\""Liferay.Service(
'/user/add-user',
{
companyId: 20099,
autoPassword: false,
password1: 'test',
password2: 'test',
autoScreenName: false,
screenName: 'test1',
emailAddress: 'test1@gmail.com',
facebookId: 0,
openId: '',
locale: ,
firstName: 'test1',
middleName: 'test1',
lastName: 'test1',
prefixId: 11,
suffixId: ,
male: false,
birthdayMonth: 1,
birthdayDay: 1,
birthdayYear: 1992,
jobTitle: 'software',
groupIds: [34938],
organizationIds: null,
roleIds: [20109],
userGroupIds: null,
sendEmail: true
},
function(obj) {
console.log(obj);
}
);
So you have to check server side to see what field the conversion failed on, likely the open id since that's the only column you're sending an empty string.
Dear David,
it is working fine now
thank you so much.
Thank you
Ram
it is working fine now
thank you so much.
Thank you
Ram
HI,
It worked after David replied or really u had some issue while parsing ... ?
Please share the issue u identified which would be helpful for others.
It worked after David replied or really u had some issue while parsing ... ?
Please share the issue u identified which would be helpful for others.