newUser
This method allows adding/editing:
- User data;
- Relationship between User, Department, and Position;
- Relationship between User and Access group.
If the user exists already, 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 exists already, 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. For editing, the IDAREA
and IDFUNC
fields must be left blank. If the objective is to change department
and position, these two pieces of information can be provided, and the system
will 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's ID. |
NAME | X | User's name. |
LOGIN | X | Name the user inserts to log in to the system. |
PASS | X | User's password. |
X | User's e-mail address. | |
IDAREA | X¹ | ID # of the department to be associated with the user. |
IDFUNC | X² | ID # of the position to be associated with the user. |
IDACCGROUP | ID # of the access group to be associated with the user. | |
CDLEADER | ID # of the leader to be associated with the user. | |
LANGUAGE | Enter the user's language code, in accordance with the "Database Encoding" column of the Localization section, in the System Requirements document. |
- X¹ - Required only when the
IDFUNC
field is completed. - X² - Required only when the
IDAREA
field is completed.
You can only insert or edit one user at a time through this method. This means that it is not possible to update a list of users by sending a single request.
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: Registered user's primary key. FAILURE: -1 |
Status | SUCCESS: SUCCESS FAILURE: FAILURE |
Code | SUCCESS: 1. FAILURE: Code for the error found |
RecordId | SUCESS: User ID. FAILURE: N/A |
RecordKey | SUCCESS: Registered user's primary key. FAILURE: N/A |
Code | Description |
---|---|
-1 | Unexpected error. |
2 | Inexistent access group. |
3 | field¹: The maximum size for this field is 50. |
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 specified 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. |