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.


#TechXchangePresenter
 View Only
  • 1.  Mapping date

    Posted Thu June 19, 2003 03:42 PM

    Hi,
    I have an xml document with a RequiredDate element in that. I want to map it and then insert that record in the database.
    Please, let me know the procedure how to do this.

    The problem statement is:
    Customer due date must be populated at line level of order. /XML_Order_Submit/POEnvelope/Detail/LineInfo/RequiredDate to database_table REQUEST_DATE

    Request_date is the field in the database to which the value should be entered from the sml element RequiredDate.

    Thanks


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


  • 2.  RE: Mapping date

    Posted Thu June 19, 2003 04:01 PM

    I assume that you want to get the XML_Order_Submit/POEnvelope/Detail/LineInfo/RequiredDate to the database table field REQUEST_DATE. Now the question is if you have 5 linte itmes, which date do you want to insert? Do you insert 5 rows of request date for 5 line items?
    Thanks


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


  • 3.  RE: Mapping date

    Posted Thu June 19, 2003 04:12 PM

    Thanks Vinod for reply,
    Yes, you are right. I want to get XML_Order_Submit/POEnvelope/Detail/LineInfo/RequiredDate to the database table field REQUEST_DATE. I have 5 line items and I want to insert all those 5 items.
    Also let me know if the procedure is same for inserting only one line item. And for 5 line items, I think I have to loop through them.

    Thanks


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


  • 4.  RE: Mapping date

    Posted Thu June 19, 2003 04:26 PM

    You will have to loop thru the line items and do an insert to the table using execSQL. Another option is to loop over the line items and create a record list (with the date fields) and then do a pub.db:insert by mapping the recordlist to the data field. This will be faster than individual inserts.
    Thanks and Good Luck.


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


  • 5.  RE: Mapping date

    Posted Thu June 19, 2003 05:16 PM

    Sorry but can u please also let me know how to create a record list for the line items and flow for the next steps.

    Thanks for ur help.


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


  • 6.  RE: Mapping date

    Posted Thu June 19, 2003 05:48 PM

    You can get this info from the developers guide. There is a tutorial package on your developer too.
    Thanks


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


  • 7.  RE: Mapping date

    Posted Thu June 19, 2003 05:48 PM

    You can get this info from the developers guide. There is a tutorial package on your developer too.
    Thanks


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


  • 8.  RE: Mapping date

    Posted Thu June 19, 2003 07:47 PM

    Hi NN,

    Loop over record list say emp contains empid,ename.After looping 
    

    (inside loop) it become as record emp.Now you create insertEmpdetail

    service.In this service take input as

    empid,ename fields Now click on flow button in this service.

                     take map,Take temparory field sqlInsert 
    

    make it large editor.Now write sql statement

    ex:insert into schemaname.tablename(column names in that tableeg:EMPID,ENAME)values(‘%empid%’,‘%ename%’)pl check for
    both check boxes in input for sqlSelect box.Then call execSQL
    service in wmDB package map this sqlSelect to dbSQL.Drop
    everything except updateCount,dbMessage(those are output parameters)
    now call insertEmpDetail service into loop.Now map empid,ename
    in record emp to empid,ename (input parameters for insertEmpDetail service).Your problem solved.Before call dbConnect,after procees
    call close services to open dbconnection,dbclose.

    Thanks,
    SriniK


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