webMethods

webMethods

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.  Conversion of string to integer

    Posted Thu December 07, 2017 12:04 AM

    Hi Team,

    Can you please let me know to convert string values to integer in webMethods.

    We have few values in string that have to be passed in the table as an integer.

    This is urgent.

    Kindly help.

    Thanks


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 2.  RE: Conversion of string to integer

    Posted Thu December 07, 2017 11:56 AM

    Hi Priyanka,

    please download the WmTransformationServices package from the Community download section and install it to your IS.

    This package has a service for your need.

    As an alternative you can write your own transfromation service to accomplish this task.

    Regards,
    Holger


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Conversion of string to integer

    Posted Thu December 07, 2017 11:24 PM

    Can you please help me know how to download the WMTransformationServices package ?

    Thanks


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 4.  RE: Conversion of string to integer

    Posted Mon December 11, 2017 08:22 AM

    You can create a java service which does the String to Int conversion.

    Int IntValue = Integer.parseInt(“StringValue”);


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 5.  RE: Conversion of string to integer

    Posted Mon December 11, 2017 08:27 AM

    It seems you are trying to insert into database table. if database column type in integer then in the adapter template you can specify string as input. While calling the adapter service you can map the string values.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Conversion of string to integer

    Posted Mon December 11, 2017 10:13 AM

    Naga is right.

    In this case the JDBC AdapterService will do the conversion from String to INTEGER internally.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 7.  RE: Conversion of string to integer

    Posted Mon December 11, 2017 11:51 AM

    For conversion, you can use this pub.math:toNumber

    WmTransformations package is not part of Product Suite however you can find them on tech community and internet.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Conversion of string to integer

    Posted Mon December 11, 2017 12:39 PM

    Hi Mahesh,

    unfortunately, this package can not be found in the community anymore.
    I tried that last week.

    Sure, it is not part of the official produt suite, but as it follows the reserved naming conventions it should be supported by GCS/PS somehow.

    I have found an older thread where this package was attached, but it was removed by admins.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #edi