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.  Select Adpater service

    Posted Fri July 27, 2012 02:13 PM

    Hi,

    is it possible to change the JDBC Type in an selectSQL JDBC Adapter ?
    When I select all the column of a particular table in a select adapter service, I get one of the column Type as “NUMBER(11,2)” and JDBC Type as “DECIMAL”. Now the problem is I need to map this field value to another filed of a publishable document. however this field of a publishable doc expects “DOUBLE” as input type and the document is not published if I pass String,decimal,object in it.
    Also, if JDBC type is “DECIMAL”, then we have only three options in Output field type :- java.lang.string,java.lang.object,java.math.bigdecimal

    Please advise

    Regards,
    Amit


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


  • 2.  RE: Select Adpater service

    Posted Fri July 27, 2012 05:02 PM

    You cannot change the JDBC type in the adapter service.

    I’d suggest having the adapter service return the value as a string. Then you can use WmTransformations package (or something similar) to convert the string to a double to assign to the publishable doc type.

    I would STRONGLY ENCOURAGE that the use of double be revisited. For money fields, double can result in inaccurate values. Here is an article on the problems with float and double: [URL]wmusers.com

    Generally speaking, strong data typing “in the middle” is not useful. I recommend using string data types in IS doc types and publishable doc types for all fields. The one exception I sometimes make is for date fields where I use java.util.Date. But usually even for date fields I usually use/recommend a string representation and the W3C date/time format.


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


  • 3.  RE: Select Adpater service

    Posted Fri August 03, 2012 09:10 AM

    Thanks reamon for your suggestion. It really helps a lot.


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