Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
File adapter Read operation not working.

Hi All,
I have a simple file adapter which will read from a csv file and insert into a table. I have deployed the application successfully, but the application is not reading from the specific location. I am not getting any error in the EM console. Below is the XSD that I used.
<?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/InboundService"
targetNamespace="http://TargetNamespace.com/InboundService"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="US-ASCII"
>
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
<xsd:element name="Student" nxsd:conditionValue="R">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Roll" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" />
<xsd:element name="Name" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" />
<xsd:element name="Flag" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
This is the file that I want to read:
5,Ram,N
6,Shyam,N
Please help friends.
Answers
-
Can anyone please look into this. I know this is very simple. But as I am new to BPEL unable to notice what might be the error.
-
You should extensively practice the samples given in Oracle's documentation guide for modelling Native XSD. That will give you a better idea, about how to go about the native xsd schemas.. Anyways, I looked into your schema.. You need to make 2 changes to make this xsd work..
(1) Change "xsd:choice" tags to "xsd:sequence".
(2) Include a closing tag of "xsd:schema" to make the xsd well-formed.
-
Hi Puneet,
I did the changes; but still it is having the same prob. I can compile this successfully and can deploy it. But it is unable to read the files. Please help me on this.
-
Have you tested the schema against the files ? Do you see XML output when you test this native xsd via Native Format Builder ?
-
Yes, I have tested the schema against the files and I can see the desired XML output.
-
In that case, it should work.. If you design a file adapter with native xsd schema as the input-file-schema, it should pick the file and give you the same XML payload as the input. There must be a minor glitch somewhere..else, everything looks ok to me.