Layer7 API Management

  • 1.  How to convert decimal number to hexadecimal?

    Posted Dec 07, 2018 03:01 AM

    Hi Guys,

     

    I'm using API GW 9.3. I need to convert decimal numbers to hexadecimal, for example to represent 14 -> 0E in policy.

    Any idea how to accomplish it?

     

    Thanks in advance,

     

    Wojciech



  • 2.  Re: How to convert decimal number to hexadecimal?
    Best Answer

    Broadcom Employee
    Posted Dec 07, 2018 08:35 AM

    Hi 

     

    On GW 9.4 there is a new Java Script assertion which can do this in a Java script 

     

    Regards

    Dirk 



  • 3.  Re: How to convert decimal number to hexadecimal?

    Posted Dec 07, 2018 09:20 AM

    Hi Dirk,

    thanks for your prompt answer.

    At this moment I'm on GW 9.3, with no plans to move to 9.4. I also have Java Script assertion as beta version for GW 93. but customer doesn't allow to use beta stuff on production server. 

    Do you have other ideas without using Java Script assertion?

     

    Regards

    Wojciech



  • 4.  Re: How to convert decimal number to hexadecimal?

    Broadcom Employee
    Posted Dec 09, 2018 07:55 PM

    there should be few options, xpath/xslt should work (you may google the example), you can also use mysql function -- use perform jdbc query assertion to run following query,

     

    select hex(14);



  • 5.  Re: How to convert decimal number to hexadecimal?

    Broadcom Employee
    Posted Dec 24, 2018 09:43 AM

    Hi 
    I believe your questions has been answered, I will mark this as the correct answer.
    When your question is not answered or you still have additional questions please let us know.
    With Kind Regards

    Dirk