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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Unclosed charater exception when using path transformation using regular expression

  • 1.  Unclosed charater exception when using path transformation using regular expression

    Posted 03/19/20 09:06 AM

    Hi,

    I am using Api Gateway’s request transformation, the transformation rules are applied based on a specific request.path pattern. Identification of the path /SOMETEXT/case/SOMETEXT is done using regex ^/[a-zA-Z0-9-.~_ ]+/case/[a-zA-Z0-9-.~_ ]+$. When a request is made matching the above pattern an exception is thrown as shown below, the regular expression itself is valid - its been tested at regex101.com.

    {"Exception":"API Gateway encountered an error. Error Message:  Exception occured while executing transformation policy. Exception:
    Unclosed character class near index 19
    ^\/[a-zA-Z0-9-.~_ \. Request Details: Service - ecase, Operation - /{domainName}/case/{id}, Invocation Time:10:49:01, Date:19.3.2020,  Client IP - 10.142.4.1, User - Default and Application:sys:defaultApplication"}

    From the error message it appears that there is problem with closing ‘]’ bracket, but i am unable to determine a proper fix for this. Looking forward for a solution.

    Thanks,
    Manjunath


    #API-Management
    #webMethods
    #API-Gateway


  • 2.  RE: Unclosed charater exception when using path transformation using regular expression

    Posted 03/19/20 09:23 AM

    Hi Manjunath,

    Can you please attach the API you tried?

    If it is not possible to provide the API, provide the values configured in the transformation conditions and in the transformation configuration sections.

    Regards,
    Vallab


    #webMethods
    #API-Gateway
    #API-Management


  • 3.  RE: Unclosed charater exception when using path transformation using regular expression

    Posted 03/19/20 10:49 AM

    Hi Vallab,

    Thanks for reverting back, please see the attached word document, i felt it was easier to explain this way. Also, this is my first project with Gateway, i might be doing things wrong, or, adopting wrong means. Request you to guide me to improve the solution. One constraint is that i cannot use Dynamic transformation since it has dependency on IS Service - this is enforced from the client.

    Kindly let me know if you need further information.

    Regards,
    Manjunath

    Issue.docx (153 KB)


    #webMethods
    #API-Management
    #API-Gateway