Publish channels or Invocation channels are typically used to create Maximo exit integration points. However, it is possible to invoke a WebService through an End Point.
Below you will find an example of how to consume a WebService by calling an End Point and sending the asset information in JSON format.
from com.ibm.json.java import JSONObject
from java.util import HashMap
# create a JSON object
jsonObject = JSONObject()
jsonObject.put("equipment", mbo.getString("ASSETNUM"))
jsonObject.put("description", mbo.getString("DESCRIPTION"))
# generate the json body
jsonBody = jsonObject.serialize(True)
# Invoking an End Point
if jsonBody is not None:
map = HashMap()
response = service.invokeEndpoint("MyEndPoint", map, jsonBody)
If you found my post interesting or useful and just want to say thanks, you can always buy me a coffee.



