SOAP Web Service - Update an Item of Equipment 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 asset method of the Service Manager REST API.

EZV_ModifyEquipmentXML

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="asset_tag">10114N</field>
  <field name="catalog_id">Equipment/IT/Workstations/Laptops</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 equipment is updated 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.
-11 Missing asset tag Check and correct the asset_tag parameter.
-12 Incorrect asset tag The asset tag does not correspond to existing equipment.Check and correct the asset_tag 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.
Tags:
Last modified by Unknown User on 2021/12/22 15:29
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