Previously, I provided some examples of a custom HTTP end-point using the java.net.URL library. In a few cases, this library doesn’t work very well. I have two problems with it:

  • It does not support the HTTP PATCH method.
  • It is difficult to capture detailed error messages provided in the response body

In those cases, we can use the org.apache.http Java library, which is also included in Maximo out-of-the-box. Below are the instructions to create a basic HTTP end-point with this library:

Step 1: Acquire a webhook.site mock url simply by visiting the site:

Step 2: Create an automation script (no launchpoint), use the source code below. Name the script as ZZENDPOINT2:

Step 3: Use the End Points application to create a new end point. The value is the name of the script above. (Note that the name is case-sensitive):

Step 4: As far as creating an endpoint. That’s about it. To test it, click on the Test button, enter some text in the Test Data input, then click on Test

If everything works correctly, Maximo should show a successful message, and in Webhook, you should receive the message sent by Maximo as shown below. (Note that, you’ll need to add Webhook’s certificate to Websphere’s truststore for Maximo to be able to send a message to this address).

Step 5: To test the ability to capture error details in the response’s body, we can Edit the mock response in Webhook as follows:

I created a simple Publish Channel and External System on the PO object, and set it to use this new Endpoint, then tested publishing a message by updating an existing PO, the error details are captured in Message Reprocessing app as follows:

Happy coding!