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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Other types than String in Document Types

    Posted 07/03/09 01:16 PM

    Hello,

    it seems Broker can use various types like SHORT, INTEGER, LONG, FLOAT and others but Document Type works with String only.

    Is there any way to consume Documents with these “special Broker types” on Integration Server?

    Thanks


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


  • 2.  RE: Other types than String in Document Types

    Posted 07/03/09 08:04 PM

    Yes, define them in an IS document type as an object, then on the properties pane select the appropriate wrapper type.

    I would advise, however, that an approach using string data types is generally easier to manage and maintain. Strong typing in integration components usually is not necessary. As a rule of thumb, I define all fields as strings unless there is a specific, immediate reason to use another type. One exception I often make to this is for date fields. I convert them to java.util.Date, usually. Or to a standard string format like the W3C format.


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


  • 3.  RE: Other types than String in Document Types

    Posted 07/09/09 07:55 AM

    Hi,

    I agree with Reamon, it is easier to keep String.
    But I faced one peculiar problem when using MWS Tasks.

    The task search result table sorts data as per the data type. Hence we should define actual data type for the fields to be used as task input/output, else the sorting does not work as required.

    Regards,
    Sumit


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


  • 4.  RE: Other types than String in Document Types

    Posted 10/30/11 03:44 AM

    Hi Reamon,

    I have a question. I have a requirement where I need to insert a date field into tera-data database. The target field is defined as DATE type which is java.sql.Date.

    So, I get the date in a string field and If I map directly to the Object type(target date field) in the adapter Service, it is not inserting those values and giving error.

    But if I transform the string to Date type using StringToDate in WmTransformers. I was able to insert.

    So, My question is that is there another way to insert without using transformations.

    Please let me know your thoughts!

    Thanks,
    David.


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


  • 5.  RE: Other types than String in Document Types

    Posted 10/31/11 12:46 AM

    Change the adapter service to accept a string for the DATE column. As long as you pass a format expected by the DB it will do the conversion for you.


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


  • 6.  RE: Other types than String in Document Types

    Posted 10/31/11 02:01 AM

    Hi Reamon,

    I have changed the input type of the date field to “java.lang.String”. But when I tried to insert using the adapter service. It is giving me this error.

    [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service XXXX.XX
    [ADA.1.314] Cannot set data for the input field “StartDt”

    Do I need to contact the table owner to set the input type to accept the string types?? Please suggest.

    Thanks,
    David.


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


  • 7.  RE: Other types than String in Document Types

    Posted 10/31/11 05:55 PM

    Hi reamon,

    I was able to figure out the solution. Basically, I am trying to insert MM/dd/yyyy but the target is not accepting. But if i give the format as yyyy-MM-dd, then i was able to insert.

    May be its restricting formats.

    Thanks,
    David.


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


  • 8.  RE: Other types than String in Document Types

    Posted 10/31/11 06:02 PM

    Right. The format is whatever the default string format is for the DB.


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