IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Retrieve Custom Header from Rest request

    Posted Sat December 12, 2015 04:19 AM

    How will we be able to retrieve custom header fields from REST POST WEBSERVICE request.
    getTransportInfo is able to retrieve only some specific predefined fields.Is it not possible to retrieve custom header field in webmethod?


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Retrieve Custom Header from Rest request

    Posted Mon December 14, 2015 01:56 PM

    Hi,

    please add a pub.flow:savePipelineToFile and pub.flow:restorePipelineFromFile after the getTransportInfo invocation.
    Use the same Filename as Input for both Services.
    This will not harm your normal processing (except for a very small delay), but gives the possibility for debugging.

    After the service has been invoked the first time after the change with real data, disable the savePipelineToFile and open the service for debugging and step throuh it.
    After the restorePipelineFromFile check what is really in the returned pipeline. There might be undeclared Fields which can be used when explicitly added manually and mapped afterwards.

    Please share some screenshots of the above outcome if possible.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Retrieve Custom Header from Rest request

    Posted Tue December 15, 2015 03:53 AM

    Thanks holger. Yes, i am receiving custom value in runtime and able to use the same.
    Previously, i was using the Pipeline debug property in the property view to debug the pipeline. In that case, it was never showing the runtime custom fields.
    Once i used the save/restorePipelineToFile to debug, it started showing the runtime custom values.
    Thanks a lot for your suggestion.


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Retrieve Custom Header from Rest request

    Posted Tue December 15, 2015 07:08 AM

    I am glad to hear that my suggestions was helpful.

    Remember to remove the 2 pipeline handling services after finishing the development to save performance.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Retrieve Custom Header from Rest request

    Posted Thu December 01, 2016 03:08 AM

    Hi,

    Please suggest how can we differentiate between custom and generic header fields.

    Thanks in advance

    Regards,
    Monica


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Retrieve Custom Header from Rest request

    Posted Thu December 01, 2016 06:29 AM

    Hello Moninca,

    The header listed in the below URL are from HTTP specification.

    http://www.restpatterns.org/

    HTTP protocol also supports Custom headers, that always depends on the API design.


    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Retrieve Custom Header from Rest request

    Posted Thu December 01, 2016 06:43 AM

    Thanks Srikanth.

    In our scenario we have rest post service which is exposed to external application.
    When they post a request they have some custom headers added to http request header.
    We need to filter on headers and pass on the custom header fields to other component.
    Is there a way to filter out generic and custom headers without knowing what custom header fields they are sending.

    Regards,
    Monica


    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Retrieve Custom Header from Rest request

    Posted Thu December 01, 2016 07:32 AM

    No, nothing available out of the box for this…!


    #webMethods
    #Integration-Server-and-ESB