Skip to content

XML Format

Introduction

Using the Web Services Facade, it is possible to issue requests in XML format directly to Infor EAM from all the other applications. This section covers how a user can identify himself, issue several kinds of requests, and how to browse the list of requests that may be performed.

Credentials

When performing a Request, the user must identify himself by providing its Username and Password. To do this, the tag <credentials> must be used in the body of the XML Request. The user should define its Username from its NICE Account (primary, secondary or service) as well as the corresponding NICE Password.

<credentials>
    <username>NICE_USERNAME</username>
    <password>NICE_PASSWORD</password>
</credentials>

Note

It is also possible to use other identifiers such as SSO Cookie String (generated by login.cern.ch), SAML Assertion Document (generated by login.cern.ch) or a Passphrase String generated by the AMM Service.

Actions for an Entity

Through this Web Service, it is possible to perform Requests to Infor EAM. In the tutorial below, it will be shown how to perform the several possible actions to an Entity. For these examples, the Entity chosen was the Work Order, nevertheless the methods to be applied are similar for other Entities.

After a Request is made, the service will return a response. This response can either contain the information requested about the Entity, i.e, a successful Request or can be an Error.

Reading

To read a WorkOrder, the Web Service to be used is readWorkOrder. In here, it is needed to specify the Work Order's Code in the field WORK_ORDER_CODE and provide the User's Credentials. The XML code below illustrates how to perform this.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
    <soapenv:Body>
       <wsh:readWorkOrder>
            <number>WORK_ORDER_CODE</number>
            <credentials>
                <username>NICE_USERNAME</username>
                <password>NICE_PASSWORD</password>
            </credentials>
        </wsh:readWorkOrder>
    </soapenv:Body>
</soapenv:Envelope>

As shown in the code, each Web Service Call has two parts: one identifying the parameters of the Request (<number>), and another identifying the User (<credentials>).

Warning

Although in this case only one parameter was needed to send a Request to read a Work Order, other Requests for other Entities might require more information.

Creating

To create a new Work Order, it is needed to provide the following parameters: Equipment, Description, Status Code, Type Code and Department. Additionally, depending on the settings of the Work Order Page for the user group of the user, additional fields may also be required.

In order to perform this Request, the web service createWorkOrder is used. An example of the XML code to create this is shown below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
     <soapenv:Body>
          <wsh:createWorkOrder>
              <workOrder>
                   <statusCode>R</statusCode>
                   <typeCode>CD</typeCode>
                   <description>Test Work Order</description>
                   <departmentCode>*</departmentCode>
                   <equipmentCode>WS-TEST-001</equipmentCode>
              </workOrder>
              <credentials>
                   <username>NICE_USERNAME</username>
                   <password>NICE_PASSWORD</password>
              </credentials>
          </wsh:createWorkOrder>
     </soapenv:Body>
</soapenv:Envelope>

Deleting

In order to delete a Work Order, the Web Service used is the deleteWorkOrder. To request this action, the only parameter that needs to be provided is the Work Order's Code. An example of the XML code to delete a Work Order is shown below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
     <soapenv:Body>
          <wsh:deleteWorkOrder>
              <workOrderNumber>WORK_ORDER_CODE</workOrderNumber>
              <credentials>
                   <username>NICE_USERNAME</username>
                   <password>NICE_PASSWORD</password>
              </credentials>
          </wsh:deleteWorkOrder>
     </soapenv:Body>
</soapenv:Envelope>

Warning

Note that the <number> element changes to <workOrderNumber> for this action.

Updating

In order to update a Work Order, it is needed to provide the Work Order's Code inside the tag <number> as well as the intended update. The Web Service to be used for this operation is updateWorkOrder. It is possible to see this in the XML code below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
     <soapenv:Body>
          <wsh:updateWorkOrder>
              <workOrder>
                   <number>WORK_ORDER_CODE</number>
                   <description>Test Work Order  Update Location</description>
                   <locationCode>112</locationCode>
              </workOrder>
              <credentials>
                   <username>NICE_USERNAME</username>
                   <password>NICE_PASSWORD</password>
              </credentials>
          </wsh:createWorkOrder>
     </soapenv:Body>
</soapenv:Envelope>

The three types of updates that the user can perform are listed in the Table below.

Update Code Description
<field>newValue</field> Change the field value to another by passing the new value
<field></field> Clear the field by passing an empty value
Do not modify the field by not including it in the SOAP Request

Other Actions

In the next section, the management of fields such as User Defined Fields and Custom Fields will be described.

User Defined Fields

To create or update a Work Order with User Defined Fields (UDFs), it is needed to include the <userDefinedFields> element for the UDFs to be changed. For instance, for a Work Order with the code WORK_ORDER_CODE, it is possible change or update the several UDFs or even leave them unaffected. In the XML code below, an example of the update of the UDFs is shown.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
     <soapenv:Body>
          <wsh:updateWorkOrder>
              <workOrder>
                   <number>WORK_ORDER_CODE</number>
                   <userDefinedFields>
                        <udfchar01>1</udfchar01>
                        <udfchar02></udfchar02>
                   </userDefinedFields>
              </workOrder>
              <credentials>
                   <username>NICE_USERNAME</username>
                   <password>NICE_PASSWORD</password>
              </credentials>
          </wsh:updateWorkOrder>
     </soapenv:Body>
</soapenv:Envelope>

Note

The tags of the actions to be used are the tags of the previous section. What is added in this situation is a new tag <userDefinedFields> which contains the UDFs to be created or updated.

Custom Fields

To create or update a Custom Field, it is needed to use the <customFields> element. For each custom field, it is necessary to provide the Custom Field Code as well as the Custom Field Value. These pairs must be specified inside the <customField> element.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsh="http://cern.ch/cmms/infor/wshub">
     <soapenv:Body>
          <wsh:updateWorkOrder>
              <workOrder>
                   <number>WORK_ORDER_CODE</number>
                   <customFields>
                        <customField>
                             <code>0001</code>
                             <value>163602</value>
                        </customField>
                   </customFields>
              </workOrder>
              <credentials>
                   <username>NICE_USERNAME</username>
                   <password>NICE_PASSWORD</password>
              </credentials>
          </wsh:updateWorkOrder>
     </soapenv:Body>
</soapenv:Envelope>

Note

In the example below, the Opérateur (ID CERN) custom field which has the code 0001 had its value updated to 163602.

Next Section


Last update: July 8, 2022