Skip to main content
Version: 2.2.1

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
Requestweb\wwwroot\ws\java\admin\NewUserRequestType.java
Returnweb\wwwroot\ws\java\admin\NewUserResponseType.java

Request:

IDRequiredDescription
IDUSERXUser's ID.
NAMEXUser's name.
LOGINXName the user inserts to log in to the system.
PASSXUser's password.
EMAILXUser's e-mail address.
IDAREAX¹ID # of the department to be associated with the user.
IDFUNCX²ID # of the position to be associated with the user.
IDACCGROUPID # of the access group to be associated with the user.
CDLEADERID # of the leader to be associated with the user.
LANGUAGEEnter the user's language code, in accordance with the "Database Encoding" column of the Localization section, in the System Requirements document.
info
  • X¹ - Required only when the IDFUNC field is completed.
  • X² - Required only when the IDAREA field is completed.
caution

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:

IDDescription
returnSUCCESS: Registered user's primary key.
FAILURE: -1
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
CodeSUCCESS: 1.
FAILURE: Code for the error found
RecordIdSUCESS: User ID.
FAILURE: N/A
RecordKeySUCCESS: Registered user's primary key.
FAILURE: N/A
CodeDescription
-1Unexpected error.
2Inexistent access group.
3field¹: The maximum size for this field is 50.
4Error identifying the user. There is more than one record with the same login.
5It is not allowed to use quotation marks in the login field.
6Null user login.
7Null user ID.
8Null user name.
9Null password.
10Null or inexistent language.
11The specified leader does not exist.
12Inexistent user.
13Null position ID #.
14Null department ID #.
15Inexistent department.
16Inexistent position.
17Inexistent relationship between department and position.
18The user ID cannot be equal to the leader ID #.
59Language not supported by the database.
60Inexistent language.
89Null user e-mail.