webMethods Flat file to XML document scenario
Dec 21, 2011 20:08 2 Comments Development Pavan

Normal 0 false false false EN-IN X-NONE X-NONE

Step by step transformation of a XML file from flat file using wM 6.1

1)      Create a flat file in some directory

2)      Create records in the flat file, each record having some fields, separate the fields in records by delimiters  & separate the records by  delimiters share  it.

3)      Select new – All choices

           â€“ Flat file dictionary

                            -Name the dictionary

                           -finish

                           -Flat file dictionary created

   4)  Select the dictionary

             Record definition

 

                                     New                 emp

 

               New –field definition      Fields                eno               ename                 esal        

 

               Extractor  type- n th field  Position           0                   1                          2

 

 

 

4)       Select new- All  choices – Flat file  schema

 

 

 

5)        Choose – Flat field definition

 

  Select –Record delimiter as record separator

 

  Select­ – Field   delimiter  as field  separator.

 

     (properties press set button)

 

    ((give the path of flat dictionary  & press  finish))

 

                 It shows record reference.

 

 

 

6)      Then click on create document type button           next                 next            finish

 

It will create schema  DT of document  type

 

 

 

7)      Create an  XML  document with  same fields as  flat file schema

 

          Select  Document  as root

 

          And Document  list as schema  name

 

          And  Strings as  records

 

 

 

8)      Add a flow service to get the file

 

      Winpub.pub.file.getfile

 

      Get file and  load as bytes

 

      Double click on file name-

 

      Select the path of  flat file

 

     Paste it in the  message box

 

 

 

9)      Add a flow service to convert the  values of the flat file   (inside service)

 

Winflatfile . pub.flatfile.convert  to values

 

body

 

           bytes map to flatfile data

 

           double click on flatfile schema

 

    copy the schema name and  paste it in the message box (inside pipeline out)

 

               -select – document – reference

 

                             Ctl – v

 

                Copy schema DT & paste as name of the Document  reference

 

                Map flat file values and schema  DT Reference

 

 

 

10)   Select a map(flow service)

 

Create new document ref. -  copy XML document name & paste.

 

 

 

               Pipeline In                                                                   Pipeline Out

 

                                                            MAP                                  (XM/XML)

 

               fH schema DT                                                                XML Doc

 

                   record                                                                                   Root

 

                                                                                                                          Emp (schema)

 

 

 

                      R1                                                                                       R1

 

                      R2                                                                                        R2

 

                      R3                                                                                         R3

 

 

 

              Mapping of schema document values to XML document values.

 

 

 

11)   Add a flow service to convert XML document to XML string

 

Winpub . pub . XML document to XML string

 

XML                         map                          document

 

 

 

12)   Add a flow service

 

Win sample .sample. Io . test . write to file

 

XML data                  map                              file content

 

Then it will generate an  XML file at a specified path

 

 

 

Similar Blogs:

 

webMethods step by step XML to Flat file

 

webMethods step by step flat to xml

 

webMethods step by step flat file to xml

 

webMethods step by step EDI to Flat file

Prev Next
About the Author
Topic Replies (2)
  1. 1
    idnkx user

    Ingre heigh

    it's useful , good collection

    1
    idnkx user

    Paparao

    it's useful , good collection

Leave a Reply
Guest User

You might also like

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect