IBM Support

How to use soupui xml to delete a doclink in Maximo?

Technical Blog Post


Abstract

How to use soupui xml to delete a doclink in Maximo?

Body

You may want to use external application to delete the doclink from Maximo applications. Today I will give an example how to achieve this function by soupui xml via Maximo Integration. Please refer the steps below:

  1. In Maximo Object Structures application, create a new Object Structure called DOCLINK, set Consumed By as Integration, and click New Row in Source Object of DOCLINK and add object DOCLINKS
  2. imageIn Web Service Library application, click Create Web Service > Create Web Service from Object Structure and select DOCLINK created from step 1
  3. Click Deploy to Product Web Service Container > Deploy Web Service to deploy DOCLINK web service
  4. image
  5. Open soupui tool and create a new project by using wsdl link, by default it is:

http://hostname:port/meaweb/wsdl/WSNAME.wsdl

for example: http://maximo/meaweb/wsdl/DOCLINK.wsdl

 

  1. Now we need sort out which record to be deleted. In this example, we will delete one attachment from the Work Order Tracking application
  • Open Work Order and check Attachment ID (ownerid)
  • Run below statement from database SQL client

select ownerid, docinfoid, ownertable, doctype from doclinks where ownderid="123"

  • Set the value of the keys in soupui xml file

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:max="http://www.ibm.com/maximo"&gt;

   <soapenv:Header/>

   <soapenv:Body>

      <max:DeleteDOCLINK>

         <max:DOCLINKSet>

<max:DOCLINKS action="DELETE">

<max:DOCINFOID changed="true">55</max:DOCINFOID>

<max:DOCTYPE changed="true">Attachments</max:DOCTYPE>

              <max:OWNERID changed="true">123</max:OWNERID>

              <max:OWNERTABLE changed="true">WORKORDER</max:OWNERTABLE>

            </max:DOCLINKS>

         </max:DOCLINKSet>

      </max:DeleteDOCLINK>

   </soapenv:Body>

</soapenv:Envelope>

 

  1. After refresh the work order, you will find the doclink has been removed.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11129347