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
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.
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
But if I change the Document Type to
<invoicegroup>
------><invoiceheader></invoiceheader> --DocumentList
-------------><invoicedetall></invoicedetail>—underneath Header DocList
-------------><invoicesummary></invoicesummary>----DocumentList
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.