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
Expand all | Collapse all

WmPublic Pck: pub.client:restClient

  • 1.  WmPublic Pck: pub.client:restClient

    Posted Sun February 21, 2021 09:54 AM

    I’m using restClient built server to call restful service. However I have to pass bearer token in header but i don’t know which fields to use pass the bear token.

    In Postman I’m using as ,

    In IS designer, can any one help me how i will do this?

    Thanks,


    #Service-Designer
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: WmPublic Pck: pub.client:restClient

    Posted Sun February 21, 2021 10:22 AM

    Hi Zeeshan,
    Please check this thread. thanks!


    #Integration-Server-and-ESB
    #Service-Designer
    #webMethods


  • 3.  RE: WmPublic Pck: pub.client:restClient

    Posted Sun February 21, 2021 11:57 PM

    Hi @ArulChristhuRaj,
    The steps are not cleared. I tried my best but no luck.
    Thanks.


    #webMethods
    #Service-Designer
    #Integration-Server-and-ESB


  • 4.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon February 22, 2021 11:19 AM

    Map the token to auth/token. Set auth/type to Bearer.


    #Integration-Server-and-ESB
    #webMethods
    #Service-Designer


  • 5.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon February 22, 2021 12:01 PM

    As per official document, This service is entirely internal to Integration Server and must not execute this service manually. So no point to discuss and discussion is over.


    #Integration-Server-and-ESB
    #webMethods
    #Service-Designer


  • 6.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon February 22, 2021 01:08 PM

    What document are you referring to? pub.client:restClient is not “internal to Integration Server” It is publicly available to be called.


    #Service-Designer
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon February 22, 2021 01:18 PM

    Integration_Server_Built_In_Services_Reference document. Paste the line snippet here,


    #webMethods
    #Integration-Server-and-ESB
    #Service-Designer


  • 8.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon February 22, 2021 02:11 PM

    Interesting. I have the reference document, Version 10.5, October 2019, and it does not have that note. Though I see it in the online version. This service was just added in 10.5. It would be interesting to get clarification from SAG on this. Normally, “internal only” services are not documented in the reference guide. The note stating “you must not execute this service manually” is a bit ambiguous. Executing a service manually means something specific and different from using it in a FLOW service.

    The main caveat about making manual changes to the generated connector service is that your customizations will be lost if you re-generate the connector service.

    I tried to find info about managing auth via the RAD connector service generated, without editing the connector service directly, but could not readily find it. Someone else have a pointer?


    #Service-Designer
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: WmPublic Pck: pub.client:restClient

    Posted Fri March 19, 2021 11:30 PM

    Hi!
    How did u resolve it?


    #webMethods
    #Integration-Server-and-ESB
    #Service-Designer


  • 10.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon March 22, 2021 06:34 PM

    Once you have the token (how to get that is not covered here) you can map it to auth/token and set auth/type to Bearer when calling pub.client:http. Presumably supported for pub.client:restClient too as it has the same vars defined – but as noted above, it is unclear if restClient is intended for our use.


    #webMethods
    #Service-Designer
    #Integration-Server-and-ESB


  • 11.  RE: WmPublic Pck: pub.client:restClient

    Posted Mon March 22, 2021 06:53 PM

    Apparently the method does not support it. Im afraid I have to use client:http. Im trying with restClient but not work. pub.client.restCliente service apikey auth 401

    It is a true headache.

    Im going to use httpClient, thank you for your reply.


    #Service-Designer
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: WmPublic Pck: pub.client:restClient

    Posted Tue March 23, 2021 11:38 PM

    Hi,

    For such use case better to use httpClient service. The pub.client:restClient service is meant for internal use only and requires some parameters which are generated runtime only so it can’t be used independently. The httpClient service should be sufficient in itself for this purpose.

    Thanks


    #Integration-Server-and-ESB
    #webMethods
    #Service-Designer


  • 13.  RE: WmPublic Pck: pub.client:restClient

    Posted Wed March 24, 2021 11:09 AM

    I agree that using pub.client:http is the way to go. But it is very curious to me that pub.client:restClient is in the WmPublic package and is documented in the reference guide (though it seems out of date) but it is for “internal” use only. Typically, such services are 1) not in WmPublic; 2) not documented.

    Can anyone shed light on why that is and what the future plan for that service might be? Was it mistakenly exposed?


    #webMethods
    #Service-Designer
    #Integration-Server-and-ESB


  • 14.  RE: WmPublic Pck: pub.client:restClient

    Posted Tue April 20, 2021 09:33 AM

    Hi, reamon,

    No this was not mistakenly exposed. pub.client:restClient is used in association with the Swagger First Consumer. When the consumer is created each of the rest APIs in the swagger is created as a connector service and we use the restclient service to perform the actual invocation of the API. As the users see this service being present in the connector service, we are forced to put the restClient in the WmPublic. Hence we have documented the usage to be strictly internal along with the Swagger First Consumer.

    Regards,
    Sree


    #webMethods
    #Integration-Server-and-ESB
    #Service-Designer