Forum

This content is now out of date.

Visit Our Community

ADDUSER WebService function returns “FAILURE” status code

Hi All,
I tried to add user in Yellowfin by invoking "ADDUSER" webservice function but it is always returning "FAILURE" message. I also verified the state of AdministrationServiceResponse object which is returned by webservice call and found that all the properties are null except "statusCode" which is "FAILURE".When I checked Yellowfin Server console it shows below error details.

YF:2013-09-08 19:01:22:DEBUG (AdministrationService:remoteAdministrationCall) - Creating Session
YF:2013-09-08 19:01:22:DEBUG (WebServicesSessionManager:newSession) - Session 3622efb7d9d8583f04fc98375e690a60 has been created...
YF:2013-09-08 19:01:22:DEBUG (AdministrationService:remoteAdministrationCall) - Processing function: ADDUSER
YF:2013-09-08 19:01:22:DEBUG (AdministrationService:remoteAdministrationCall) - Creating New User via Webservices...
YF:2013-09-08 19:01:22:DEBUG (AdministrationService:remoteAdministrationCall) - Creating SessionBean for webservices user...
YF:2013-09-08 19:01:22: INFO (AdministrationService:remoteAdministrationCall) - WebserviceException caught: 4(COULD_NOT_CREATE_PERSON)
YF:2013-09-08 19:01:22:DEBUG (AdministrationService:remoteAdministrationCall) - remoteAdministrationCall() completed with status: FAILURE


Here it is just giving error code 4(COULD_NOT_CREATE_PERSON) which indicates that the user creation failed but does not give more details which will help me to identify the problem.

I would really appreciate if some one can help me to figure out the problem.

Thanks in advance for your help.

Kindly find the client side code that I am using to invoke ADDUSER webservice function.

AdministrationServiceResponse rs = null;
AdministrationServiceRequest rsr = new AdministrationServiceRequest();

//////////// Change following line to point to instance of Yellowfin //////////////////////////////

AdministrationServiceService ts = new AdministrationServiceServiceLocator(
"localhost", 8084, "/services/AdministrationService", false);
AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts
.getAdministrationService();

AdministrationPerson person = new AdministrationPerson();
person.setEmailAddress("admin12@yellowfin.com.au");
person.setFirstName("Radhika");
person.setInitial("Kasirala");
person.setLastName("Kasirala");
person.setUserId("admin12@yellowfin.com.au");

person.setRoleCode("YFADMIN");
person.setSalutationCode("DR");

rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));

rsr.setFunction("ADDUSER");
rsr.setPerson(person);
rs = rssbs.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
out.write("
Save Success. ");

} else {
out.write("
save failed . " + rs);
}


Thanks
-Radhika Kasirala.
Hi Radhika,

Please have a look at the contents of the response.Messages array that comes back from the server.
This may have information about why the request is failing.

The COULD_NOT_CREATE_PERSON error could be thrown for the following reasons:

1. Password not set for new user.
2. Person already exists
3. Internal Person creation process failed...

Looks like you may have not set the password for the new user.

Thanks,
Peter
Hi Peter,
Thanks for replying for my post. By mistake, the code which sets password was missed in the code that I have pasted. API function is failing even if I set password to it. I tried analyzing response.Messages array and fount that it is null in the response. Kindly refer attached screenshot for the same.

When you say "3. Internal Person creation process failed...", can you kindly elaborate this and what are the different possibilities to fail because of this?

Kindly help me to figure out this issue as I am stuck because of this since 10 days.

Thanks in advance for your help.


Thanks
-Radhika.
Now attached screenshot as Image