Hi all,
SOA Suite 12.2.1.2.0,
I am reading a CSV file zs input, invoke a Web Service and write the result to an output CSV file. I read the input file using a file adapter with a Chunk Read, I use a list to write the input lines into the output file.
The CSV input file has a header and I would like to know how to delete the header in the generated CSV output file.
The input file data is the following :
businessUnitName;supplierName;supplierNumber;invoiceNumber;holdLookupCod
OSA_BU01;LYRECO FRANCE;10081;4570119820;AMT ORD
OSA_BU01;LYRECO FRANCE;10081;4570119824;AMT ORD
The XSD schema for the input file
<?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"
xmlns:tns="http://TargetNamespace.com/fileService"
targetNamespace="http://TargetNamespace.com/fileService"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="UTF-8"
nxsd:hasHeader="true"
nxsd:headerLines="1"
nxsd:headerLinesTerminatedBy="${eol}"
>
<xsd:element name="Invoice">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Invoice" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="businessUnitName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="supplierName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="supplierNumber" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="invoiceNumber" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="holdLookupCod" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:annotation>
<xsd:appinfo>NXSDSAMPLE=invoices0005.csv</xsd:appinfo>
<xsd:appinfo>USEHEADER=false</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
The XSD for the output File
<?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"
xmlns:tns="http://TargetNamespace.com/fileService"
targetNamespace="http://TargetNamespace.com/fileService"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="UTF-8"
nxsd:hasHeader="false"
nxsd:headerLinesTerminatedBy="${eol}"
>
<xsd:element name="errInvoice">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Invoice" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="invoiceNumber" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="holdLookupCod" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy=""" />
<xsd:element name="Response" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Thanks for your answer,