IBM Support

My MIF Web Service is deployed... What now ?

Technical Blog Post


Abstract

My MIF Web Service is deployed... What now ?

Body

After deploying a MIF Web Service, you may want to test it and make sure everything is working fine, don't you?

For sure, your integration requires an External System to post some data to Maximo using this Web Service, but for now you can use a third party client and setup some tests scenarios and post some data.

 

In all my tests, I use SoapUI, which is open source !  www.soapui.org.

 

After installing it, you will be able to post Soap, HTTP and REST calls to Maximo.

 

Let’s review the soap call  use case now…

 

In the SoapUI, click File > New SOAP Project

 

In the Initial WSDL field,  paste the WSDL URL for the Web Service you have deployed.

 

For instance:  http://mxserver:7001/meaweb/wsdl/MXASSET.wsdl  ( This is just a sample, you may have to change the server and port info )

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

Click OK

 

A new project is created based on the WSDL and a few samples were added in the specific operations ( Create, Update, Delete, Sync and Query )

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Lets run a quick test on a Query sample:

 

Expand the Query node and double click the Request1.

 

image

 

In the Request panel ( Left side ) You will see an empty request with all XML attributes for the MXASSET Object Structure. Obviously, for a query you don't have to populate all ASSET attributes.

 

image

 

Here you go a really small sample for a query on MXASSET. This will fetch all ASSET records from the BEDFORD site.

 

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

   <soapenv:Header/>

   <soapenv:Body>

      <max:QueryMXASSET baseLanguage="?">

         <max:MXASSETQuery operandMode="AND">

            <max:ASSET>

                  <max:SITEID operator="=">BEDFORD</max:SITEID>                

            </max:ASSET>

         </max:MXASSETQuery>

      </max:QueryMXASSET>

   </soapenv:Body>

</soapenv:Envelope>

 

You can replace your current request with this one.

Click the Submit button and watch the response panel ( right side ). All ASSETs from BEDFOR will be represented in an XML format.

image

 

Then, the response is sent back !

 
image

 

 

Try the same steps for updating a given ASSET record. This sample updates the ASSET 7500 from the BEDFORD site with a new DESCRIPTION.

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

   <soapenv:Header/>

   <soapenv:Body>

      <max:UpdateMXASSET >

         <max:MXASSETSet>

            <max:ASSET>

               <max:ASSETNUM>7500</max:ASSETNUM>

               <max:SITEID>BEDFORD</max:SITEID>

               <max:ORGID>EAGLENA</max:ORGID>

               <max:DESCRIPTION>DESCRIPTION UPDATE</max:DESCRIPTION>

            </max:ASSET>

         </max:MXASSETSet>

      </max:UpdateMXASSET>

   </soapenv:Body>

</soapenv:Envelope>

 

Success ?  Maybe !

For any Soap request, you have to check the response code.

In the response panel, click the Raw view tab and verify the response code.

image

 

HTTP 200 represents Success !  This means your request has been accepted in the Maximo side. Of course you may have to check if the data has been properly updated.

Anything other than HTTP 200 means something bad happened.

HTTP 401 – Authentication Issue
HTTP 404 – Server is not found

See more HTTP codes at http://www.w3schools.com/tags/ref_httpmessages.asp


If your MIF Web Service security is ON, you will have to add the user and password in the request authentication panel.

In the request window bottom, click the “Auth” button.

image


This will show the Authentication Panel where you can click the Dropdown field and click “Add New Authorization”  and then “Basic”.  Click OK

Fill in the Username and the Password information.

IMPORTANT:  This credential is related to the Application Server, not a Maximo user.

image

 

Ok !  You've got the basics.
 

I will be posting another blog with the REST calls using SoapUI as well


Please, let me know what questions you have...  I am waiting for your inputs.

Thanks !

 

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11131531