SOAP Web Service - Create an Employee Using an XML Structure
EZV_CreateUserXML
- This web service allows a new employee to be created using an XML structure.
Notes
- If successful, a status code 1 is returned.
List of parameters
Mandatory parameters
You must enter the parameters below.
Object | Type | Description / Example |
---|---|---|
account | string | Service Manager account used. example 50004: Production base ; 50005: Sandbox base |
login, pass | string | Login / password used to connect to Service Manager. |
xml | string | XML structure detailing the fields to be updated, delimited by tags
example <fields> <field name="last_name">LEBLANC, fred</field> <field name="login">fleblanc</field> </fields> |
LetterCaseConventions
Notes on the case
- The names of the XML tags are case-sensitive.
- The names of the fields are not case-sensitive.
- If you are using a tool such as SOAP_UI, you must encapsulate XML instructions within a CDATA tag to avoid conflicts.
Element | Correct/authorized syntax |
---|---|
XML tags (field, name) | All lowercase
<field name="..."> ... </field> |
Service Manager field | All lowercase
<field name="last_name">LEBLANC, fred</field> All uppercase<field name="LAST_NAME">LEBLANC, fred</field> Combination of uppercase/lowercase<field name="LaSt_NAmE">LEBLANC, fred</field> |
Value used as a search key | All lowercase
<field name="last_name">leblanc, fred</field> All uppercase<field name="last_name"">LEBLANC, fred</field> Combination of uppercase/lowercase<field name="last_name"">Leblanc, fred</field> |
Value updated in the database | Respect the case you want to store in the database
example Store the value "leblanc" <field name="last_name">leblanc, fred</field> example Store the value "LEBLANC" <field name="last_name"">LEBLANC, fred</field> |
SOAP UI in Linux | Encapsulate XML instructions within a CDATA tag
<![CDATA[<Fields> example <xml xsi:type="xsd:string"> |
Description of the actions carried out
1. A new employee is created in the AM_EMPLOYEE table.
2. The updated fields are those detailed in the XML structure.
Return codes for the web service
Code | Error | Corrective action |
---|---|---|
1 | Request processed successfully | |
-1 | Database not found | Check that the account parameter matches a Service Manager account. |
-2 | Unable to connect to Service Manager | Check and correct the login and pass parameters. |
-7 | Missing name / first name of the employee | Enter the last_name parameter. |
-13 | One of the parameters relative to a date is incorrect | Check and correct the date parameters. |
-16 | Missing XML structure detailing the employee | Enter the content of the xml field. |
-17 | Incorrect XML structure detailing the employee (Syntax error on the instructions) | Check and correct the content of the xml field. |
-18 | Incorrect employee profile | The profile does not correspond to an existing user profile. Check and correct the profil_id parameter. |
-22 | Maximum number of connections have been reached | Check that your profile defined on the Service Manager account authorizes the execution of the action requested to the web service. |