Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Error in Creating Maximo Endpoint with HttpMethod verb PATCH

    Posted Thu July 14, 2022 12:20 PM
    Hi

    I am trying to publish the workorder updates from maximo to external system for which I have created an endpoint. The external url accepts PATCH verb for updating the record. When I tried to setup the PATCH verb in endpoint and test it gives me error that PATCH is not supported.


    psdi.util.MXSystemException: BMXAA1477E - The connection failed to the HTTP handler for the endpoint. Review the error and server log flies for information to indicate the cause of the issue, for example, incorrect properties in the DefaultHTTPExit.java handler class.
    Invalid HTTP method: PATCH
    at psdi.iface.router.HTTPHandler.invoke(HTTPHandler.java:484)
    at psdi.iface.mic.MicService.routeData(MicService.java:269)
    at psdi.iface.app.endpoint.MaxEndPointTestSet.execute(MaxEndPointTestSet.java:161)




    Am I missing something or is there a way I can publish to external system using PATCH. Unfortunately the external api doesnt support PUT or POST and only PATCH verb works so need a way to send the PATCH request from maximo endpoint.

    Regards
    Abhinav

    ------------------------------
    Abhinav Srivastava
    ------------------------------



    #Maximo
    #MaximoIntegrationandScripting
    #AssetandFacilitiesManagement


  • 2.  RE: Error in Creating Maximo Endpoint with HttpMethod verb PATCH

    Posted Fri July 15, 2022 08:28 AM
    You can try and see if your receiving system would process the X-HTTP-Method-Override or X-Method-Override header with a value of PATCH instead. If so, you'd be able to add that to your headers on the end point.

    The standard Java API for HttpURLConnection (https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html#setRequestMethod-java.lang.String-) doesn't support PATCH which is why the error is thrown. Some APIs support the header approach to change it from a POST to a PATCH. 


    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: Error in Creating Maximo Endpoint with HttpMethod verb PATCH

    Posted Mon July 18, 2022 06:41 AM
    Thanks Steven, I was able to request for the change of receiving api gateway to accept the PUT verb along with PATCH. With PUT verb the request works fine from maximo.

    ------------------------------
    Abhinav Srivastava
    ------------------------------