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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Special characters in Gateway

  • 1.  Special characters in Gateway

    Posted Mon October 29, 2018 11:39 AM

    Hi,

    Does API Gateway support special characters, ’ " ( ), in path?.
    swagger resource: /sample/v1/resource/path(‘{variable}’).

    I always get the error 404 resource not found. I have checked if the API is enabled and it is. I already have check the spelling. was thinking that it maybe because of the special characters.

    Thanks.


    #API-Management
    #API-Gateway
    #webMethods


  • 2.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 02:35 AM

    Hello,

    Could you please try using appropriate url encoding while creating API on Gateway?

    Thanks,
    Shiv


    #API-Gateway
    #API-Management
    #webMethods


  • 3.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 02:41 AM

    yes, I have already tried “%28, %27 and %29” but still it is giving the error 404


    #API-Management
    #API-Gateway
    #webMethods


  • 4.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 02:47 AM

    Can you please provide the API ? Is it hosted on Integration Server?

    Thanks


    #API-Gateway
    #API-Management
    #webMethods


  • 5.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 02:53 AM

    I’m not sure i am if I am allowed.
    but everything seems normal with the Swagger, except that it has those special characters in the path.

    When it was imported to the API Gateway it was successful. but when it was activated and then called I always get 404.

    I have already tried this: /sample/v1/resource/path%28%27{variable}%27%29 and no success.


    #webMethods
    #API-Gateway
    #API-Management


  • 6.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 02:58 AM

    Hi Mark,

    It’s working for the url http://sag-2hkymh2:5555/gateway/PetStore%20on%20Heroku/1.0.0/sample/v1/resource/path(‘{variable}’)

    It won’t work when replace the alias ‘variable’ with some value say http://sag-2hkymh2:5555/gateway/PetStore%20on%20Heroku/1.0.0/sample/v1/resource/path(‘{aliasValue}’)
    It’s incorrect usage of alias in the resource.

    Please have a look at the usage of path parameter in the resource.

    Thanks,
    Mohammed


    #webMethods
    #API-Gateway
    #API-Management


  • 7.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 03:02 AM

    Hi Mohammed,

    So you mean it would only work it the variable is not dynamic? so %28%27fixed%27%29?


    #API-Gateway
    #webMethods
    #API-Management


  • 8.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 03:04 AM

    Exactly Mark.

    Thanks,
    Mohammed


    #API-Gateway
    #webMethods
    #API-Management


  • 9.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 03:41 AM

    Hi Mark,

    Currently, we don’t support partial substitution in the path variable. It would be good to have the path param /{pathparam} so that resource looks like /sample/v1/resource/{pathparam} and do the URL encoding of path param before invoking the request.

    Sample request /sample/v1/resource/path%28%27value1%27%29
    Sample request /sample/v1/resource/path%28%27value2%27%29

    Thanks & Regards
    Lakshmanan N


    #webMethods
    #API-Management
    #API-Gateway


  • 10.  RE: Special characters in Gateway

    Posted Tue October 30, 2018 03:51 AM

    Hi Lakshmanan N,

    I was able to make /sample/v1/resource/path{value} work. but it seems not to match with the original swagger case that we configured.

    so it would mean adding the %28%27 %27%29 to the request as part of the variable. the sample request /sample/v1/resource/path%28%27anyvalue%27%29.

    thanks,
    Mark


    #API-Gateway
    #webMethods
    #API-Management