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.  Coverting String to BigDecimal

    Posted Wed March 23, 2011 04:55 PM

    Hi,

    1. How a String can be converted to BigDecimal(java.math.BigDecimal) type?

    I have an input value as a string which is actually a number. I need to pass it to a JDBC adapter service which is accepting only java.math.BigDecimal type.

    1. How a string can be converted to date type. It is not just formatting the string structure, but the data type needs to be changed as a JDBC adapter service is expecting a date type as input.

    Are there any sevices available to achieve the above two or do we need to write java services?

    Thanks in anticipation.

    Best regards,
    KRV.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Coverting String to BigDecimal

    Posted Wed March 23, 2011 05:20 PM

    You can use wMTransformation package for such changes or you can write your own java service. You need to use following piece of code:

    java.math.BigDecimal val = new java.math.BigDecimal(String obj, MathContext.DECIMAL32);


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: Coverting String to BigDecimal

    Posted Fri March 25, 2011 07:22 PM

    Thanks Vikas for your help.
    I used the below services as suggested by you.
    WmTransformationServices:StringToDate
    WmTransformationServices:StringToBigDecimal


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: Coverting String to BigDecimal

    Posted Fri February 21, 2014 01:33 PM

    Hi Vikas Gupta and Ravi Varma K,

    Even I have the same requirement as Ravi Varma. I tried searing for the package WmTransformations on SAG Tech community and on google but I am unable to find this package.

    Can you please share me the path where I can download the package.

    Your help is highly appreciated.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: Coverting String to BigDecimal

    Posted Sat February 22, 2014 02:02 AM

    You can use below service.

    pub.math:toNumber


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: Coverting String to BigDecimal

    Posted Sat February 22, 2014 05:19 AM

    Hi Akash,

    I do not find the service pub.math:toNumber in wM 7.1.2.

    I guess you are referring to wM 8.1.2 or higher? I guess we may have to write a java service for this requirement.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: Coverting String to BigDecimal

    Posted Tue February 25, 2014 01:30 AM

    Hi M@he$h,

                In wM 8.2.2, we have pub.math:toNumber service.
    

    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Coverting String to BigDecimal

    Posted Tue February 25, 2014 02:01 AM