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.  REST transformation datatypes

    Posted Fri April 03, 2020 11:15 AM

    Hi,

    My client uses the REST transformation in API GW - transforming SOAP to a REST.

    The transformation gives me a strange behavior when the GW converts the XML response to JSON.

    {
    “price”: 1.1, //ws response looks like this 1.1 API-GW interpret this as a number
    }

    {
    “price”: “1.10”, //ws response looks like this 1.1 API-GW interpret this as a string
    }

    {
    “price”: 5, //ws response 5.0 API-GW interpret this as a number and round up
    }

    Why is 1.10 converted to a string and not a number?


    #API-Management
    #API-Gateway
    #webMethods


  • 2.  RE: REST transformation datatypes

    Posted Mon April 06, 2020 04:47 AM

    …sorry this is the correct data:

    So the question is then why 1.10 is converted to datatype string?

    {
    “price”: 1.1, //ws response looks like this 1.1 API-GW interpret this as a number
    }

    {
    “price”: “1.10”, //ws response looks like this 1.10 API-GW interpret this as a string
    }

    {
    “price”: 5, //ws response 5.0 API-GW interpret this as a number and round up
    }


    #API-Management
    #API-Gateway
    #webMethods


  • 3.  RE: REST transformation datatypes

    Posted Mon April 06, 2020 04:47 AM

    updated info:

    {
    “price”: “1.10”, //ws response looks like this 1.10 API-GW interpret this as a string
    }


    #webMethods
    #API-Gateway
    #API-Management