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.  XMLDTD Issues Urgent

    Posted 09/06/04 07:53 AM

    Peers,

    Really Appreciate your help here

    Currently, I have to map a SAP IDoc to an XML.

    The DTD of the XML has an element called InvoiceGroup
    InvoiceGroup (InvoiceHeader, InvoiceDetail*, InvoiceSummary)+

    When I load the DTD into I.S., I.S. create a document type

    InvoiceGroup
    InvoiceHeader <- Document List
    InvoiceDetail <- Document List
    InvoiceSummary <- Document List

    When I map the data from SAP IDoc to the XML, the following XML will be
    generated (as an example)

    <invoicegroup>
    <invoiceheader></invoiceheader>
    <invoiceheader></invoiceheader>
    <invoicedetail></invoicedetail>
    <invoicedetall></invoicedetail>
    <invoicesummary></invoicesummary>
    <invoicesummary></invoicesummary>
    </invoicegroup>

    which is not valid according to the DTD.

    The XML requried should look like

    <invoicegroup>
    <invoiceheader></invoiceheader>
    <invoicedetall></invoicedetail>
    <invoicesummary></invoicesummary>
    <invoiceheader></invoiceheader>
    <invoicedetail></invoicedetail>
    <invoicesummary></invoicesummary>
    </invoicegroup>

    The schema generated by I.S. is correct. However, I have a hard time
    playing around with the document type to generate an actual XML to satisfy the DTD.

    The DTD is given by a government department, thus I cannot modify it

    Thanks in advance


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


  • 2.  RE: XMLDTD Issues Urgent

    Posted 09/06/04 11:02 AM

    Hi Stephen,
    did you map each individual element(i.e. invoiceheader–invoiceheader) or mapped invoicegroup–invoicegroup. if you map invoicegroup–>invoicegroup then it should work.

    Regard’s
    MKR


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


  • 3.  RE: XMLDTD Issues Urgent

    Posted 09/06/04 02:49 PM

    Stephen,

    If you want to see the XML in this format
    <invoicegroup>
    <invoiceheader></invoiceheader>
    <invoicedetall></invoicedetail>
    <invoicesummary></invoicesummary>
    <invoiceheader></invoiceheader>
    <invoicedetail></invoicedetail>
    <invoicesummary></invoicesummary>
    </invoicegroup>

    then you might have to change the DocumentType structure in this way.
    <invoicegroup>
    ------><invoiceheader></invoiceheader> --DocumentList
    -------------><invoicedetall></invoicedetail>—underneath Header DocList
    -------------><invoicesummary></invoicesummary>----DocumentList
    Once after mapping the each instance of the above Invoice Header structure,use the appendToDocumentList Service

    ------><invoiceheader></invoiceheader> --DocumentList
    -------------><invoicedetall></invoicedetail> —underneath Header DocList
    -------------><invoicesummary></invoicesummary>----DocumentList
    </invoicegroup>

    But this mapping is very critical and just careful when appending the doclist’s and drop the temporary documents before appending.

    HTH,
    RMG.


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


  • 4.  RE: XMLDTD Issues Urgent

    Posted 09/06/04 05:23 PM

    RMG & MKR

    Thanks for the input

    But if I change the Document Type to
    <invoicegroup>
    ------><invoiceheader></invoiceheader> --DocumentList
    -------------><invoicedetall></invoicedetail>—underneath Header DocList
    -------------><invoicesummary></invoicesummary>----DocumentList

    Then the generated XML will be

    <invoicegroup>
    ----<invoiceheader>
    ---------><invocedetail></invoicedetail>
    ---------><invoicesummary></invoicesummary>
    ----</invoiceheader>
    ----<invoiceheader>
    ---------><invocedetail></invoicedetail>
    ---------><invoicesummary></invoicesummary>
    ----</invoiceheader>
    </invoicegroup>

    Instead of the required
    <invoicegroup>
    ------><invoiceheader></invoiceheader> --DocumentList
    -------------><invoicedetall></invoicedetail>—underneath Header DocList
    -------------><invoicesummary></invoicesummary>----DocumentList

    Then the generated XML will be

    <invoicegroup>
    ----<invoiceheader></invoiceheader>
    ----<invocedetail></invoicedetail>
    ----<invoicesummary></invoicesummary>
    ----<invoiceheader></invoiceheader>
    ----<invocedetail></invoicedetail>
    ----<invoicesummary></invoicesummary>
    </invoicegroup>


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


  • 5.  RE: XMLDTD Issues Urgent

    Posted 09/06/04 05:34 PM

    Stephen,

    Since all the document structures are documentlist
    InvoiceHeader <- Document List
    InvoiceDetail <- Document List
    InvoiceSummary <- Document List

    Unless you manipulate in the mapping of appending Header,Detail,Summary part and child elements i dont think there is a way to do as expected by changing in the doctype structure of the InvoiceGroup.

    <invoicegroup>
    ----<invoiceheader></invoiceheader>
    ----<invocedetail></invoicedetail>
    ----<invoicesummary></invoicesummary>
    ----<invoiceheader></invoiceheader>
    ----<invocedetail></invoicedetail>
    ----<invoicesummary></invoicesummary>
    </invoicegroup>

    Since you are tied up not changing the Schema its hard to manage and format according to your requirement.

    HTH,
    RMG


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