Announcement

Collapse
No announcement yet.

CSV to XML transformation - element namespaces stripped

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSV to XML transformation - element namespaces stripped

    I am transforming a CSV to XML by providing Inbound/Outbound message templates as sample CSV/XML files. I have correctly added the iterator and Message Builder steps also in the transformer.

    In my Outbound Message Template XML, I have 2 sets of data, which has namespaces "typ:", "item:" added to the end-elements -

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/scm/productModel/catalogs/itemCatalogService/types/" xmlns:item="http://xmlns.oracle.com/apps/scm/productModel/catalogs/itemCatalogService/" xmlns:cat="http://xmlns.oracle.com/apps/scm/productModel/catalogs/flex/category/" xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
    <soapenv:Header/>
    <soapenv:Body>
    <typrocessCategory>
    <typ:changeOperation>Create</typ:changeOperation>
    <typ:category>
    <item:CategoryName>TESTVS11291</item:CategoryName>
    <item:CategoryCode>TESTVS11291</item:CategoryCode>
    <itemescription>TESTVS11291</itemescription>
    <item:CatalogCode>LS_Purchasing_Catalog</item:CatalogCode>
    <item:StartDate>2017-11-29</item:StartDate>
    </typ:category>
    <typ:category>
    <item:CategoryName>TESTVS11292</item:CategoryName>
    <item:CategoryCode>TESTVS11292</item:CategoryCode>
    <itemescription>TESTVS11292</itemescription>
    <item:CatalogCode>LS_Purchasing_Catalog</item:CatalogCode>
    <item:StartDate>2017-11-29</item:StartDate>
    </typ:category>
    <typrocessControl>
    <typ1artialFailureAllowed>false</typ1artialFailureAllowed>
    </typrocessControl>
    </typrocessCategory>
    </soapenv:Body>
    </soapenv:Envelope>
    --------------------------------------------------------------------------------

    In my program, I am providing a CSV file with 4 rows (for example), and each CSV column is mapped to above XML end-elements. The issue is, when the transformation completes, the XML it generates does not have namespaces "item:" and "type:" appended to end-elements. For some rows its coming, for some its stripped.

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cat="http://xmlns.oracle.com/apps/scm/productModel/catalogs/flex/category/" xmlns:item="http://xmlns.oracle.com/apps/scm/productModel/catalogs/itemCatalogService/" xmlns:typ="http://xmlns.oracle.com/apps/scm/productModel/catalogs/itemCatalogService/types/" xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
    <soapenv:Header />
    <soapenv:Body>
    <typrocessCategory>
    <typ:changeOperation>Create</typ:changeOperation>
    <typrocessControl>
    <typ1artialFailureAllowed>false</typ1artialFailureAllowed>
    </typrocessControl>
    <typ:category>
    <CategoryName>TESTVS1</CategoryName>
    <CategoryCode>TESTVS1</CategoryCode>
    <Description>Test Category Upload</Description>
    <CatalogCode>LS_Purchasing_Catalog</CatalogCode>
    <StartDate>2017-11-28</StartDate>
    </typ:category>
    <typ:category>
    <CategoryName>TESTVS2</CategoryName>
    <CategoryCode>TESTVS2</CategoryCode>
    <Description>Test Category Upload</Description>
    <CatalogCode>LS_Purchasing_Catalog</CatalogCode>
    <StartDate>2017-11-28</StartDate>
    </typ:category>
    <category>
    <CategoryName>TESTVS3</CategoryName>
    <CategoryCode>TESTVS3</CategoryCode>
    <Description>Test Category Upload</Description>
    <CatalogCode>LS_Purchasing_Catalog</CatalogCode>
    <StartDate>2017-11-28</StartDate>
    </category>
    <category>
    <CategoryName>TESTVS4</CategoryName>
    <CategoryCode>TESTVS4</CategoryCode>
    <Description>Test Category Upload</Description>
    <CatalogCode>LS_Purchasing_Catalog</CatalogCode>
    <StartDate>2017-11-28</StartDate>
    </category>
    </typrocessCategory>
    </soapenv:Body>
    </soapenv:Envelope>
    --------------------------------------------------------------------------------------

    Does anyone have any idea what's causing it and how to resolve? "Strip Namespace" option is disabled at all levels.
Working...
X