newUser
This method allows adding/editing:
- User data;
- Relationship between User, Department, and Position;
- Relationship between User and Access group.
If the user already exists and the department being entered is different from the one the user is already associated with, the new department will be associated and considered as the default.
If the user already exists and a field is changed with the same existing
department and position, the system will return an error informing that the user
is already being used by this department and position. To perform an audition,
the IDAREA
and IDFUNC
identifiers should be informed in white. If the
objective is to change the department and position, these functions can be
informed so that the system can make this change.
To insert each of these items, it is necessary to follow the standard documented below.
Java class | |
---|---|
Request | web\wwwroot\ws\java\admin\NewUserRequestType.java |
Return | web\wwwroot\ws\java\admin\NewUserResponseType.java |
Request:
ID # | Required | Description |
---|---|---|
IDUSER | X | User ID (ID #). |
NAME | X | User name. |
LOGIN | X | Name used by the user to log into the system. |
PASS | X | User password. |
X | User e-mail address. | |
IDAREA | X¹ | Department ID # to associated with the user. |
IDFUNC | X² | Position ID # to be associated with the user. |
IDACCGROUP | Access group ID # to be associated with the user. | |
CDLEADER | Leader ID # to be associated with the user. | |
LANGUAGE | Enter the user language code, in accordance with the "Database Encoding" column of the Localization section, in the System Requirements document |
- X¹ - Required only when
IDFUNC
is completed. - X² - Required only when
IDAREA
is completed.
Request structure:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:newUser>
<!--You may enter the following 10 items in any order-->
<urn:IDUSER>?</urn:IDUSER>
<urn:NAME>?</urn:NAME>
<urn:LOGIN>?</urn:LOGIN>
<urn:PASS>?</urn:PASS>
<urn:EMAIL>?</urn:EMAIL>
<!--Optional:-->
<urn:LANGUAGE>?</urn:LANGUAGE>
<urn:IDAREA>?</urn:IDAREA>
<urn:IDFUNC>?</urn:IDFUNC>
<urn:IDACCGROUP>?</urn:IDACCGROUP>
<!--Optional:-->
<urn:CDLEADER>?</urn:CDLEADER>
</urn:newUser>
</soapenv:Body>
</soapenv:Envelope>
Return:
ID # | Description |
---|---|
return | SUCCESS: Created user primary key. FAILURE: -1 |
Status | SUCCESS: SUCCESS FAILURE: FAILURE |
Code | SUCCESS: 1. FAILURE: Code regarding the error that occurred. |
RecordId | SUCESS: User ID (ID #). FAILURE: N/A |
RecordKey | SUCCESS: Created user primary key. FAILURE: N/A |
Code | Description |
---|---|
-1 | Unexpected error. |
2 | Inexistent access group. |
3 | field¹: The maximum size for this field is size. |
4 | Error identifying the user. There is more than one record with the same login. |
5 | It is not allowed to use quotation marks in the login field. |
6 | Null user login. |
7 | Null user ID. |
8 | Null user name. |
9 | Null password. |
10 | Null or inexistent language. |
11 | The entered leader does not exist. |
12 | Inexistent user. |
13 | Null position ID #. |
14 | Null department ID #. |
15 | Inexistent department. |
16 | Inexistent position. |
17 | Inexistent relationship between department and position. |
18 | The user ID cannot be equal to the leader ID #. |
59 | Language not supported by the database. |
60 | Inexistent language. |
89 | Null user e-mail. |