SOAP Web Service - Create 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 Create an employee method of the Service Manager REST API.

EZV_CreateUserXML

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.
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. 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.
Tags:
Last modified by Unknown User on 2021/12/22 15:38
Created by Administrator XWiki on 2013/03/25 18:25

Shortcuts

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

Powered by XWiki ©, EasyVista 2021