Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Lab 3: Simple Integration Use Case
Exercise 1 : Create the web service.........................................................................................2 Exercise 2 : Deploy the web service .......................................................................................4 Exercise 3 : Test the service....................................................................................................8 Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 2/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
In this exercise, you will learn how to activate a Maximo inbound web service. This web service will allow an external system / application to create a Service Request in Maximo. From this remote creation, any regular Maximo action could then be taken by the users.
Enabling this type of capability consists in performing the following tasks : Create the web service (in our case, we will start from the default MXSR object structure) Deploy the web service Test it. Since we dont have any external system to test with, you will simulate the external system by using SOAP UI (http://www.soapui.org/) that is installed on the virtual image and that can be used to test web services.
Exercise 1 : Create the web service
___ 1. Sign in to Maximo as Mike Wilson.
User: wilson Password: wilson
___2. Go to the Web Services Library (Go To Integration Web Services Library)
___3. Use the Select Action drop down menu to create a new web service from an Object Structure (Select Action Create Web Service Create WS from Object Structure)
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 3/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___4. The Create Web Service from an Object Structure Service Definition window opens. Select the MXSR object structure by selecting the corresponding checkbox.
___5. Click on the Create button :
The MXSR object structure service has been created and now appears on the Web Services Library list:
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 4/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise 2 : Deploy the web service
___1. In the List, select the MXSR service :
___2. Review the service you have just created. As it is an Object Structure based service, the Create, Update, Delete, Sync and Query operations have been automatically defined.
You can click on Generate Schema / View XML to view sample input/ouput messages for each operations :
A new View XML window open :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 5/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. ___3. Click on OK when you are done reviewing the messages.
As you could see, by default, all Service Request attributes are included in the messages. Maximo provides an easy way of selecting which attributes will be available through that web service. Should you be interested in this, you can :
___a. Go to the Object Structures module (Go To Integration Object Structures)
___b. Search for the object structure we are working with (MXSR) :
___c. Click on MXSR to open the record.
___d. Use the Select Action Exclude/Include Fields action (Select Action Exclude / Include Fields)
___e. This opens the Exclude / Include Fields window. In this window, you can select which attributes should be excluded from the integration messages (by default none are excluded but some system fields) :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 6/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___f. When you are done reviewing this capability, go back to the Web Service Library to go on with the lab (Go To Integration Web Services Library).
___4. Use the Select Action menu to deploy the web service (Select Action Deploy Web Service)
Once deployed, a confirmation message gets displayed :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 7/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___5. You can double-check that you can reach the web service endpoint :
___a. Open an Internet Explorer page
___b. Browse to http://vm100:9999/meaweb/wsdl/MXSR.wsdl. You should be able to visualize the service WSDL that describes the different operations available :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 8/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise 3 : Test the service
You will now use soapUI to test the service and remotely create a Service Request.
___1. Use the desktop shortcut to launch soapUI
___2. Add the MXSR WSDL to the existing MX71 project. Right-click on the MX71 project and select Add WSDL :
___3. The Add WSDL window opens. Copy & Paste the previous WSDL URL (http://vm100:9999/meaweb/wsdl/MXSR.wsdl) in the WSDL location input field :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 9/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___4. soapUI loads the service definition. When it is done, you should see the different ports and related operations in the project explorer:
___5. Default request messages have been created for each operation. Open the request1 request under the CreateMXSR operation of the MXSRSOAP11Binding (double-click on MXSRSOAP11Binding / CreateMXSR / request1) Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 10/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
As you can see, all Service Request attributes are available to be filled by the external system. They are optional though. Thanks to this, in the context of this exercise you will enter a minimal set of information.
___6. Create a New request message for the CreateMXSR operation, by right-clicking on the CreateMXSR operation of the MXSRSOAP11Binding port :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 11/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___7. Give the request message a name of your choice :
___8. Do not choose to create the optional elements in schema, as you will only specify a small subset of them :
___9. Replace the generated content by the following XML message (you can find a createsr.xml file on your virtual machine hard drive that contains the same content under My Documents) :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:max="http://www.ibm.com/maximo"> <soapenv:Header/> <soapenv:Body> <max:CreateMXSR> <max:MXSRSet> <max:SR> <max:DESCRIPTION>Window and Frame are broken</max:DESCRIPTION> <max:LOCATION>CONF300</max:LOCATION> <max:SITEID>BEDFORD</max:SITEID> </max:SR> </max:MXSRSet> </max:CreateMXSR> </soapenv:Body> </soapenv:Envelope>
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 12/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___10. Basic authentication is activated on your Maximo application server. Therefore, you have to specify some credentials in order to be able to perform the service request creation. Within soapUI, click on the Auth section at the bottom of the request to specify those credentials :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 13/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___11. The Authentication area opens. Specify the following credentials :
Username : wilson Password : wilson
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 14/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___12. With those settings set, you are ready to submit the request. Click on the green arrow to submit the request :
___13. After a couple of seconds, you should see the Maximo response in the response area (right panel) :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 15/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
In this example you can see that the Service Request 1149 was created. Any error would also been displayed in that area. If you have any issue, please reach out to one of the instructors.
___14. Back to Maximo, we will now check the details of the Service Request you just created. If needed, log in as wilson / wilson.
Go to the Service Requests module (Go To Service Desk Service Requests) :
___15. Look for your service request by filtering on the service request ticket id that was returned to you in soapUI (in our example : 1149) :
Tivoli Maximo Enterprise Asset Management 7.1 One day workshop for IBM Business Partners Lab 3: Simple Integration Use Case 16/16
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
___16. You can click on the record link to display the content of the Service Request.
Once you have reached this point, you can go on with the next lab (Lab 4 : Using the Workflow Engine).