0 Replies Latest reply: Nov 27, 2012 10:30 PM by Anju RSS

    Issue in MFL Transformation

    Anju
      Hi All,

      I am trying to convert a NON-XML file to XML using MFL in OSB, but I am facing issue in doing so.

      The file which I read is in the below format
      Group of header and details (Can have multiple header-details group)

      11/28/2012|01|3
      50|1|001|045775401|001|05/15/2012|05/27/2012|04/07/2012|05/06/2012|47.10
      60|2|001|045772801|001|05/15/2012|05/27/2012|04/08/2012|05/07/2012|119.98
      30|3|001|045769501|001|05/15/2012|05/27/2012|04/07/2012|05/06/2012|136.80
      11/25/2012|02|4
      55|4|001|045761101|001|05/15/2012|05/27/2012|04/08/2012|05/07/2012|278.38
      30|5|001|045684102|001|05/15/2012|05/27/2012|04/09/2012|05/08/2012|35.99
      60|6|001|045683401|001|05/15/2012|99/99/9999|04/09/2012|05/08/2012|734.86
      61|7|001|045673701|001|05/15/2012|99/99/9999|04/09/2012|05/08/2012|284.52

      The XSD I created using Native file format builder for this file is as follows

      <?xml version="1.0" encoding="UTF-8" ?>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
      targetNamespace="http://twc.com/ReadDetailFile"
      xmlns:tns="http://twc.com/ReadDetailFile"
      elementFormDefault="qualified" attributeFormDefault="unqualified"
      nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
      <xsd:element name="Header">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="TransmissionDate" type="xsd:date"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="SequenceNumber" type="xsd:string"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="NoofStatements" type="xsd:string"
      nxsd:style="terminated" nxsd:terminatedBy="${eol}"></xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="StatementDetail">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="DivisionId" type="xsd:string" nxsd:style="terminated"
      nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="CorpSubCorp" type="xsd:string"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="SiteId" type="xsd:string" nxsd:style="terminated"
      nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="AccountNo" type="xsd:string" nxsd:style="terminated"
      nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="StatementCode" type="xsd:string"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="StatementDate" type="xsd:date"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="StatementDueDate" type="xsd:date"
      nxsd:style="terminated" nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="PeriodFrom" type="xsd:date" nxsd:style="terminated"
      nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="PeriodTo" type="xsd:date" nxsd:style="terminated"
      nxsd:terminatedBy="|"></xsd:element>
      <xsd:element name="Due" type="xsd:decimal" nxsd:style="terminated"
      nxsd:terminatedBy="${eol}"></xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="Detail">
      <xsd:complexType>
      <xsd:sequence maxOccurs="unbounded" minOccurs="1">
      <xsd:element ref="tns:Header" minOccurs="1" maxOccurs="1"/>
      <xsd:element ref="tns:StatementDetail" minOccurs="1" maxOccurs="unbounded"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>


      But this is not working for me. Any help is highly appreciated in solving this issues.
      Thanks in Advance!!

      Thanks,
      Anju