SOAP Web Service - Update an Employee Using an XML Structure


UseRestInsteadOfSoap

Note: Service Manager SOAP web services are no longer maintened since the Oxygen version. You can still use them but we recommend that you use the Service Manager REST API to take advantage of the latest enhancements and features.

Open url.png See Update an employee method of the Service Manager REST API.

EZV_ModifyUserXML

Notes

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.
identification string Employee number (unique). If several employees have the same name / first name, enter this information to distinguish them.
last_name string Name and first name of the employee to create. Respect your naming conventions for names.
example Adam, Carol ; Leblanc - Fred
xml string XML structure detailing the fields to be updated, delimited by tags
  • XML instruction for each field: value
  • Syntax of the names of the fields: Names defined in the Service Manager data model.
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>
  <field name="..."> ... </field>
</Fields>]]>

example

<xml xsi:type="xsd:string">
         <![CDATA[<Fields>
           <FIeld name="lASt_name">LEBLANC, FRED</FIeld>
           <FIeld name="phone_number">123</FIeld>
         </Fields>]]>
</xml>

Description of the actions carried out

1. The employee is updated in the AM_EMPLOYEE table.

2. The updated fields are those detailed in the XML structure.

  • The fields last_name and/or identification (one of the two or both can be informed) are used as search keys.
  • The field last_name can be modified but not the field identification.

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.
-8 Incorrect employee number The employee number does not correspond to an existing employee. Check and correct the identification 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.
Tags:
Last modified by Unknown User on 2021/12/22 15:39
Created by Administrator XWiki on 2013/03/25 18:26

Shortcuts

Recent changes
•  EV Service Manager
•  Service Apps
•  EV Self Help
•  Service Bots

Powered by XWiki ©, EasyVista 2021