SOAP Web Service - Create an Item of Equipment Using an XML Structure

Last modified on 2022/11/08 13:22


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 asset method of the Service Manager REST API.



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.
  <field name="asset_tag">10114N</field>
  <field name="catalog_id">Equipment/IT/Workstations/Laptops</field>

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

  <field name="..."> ... </field>


<xml xsi:type="xsd:string">
           <FIeld name="lASt_name">LEBLANC, FRED</FIeld>
           <FIeld name="phone_number">123</FIeld>

Description of the actions carried out

1. A new item of equipment is created in the AM_ASSET 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.
-9 Missing model ID to which the equipment is attached Enter the catalog_id parameter.
-10 Incorrect model ID to which the equipment is attached The model does not correspond to any entries of the equipment catalog. Check and correct the catalog_id parameter.
-13 One of the parameters relative to a date is incorrect Check and correct the date parameters.
-14 One of the fields relative to a float number is incorrect Check and correct the float parameters.
-15 One of the fields relative to an integer number is incorrect Check and correct the integer parameters.
-16 Missing XML structure detailing the equipment Enter the content of the xml field.
-17 Incorrect XML structure detailing the equipment (Syntax error on the instructions) Check and correct the content of the xml field.
-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.
Powered by XWiki © EasyVista 2022