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.  Unable to insert flat file values to oracle database

    Posted 04/01/10 06:25 PM

    Hi,

    Im having a flat file as follows:

    field_id,reg_date,update_date,first_name… etc(Header)

    “3432”,“1222010”,“10022009”,“xyz”… (values)

    I dont want to insert the header part to database, only values should be inserted.Im using a insert adapter service. Please reply. Im very new to web methods :confused:


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


  • 2.  RE: Unable to insert flat file values to oracle database

    Posted 04/01/10 09:20 PM

    When reading the records from the flat file, skip the first record. You’ll need to do that yourself as (oddly) the flat file services do not provide a flag for us to indicate we want the first record skipped.


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


  • 3.  RE: Unable to insert flat file values to oracle database

    Posted 04/02/10 06:39 AM

    Thanks for replying for ma post.

    when i insert these values into oracle DB, only null values are getting inserted. Is there any thing wrong with the adapter service that im using?

    I forgot to mention one thing…

    when i read the flat file im getting values wit spaces

    Eg: “3 4 4 2” “x y z” (Actual value “3442” “xyz”)

    and some times boxes in place of those spaces :frowning:


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


  • 4.  RE: Unable to insert flat file values to oracle database

    Posted 04/02/10 04:53 PM

    To know if something is amiss with the adapter service or the caller, we’d need to see details of both.

    The character encoding of the file is probably the reason you’re seeing spaces and non-printable characters. What encoding is used by the file and which encoding is specified in the convertToValues or bytesToString call? The default encoding of the JVM is UTF-8. If the file is not UTF-8 encoded or the JVM default encoding has been changed, then the conversion of the bytes to string will not function properly.


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


  • 5.  RE: Unable to insert flat file values to oracle database

    Posted 04/05/10 08:26 AM

    Thanks again :). Encoding problem is solved.

    can u tell me how can i get rid of the first record in flat file? The header part… (In detail) should i do a manual mapping?? Please help :confused:


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


  • 6.  RE: Unable to insert flat file values to oracle database

    Posted 04/05/10 04:36 PM

    You’ll need to skip the first record in your code. If you set flags/addRecordCount to true in the convertToValues call each record will have a @record-count attribute that you can check. The count starts at 1, so branch on that and skip.


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


  • 7.  RE: Unable to insert flat file values to oracle database

    Posted 04/06/10 03:18 AM

    Problem solved… Thanks a ton :slight_smile:


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


  • 8.  RE: Unable to insert flat file values to oracle database

    Posted 04/07/10 02:36 PM

    If you are using the flat file adapter and parse the data using a flat file schema you may as well define a hierarchic structure with one header rcord (identified by any of the header fields as I assume those are fix) and default records (recordWithNoId) as childs. You can then map only the child records to your targ (or interim) structure.
    I prefer this solution for my own integrations because this way the structure of the file and the omitted record are clearly visible in the schema describing the file.


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


  • 9.  RE: Unable to insert flat file values to oracle database

    Posted 04/07/10 03:09 PM