Patterns in nxsd:startsWith
Hi,
Can I have pattern in nxsd:startsWith attribute. For eg I want to match "h?????2". Please help.
Thanks
Suryaveer
Thanks for your prompt reply but can you give me a better example I have to match something like this: HSBR5 GBA-011003. 6 chars before GBA and 7 chars after it. One thing more what does $ means here, is it number of characters before and after?
Thanks,
Suryaveer
Edited by: Suryaveer on Jul 24, 2009 5:56 PM
Similar Messages
-
Reading Complex Text document using FileAdapter
Hello All,
Can some body help me to read the text file which have complex structure delimited with semicolon, the text file has one header and one trailer records and with multiple details lines that has no specific pattern for starting, it can start with any alphanumeric character.
File Header CRM financial Interface to ERP;Interface_id=INT02;FileSequenceNo=00001;Country=US;FileDate=20120903;ExecutionMode=TEST
P430030205641 ;001;J2;09;SEK
P430000205641 ;002;J2;09;SEK
F430004705642 ;003;J2;09;SEK
F430004705642 ;004;J2;09;SEK
F430004705642 ;005;J2;09;SEK
R430477805641 ;006;J2;09;SEK
R430477805641 ;007;J2;09;SEK
R430477805641 ;008;J2;09;SEK
File footer;NumberOfPackages=3;NumberOfLines=00000008Hello Vladodias,
I have created schema as per the developer guide
<?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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Header" type="tns:HeaderType" nxsd:startsWith="File Header" />
_*<xsd:element name="Records" type="tns:RecordType" maxOccurs="unbounded" />*_
<xsd:element name="Footer" type="tns:FooterType" nxsd:startsWith="File footer" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="RecordType">
<xsd:sequence>
<xsd:element name="R1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="R2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="R3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="R4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="R5" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FooterType">
<xsd:sequence>
<xsd:element name="F1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="F2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="F3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="HeaderType">
<xsd:sequence>
<xsd:element name="H1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="H2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="H3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="H4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="H5" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=";" />
<xsd:element name="H6" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
When I test above sample file with "tns:RecordType" maxOccurs="unbounded" />, schema builder is throwing me error .
Error
Error while reading native data. [Line =10, Col=32] Expected ";" for the data starting at the specified position, while trying to read the data for "element with name R3", using "style as 'terminated" and "terminatedBy` as ";", but not found. Ensure that ";", exists for the data starting at the specified position.
When I test above sample file with "tns:RecordType" maxOccurs="8" />, it is working pefectly, but it is not the idel solution.
Is there is any solution so that it will stop processing the records when it reaches the end? -
Using a variable in "arrayTerminatedBy" clause while using a file adapter
Hi All,
How can read a file of sample shown below using a file adapter.
ABC|20081010|
2008|xxxxxxx|
2007|yyyy|
2009|zzzzzzz|
3|20081010|
first line is the header
last line is footer
middle portion is the body
'3' in the footer is the total no of record count in the body
I am able to read the header and body.
The problem i am facing is; when it is reading the footer it is treating the footer as a record in the body and is throwing an error stating - expected the format as "yyyy"
I have to use "arrayTerminatedBy" to indicate the end of the body. But that terminating field is a varying field. How can i use this variable field in the "arrayTerminatedBy" clause.
Can any one help in reading this file
Thanks in advance
Edited by: user10308218 on 11-Oct-2008 02:23
Edited by: user10308218 on 11-Oct-2008 02:24See if this helps, I haven't tested it but it will give you a hint in how to achieve it. As you can see I use the startsWith command. I'm not sure how to handle your detail as it seems to start with different elements every time.
cheers
James
<?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://TargetNamespace.com/Write_File"
xmlns:tns="http://TargetNamespace.com/Read_File"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="FileRecord">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Header" nxsd:startsWith="ABC|" maxOccurs="1">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="FileDate" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
<xsd:element name="Record" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="DetailData1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="""/>
<xsd:element name="DetailData2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
<xsd:element name="Footer" nxsd:startsWith="3|" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="FooterData" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema> -
File Adapter with Master/Detail Use Case
Hello,
We are trying to model an inbound text file interface using the native format wizard to create a schema. The layout of this type of file would be fixed length with a header record followed by detail records like this:
header1header1header1header1header1
detail1detail1detail1detail1detail1detail1detail1detail1detail1detail1
header2header2header2header2header2
detail2detail2detail2detail2detail2detail2detail2detail2detail2detail2
We tried everything to get the wizard to layout the fields in each of these formats using the multiple records, multiple types choice and with no success. Has anyone gotten this type of thing to work? The error we're getting is something about the first position of the second record needing to start after the last position of the first record which seems daft because each line is a separate record. There doesn't seem to be any detailed help on this wizard that I can find.
Thanks.Hi,
Here is an example of a Master/detail XML schema I made. Hope it helps.
It would be intersting to jnow how people have implemented that.
<?xml version="1.0" encoding="US-ASCII"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://TargetNamespace.com/File4"
xmlns:tns="http://TargetNamespace.com/File4"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="US-ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded" minOccurs="0">
<xsd:element name="Data">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded" minOccurs="0">
<xsd:element ref="tns:Master" minOccurs="0" nxsd:startsWith="MASTER," maxOccurs="unbounded"/>
<xsd:element ref="tns:Detail" minOccurs="0" nxsd:startsWith="DETAIL," maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- Master -->
<xsd:element name="Master" type="tns:MasterType"/>
<xsd:complexType name="MasterType">
<xsd:sequence>
<xsd:element name="ID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="MasterID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="A1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="A2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="A3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Detail -->
<xsd:element name="Detail" type="tns:DetailType"/>
<xsd:complexType name="DetailType">
<xsd:sequence>
<xsd:element name="ID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="MasterID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="B1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="B2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> -
How to ignore footer in fixed length file
I have the following data which needs to be processed
SMAL002495
SMAL002496
%%EOF
which consists of multiple (unbounded) records with a single end of file marker (%%EOF)
This is the existing schema used:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="--suppressed--"
xmlns:tns="--suppressed--"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="container">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="detail" nxsd:style="array" nxsd:cellSeparatedBy="${eol}" minOccurs="1" maxOccurs="unbounded" nxsd:arrayTerminatedBy="%%EOF">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ABC" type="xsd:string" nxsd:style="fixedLength" nxsd:length="20"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
How can I skip %%EOF and avoid having the inbound file rejected, given the adapter tries to allocate an element of 20 characters in length? (nsxd:arrayTerminatedBy, as shown above does not work as presumably, the %%EOF is on a separate line)
Is there a way I can exclude the %%EOF marker, or skip, or ignore it?
ThanksThere is a command StartsWith wich may help in this situation. You can play with the code but you should get the idea. BPEL will read it in but you can ignore by not mapping.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="suppressed"
xmlns:tns="suppressed"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="container">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="detail" nxsd:style="array" nxsd:cellSeparatedBy="${eol}" minOccurs="1" maxOccurs="unbounded" nxsd:arrayTerminatedBy="%%EOF">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ABC" type="xsd:string" nxsd:style="fixedLength" nxsd:length="20"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Dummy" nxsd:startsWith="%%EOF" maxOccurs="unbounded">
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
cheers
James -
How to generate a simpler version of container.xsd . Tool and steps, please
Hello,
Let see if I'm able to express correctly the help I need...
Some tutorials, for example FileDebatching (FileAdapter) or FTPDebatching (FtpAdapter) use the container.xsd file as an XMLschema.
I think this file is based in the container.txt file, this is sample of the file...
---------------------------------------------begin of file
IN6335722^IBM India^First Street 999 San Jose 95129USCA650-801-6250
1234567^Oracle^Bridge Parkway 1600 Redwood Shores 94065USCA650-506-7000
001|BPEL Process Manager Enterprise Edition|20000,2,+40000+
002|BPEL Process Manager Standard Edition|10000,5,+50000+
003|BPEL Process Manager Developer Edition|1000,20,+20000+#110000
PO03/08/19784534001Oracle Banerghatta Main Road Bangalore 560029Karnataka
2234201IBM India Intermediate Ring Road Bangalore 560037Karnataka
ORCL SERVER 10,10000,#
ThankingYou
IN6335722^IBM India^First Street 999 San Jose 95129USCA650-801-6250
1234567^Oracle^Bridge Parkway 1600 Redwood Shores 94065USCA650-506-7000
001|BPEL Process Manager Enterprise Edition|20000,2,+40000+
002|BPEL Process Manager Standard Edition|10000,5,+50000+
003|BPEL Process Manager Developer Edition|1000,20,+20000+#110000
PO03/08/19784534001Oracle Banerghatta Main Road Bangalore 560029Karnataka
2234201IBM India Intermediate Ring Road Bangalore 560037Karnataka
ORCL SERVER 10,10000,#
ThankingYou
-------------end the file
container.xsd represents a file that can include PO's and INVOICES, 2 different things in the same file.
I would like to know how to create the container.xsd in a simpler way, I mean one file for invoices.
I know already how to create this file (automatically...) when creating a partner link for reading a text file like this:
--------begin of file
SYS COa;HR API;26-11-2007;EUR;1
SYS COb;HR API;26-11-2007;EUR;1
----------end of file
But I do not know how to do the same when the file contains records that means master-details, I mean an invoice has one or more lines and could include a footer (header-body-footer).
Any help would be appreciated.
JuanjeHi,
You can generate a native XSD first for the file format you are looking to parse. Then you can manually modify to get the structure you want for the xml. We did similar thing for ex we had one big file containing records and we wanted each record in its structure type
Record1
subrecord1
subrecord2
Record2
subrecord1
We had our xsd like -
<xsd:element name="container">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="Record" type="tns:Record" nxsd:startsWith=""0001","/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="Demographics" type="tns:demographicsType"/>
<xsd:element name="Insurance" type="tns:insuranceType" maxOccurs="unbounded" nxsd:startsWith=""IN1"," minOccurs="0"/>
<xsd:element name="Employer" type="tns:employerType" maxOccurs="unbounded" nxsd:startsWith=""EMP"," minOccurs="0"/>
<xsd:element name="Charges" type="tns:chargesType" maxOccurs="unbounded" nxsd:startsWith=""001"," minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="demographicsType">
<xsd:sequence>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="insuranceType">
<xsd:sequence>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="employerType">
<xsd:sequence>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="chargesType">
<xsd:sequence>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="f3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
HTH,
Dipal -
Hi All,
I have a file adapter service,which has to read a CSV file.
The configurations i have done is
1)Gave the incming diretory path,delete option is checked
2)Polling frequency - 5 secs
3) gave the xsd.
But the process is not picking up the file,and i dont see any errors in domain.log
Please help.
Regards
AshwiniHi Anirudh,
Thanks for the reply.
IS there no solution other than restarting the server ??
below is the xsd i am using.please let me know the modifications that i can do to reject the second invoice if there are any errors in that and proceed further.
<?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://antony.blog.com/ReadStructuredMasterDetailService"
xmlns:tns="http://antony.blog.com/ReadStructuredMasterDetailService"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="Invoice">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="InvoiceHeader" nxsd:startsWith="$H$" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Supplier_name" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Supplier_Site" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Inv_No" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Invoice_Date" type="xsd:date" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Invoice_Currency" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Invoice_gross_Amount" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Total_Ex_VAT" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="Total_VAT_Amount" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Scanned_image_Reference_URL" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
<xsd:element name="InvoiceDtail" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="InvoiceDTL" nxsd:startsWith="$D$"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Business_Unit" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="location" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Store_Name" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Department" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Natural_Account" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy=","/>
<xsd:element name="Inc_VAT" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="Ex_VAT" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="VAT_Amount" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," />
<xsd:element name="VAT_Rate" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Regards
Ashwini -
File Adapter fixed length Native format Builder schema not reading the data as expected
Hi
We are using a File Adapter for reading a fixed length data. Using the schema we are able to read the file but the places are incorrect. Following is the schema that we used and the payload.
At the last you can find our expected read of data how it should be.
With out the record type code we are not even reading the file. Hope there should be a correction in the schema. Please suggest
Schema that we are using:
<?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://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
targetNamespace="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:stream="chars"
nxsd:encoding="US-ASCII">
<xsd:element name="GENVNDRReturnedItem">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="1">
<xsd:element name="HeaderRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="PriorityCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateDstn" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateOrgin" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="FileCrDt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="FileCrTm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="4" nxsd:padStyle="tail"/>
<xsd:element name="FileIdMdfr" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="RecSize" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3"
nxsd:padStyle="tail"/>
<xsd:element name="BlockingFctr" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="tail"/>
<xsd:element name="FormatCd" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateDstnNm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="23" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateOrginNm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="23" nxsd:padStyle="tail"/>
<xsd:element name="RefCd" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8"
nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BatchHdrRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="5">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="ServClsCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyName" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="16" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyDiscretionaryData" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="20" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyIdfn" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="StdClsCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyEntryDesc" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyDescDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="EffEntryDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="SettlementDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="OrgntrStatusCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="OrgntrBatchCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="15" nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FileControlRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}"
nxsd:startsWith="9">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="BatchCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="BlockCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="EntryAddendaCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="8" nxsd:padStyle="tail"/>
<xsd:element name="EntryHash" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="TtlDbtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="12" nxsd:padStyle="tail"/>
<xsd:element name="TtlCrdtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="12" nxsd:padStyle="tail"/>
<xsd:element name="Reserved" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="39" nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Sample data:
1011390714890 0910000191406110449A094101MCSCLDA_TESTIN
XPLLS KNRGO CNNK
5200MCSCLDA_TESTIN e-Bill
2390714890TELe-Bill
1406100001091000017000001
6262759774891010000074743
0000033793102651-013 U HOLBACH KARLA & JAMES 1091000013925011
799R01091000013925011
27597748
091000010000001
820000000200275977480000000337930000000000002390714890
091000010000001
9000060000025000001200995048661000001265867000000000000
Read File receive Activity:
<GENVNDRReturnedItem>
<HeaderRec>
<RecordTypeCode>0</RecordTypeCode>
<PriorityCode>11</PriorityCode>
<ImmediateDstn>390714890</ImmediateDstn>
<ImmediateOrgin>0910000191</ImmediateOrgin>
<FileCrDt>406110</FileCrDt>
<FileCrTm>449A</FileCrTm>
<FileIdMdfr>0</FileIdMdfr>
<RecSize>941</RecSize>
<BlockingFctr>01</BlockingFctr>
<FormatCd>M</FormatCd>
<ImmediateDstnNm>CSCLDA_TESTIN X</ImmediateDstnNm>
<ImmediateOrginNm>PLLS KNRGO CNNK</ImmediateOrginNm>
<RefCd></RefCd>
</HeaderRec>
<BatchHdrRec>
<RecordTypeCode>2</RecordTypeCode>
<ServClsCode>00M</ServClsCode>
<CmpnyName>CSCLDA_TESTIN e</CmpnyName>
<CmpnyDiscretionaryData>-Bill 2</CmpnyDiscretionaryData>
<CmpnyIdfn>390714890T</CmpnyIdfn>
<StdClsCode>ELe</StdClsCode>
<CmpnyEntryDesc>-Bill</CmpnyEntryDesc>
<CmpnyDescDate>1</CmpnyDescDate>
<EffEntryDate>406100</EffEntryDate>
<SettlementDate>001</SettlementDate>
<OrgntrStatusCode>0</OrgntrStatusCode>
<OrgntrBatchCode>91000017000001</OrgntrBatchCode>
</BatchHdrRec>
<FileControlRec>
<RecordTypeCode>0</RecordTypeCode>
<BatchCnt>000600</BatchCnt>
<BlockCnt>000250</BlockCnt>
<EntryAddendaCnt>00001200</EntryAddendaCnt>
<EntryHash>9950486610</EntryHash>
<TtlDbtEntryDlrAmt>000012658670</TtlDbtEntryDlrAmt>
<TtlCrdtEntryDlrAmt>00000000000</TtlCrdtEntryDlrAmt>
<Reserved></Reserved>
</FileControlRec>
</GENVNDRReturnedItem>
Expected Read data how we are looking:
<GENVNDRReturnedItem>
<HeaderRec>
<RecordTypeCode>0</RecordTypeCode>
<PriorityCode>11</PriorityCode>
<ImmediateDstn>39071489</ImmediateDstn>
<ImmediateOrgin>0091000019</ImmediateOrgin>
<FileCrDt>140611</FileCrDt>
<FileCrTm>0449</FileCrTm>
<FileIdMdfr>A</FileIdMdfr>
<RecSize>094</RecSize>
<BlockingFctr>10</BlockingFctr>
<FormatCd>1</FormatCd>
<ImmediateDstnNm>MCSCLDA_TESTIN</ImmediateDstnNm>
<ImmediateOrginNm>XPLLS KNRGO CNNK</ImmediateOrginNm>
<RefCd/>
</HeaderRec>
<BatchHdrRec>
<RecordTypeCode>2</RecordTypeCode>
<ServClsCode>200</ServClsCode>
<CmpnyName>MCSCLDA_TESTIN</CmpnyName>
<CmpnyDiscretionaryData>e-Bill</CmpnyDiscretionaryData>
<CmpnyIdfn>2390714890</CmpnyIdfn>
<StdClsCode>TEL</StdClsCode>
<CmpnyEntryDesc>e-Bill</CmpnyEntryDesc>
<CmpnyDescDate/>
<EffEntryDate>140610</EffEntryDate>
<SettlementDate>000</SettlementDate>
<OrgntrStatusCode>1</OrgntrStatusCode>
<OrgntrBatchCode>091000017000001</OrgntrBatchCode>
</BatchHdrRec>
<FileControlRec>
<RecordTypeCode>0</RecordTypeCode>
<BatchCnt>000060</BatchCnt>
<BlockCnt>000025</BlockCnt>
<EntryAddendaCnt>00000120</EntryAddendaCnt>
<EntryHash>0995048661</EntryHash>
<TtlDbtEntryDlrAmt>000001265867</TtlDbtEntryDlrAmt>
<TtlCrdtEntryDlrAmt>000000000000</TtlCrdtEntryDlrAmt>
<Reserved/>
</FileControlRec>
</GENVNDRReturnedItem>at step 8 of 9 of the file adapter wizard, the icon appears as a cog, on the right, with caption "define schema for native format".
I have JDev 11..1.1.3.0
The problem might be with the version of the SOA extensions you have installed.... -
Reading a multiple record types from a single File using BPEL file adapter
Hi all.
We have a requirement where we want to read a CSV file using the BPEl adapter.
Following is the sample of csv file
HDR,1,2,3
---- First transaction starts----
TH,1,2,3
RSD,1,1
RSD,1,1
TD,1
-------Second transaction starts---
TH,1,2,3
RSD,1,1
RSD,1,1
RSD,1,1
RSD,1,2
TD,1
TD,1
-------------Third Transaction starts---
TH,1,2,3
RSD,1,1
TD,1
TD,1
TD,1
TD,1
-------------Fourth Transaction starts---
TH,1,2,3
LN,1,1,1,1,2
-----End of File---
TAIL
I have modified the file with some comments to have some clear understanding.
Basically our file is a transactions file from legacy system & contains mutliple transactions
First line will be a Header record starting "HDR" & contains all summary details about the file.
After it is details of all transactions thorughout the day, each transaction begins with record starting "TH".As shown in all transactions above.EAch transaction can have other multiple records like the RSD & TD shown above.
Our need is to read each transaction from the file & create an instance.How can we configure BPEL to grab the data starting with TH till it encounter's another TH.
Please advise
KrunalYou can't use the wizard to create a schema if a file as complex as this. the good news is that you can create one yourself. What you need to do is create standard xsd that will handle your file, then what you do is add the terminators that determine when a field stops.
Here is an example, hopefully this provides you enough infor for you to make your own.
<?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://Invoice"
xmlns:tns="http://Invoice"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:encoding="ASCII"
nxsd:stream="chars"
nxsd:version="NXSD">
<xsd:element name="Invoice">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="InvoiceHeader" nxsd:startsWith="000" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:InvoiceHeaderDetails" />
<xsd:element ref="tns:LineItem" nxsd:startsWith="001" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InvoiceHeaderDetails">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="InvoiceNo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="16" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="InvoiceDate" type="xsd:string" nxsd:style="fixedLength" nxsd:length="15" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="VendorNo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="29" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="OriginCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="OperatorID" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="LineCount" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="34" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="GrossAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="17" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="DiscountAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="50" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="FreightAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="93" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="TaxAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="50" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="DiscountFlag" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1" nxsd:paddedBy=" " nxsd:padStyle="tail" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LineItem">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LineItemDetails">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="InvoiceLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="DistributionCount" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="BusinessUnitPO" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="PONo" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="POLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="38" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="InvoiceLineAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="17" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element ref="tns:Distribution" nxsd:startsWith="002" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Distribution">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="BusinessUnit" type="xsd:string" nxsd:style="fixedLength" nxsd:length="13" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="InvoiceLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="5" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="DistributionLineNo" type="xsd:integer" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="GLAccountCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="84" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="DistributionAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="162" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="DistributionTaxAmount" type="xsd:decimal" nxsd:style="fixedLength" nxsd:length="62" nxsd:paddedBy=" " nxsd:padStyle="tail" />
<xsd:element name="GLDepartmentCode" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10" nxsd:paddedBy=" " nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
cheers
James -
FileAdapter Write file with empty payload always error
Hi All ,
I run on 10.1.3.3.1 with patch Patch 7375080 only esb not have bpel.I have to use webservice for verify data.
and response with set of objects.
I have 2 important questions about write file with FileAdapter.
1. I want to not create file if not have error from validate data but
with this xsl tranform if I uncomment when value of condition is 'N' that will error cause single line payload.
<xsl:for-each select="/tns:populateYFRIResponseElement/tns:result/tns:wrongLines">
<!--<xsl:choose>
<xsl:when test="../tns:isHaveWrongLines = 'Y'">-->
<imp1:Child-Element>
<imp1:FrameNo>
<xsl:value-of select="concat('"',tns:frameNo,'"')"/>
</imp1:FrameNo>
<imp1:EngineNo>
<xsl:value-of select="concat('"',tns:engineNo,'"')"/>
</imp1:EngineNo>
</imp1:Child-Element>
<!-- </xsl:when>
</xsl:choose>-->
</xsl:for-each>
but if I comment if condition 'Y' FileAdapter create csv files with empty like "","" .
2.
I must write log file with FileAdapter . I want to append file so I add attribute Append=true
to wsdl
<jca:operation
LogicalDirectory="outgoingfile"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="YFRI%yyMMdd%.log"
NumberMessages="1"
Append = "true"
>
but when run that throws errors cause properties append not found.
I view class FileInteractionSpec that have append properties .I very confuse.
Any help would be appreciated.
Regards,
WeerawatHi
Thank for good answer.I am newbies in esb so I don't know that have routing expression before.
I'm so glad your answer very helpful before routing but same question 1 if I have detail must not write data like below
,import file name YFRI20090616165654.DAT at Tue Jun 16 16:59:26 GMT+07:00 2009 with number of data is 2 correct line is 2
"D",0,0,
,import file name YFRI20090616170202.DAT at Tue Jun 16 17:04:40 GMT+07:00 2009 with number of data is 12 correct line is 12
"D",0,0,
YFRI.txt,import file name YFRI.txt at Tue Jun 16 19:53:48 GMT+07:00 2009 with number of data is 2 error line is 2
"D",1,3,MTOCCode:ZE8839LZ SAA is not have in DB
"D",2,3,MTOCCode:ZE8839LZ SAA is not have in DB
with
<xsd:element name="LogFile">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FileName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="Desc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy=""">
</xsd:element>
<xsd:element name="Detail" nxsd:startsWith=""D"," maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="line" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="column" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="desc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
ESB will display error payload If import not have verify error detail so I have to write 'D',0,0 (Detail,Line,Column).
In this situation how am I to do ?
In question 2 .Now I can append with
<jca:operation
LogicalDirectory="outgoingfile"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="YFRI%yyMMdd%.log"
NumberMessages="1"
OpaqueSchema="false"
Append="true"
>
</jca:operation>
Thank you
Weerawat -
I am trying to pick up a .csv file that doesn't comform to a strict format, mainly because of human formatting errors in the file.
I've tried to create a fixed length schema and a comma delimited schema but both fail as soon as they get a file that doesn't exactly fit. How should I create the schema to cope with a file like this?
Regards
JenI too am trying to accomplish something similar.
My file is tab delimited and has 10 fields. It begins with 6 lines of header and ends with 1 line of footer. The Header is easy enough to skip over, but the footer is causing me no end of problems because the file Adapter is rejecting the entire file when it hits this malformed line. I tried to turn on uniqueMessageSeparator as ${eol} but that didn't seem to do anything different (I suspect it is because ${eol} is also a field terminator for the last field but I'm not sure).
Ideally I'd like to say any line that has 9 tabs is a Data line, and any line that doesn't is a NotData line but I haven't found any functions that will take a regular expression match as a condition for processing in the XSD.
I tried using the "choice" method of conditional processing but is seems that I must provice a string that is an exact match for nxsd:conditionValue and not a regex. I don't have a spcific string to look for.
I also tried to use the "Sequence" method of conditional processing that will treat any record that doesn't begin with a digit as a NotData Message of 1 string element terminated by ${eol} and any record that begins with 8 digits (which is a date in YYYYMMDD format) as a Data record using the "nxsd:startsWith" function but it seems I can only create multiple message types on files when there is some specific string to test. That's not going to work for me. There is no specific string on the records to identify them. The format of the line could be used to identify the records if a function supporting a regex could be found.
When I tried to deploy the "Sequence" method using a regex for the nxsd:startsWith value it seemed to put my BPEL Process into an infinite loop consuming 100% CPU. I had to kill the app server to stop it.
A detailed reference on how the File Adapter processes files and what functions are available for ignoring bad records and/or conditional processing would be appreciated. Also, any more ideas on how to get this file parsed would be appreciated. -
Urgent(Transformation help needed)
Hello
Can anybody help me in the transformation.
I am selecting data from the table, i used (Database adapter-Single table
selection).
I need to place that data into the text file of Fixedlength format.Each record is
of diffent types.
My target xsd is:
==============
?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd=..........>
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="REC_2701" minOccurs="0" nxsd:startsWith="2701" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="C3" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1">
</xsd:element>
<xsd:element name="C4" type="xsd:string" nxsd:style="fixedLength" nxsd:length="6">
</xsd:element>
<xsd:element name="C5" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5">
</xsd:element>
<xsd:element name="C6" type="xsd:string" nxsd:style="fixedLength" nxsd:length="12">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="REC_2702" minOccurs="0" nxsd:startsWith="2702" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="C3" type="xsd:string" nxsd:style="fixedLength" nxsd:length="1">
</xsd:element>
<xsd:element name="C4" type="xsd:string" nxsd:style="fixedLength" nxsd:length="6">
</xsd:element>
<xsd:element name="C5" type="xsd:string" nxsd:style="fixedLength" nxsd:length="5">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
When i tranform the data I am getting result fixed length data file in the following format.
2701C50 50 MUVT01
2701C03451 03451SIMUL1
2701C44034 44034SIMUL3
2702C50 50
2702C03451 03451
2702C44034 44034
But i need to get the fixed length file data in the below format
============================================
2701C50 50 MUVT01
2702C50 50
2701C03451 03451SIMUL1
2702C03451 03451
2701C44034 44034SIMUL3
2702C44034 44034
Can anybody suggest me the solution to the above case ?
Thanking you
mkiOnly a guess, but could you try removing the nxsd:style="fixedLength" from the xsd?
Another option might be to concatenate the values in BPEL into one field, trimming the spaces. You could then have an xsd with the file adapter to write out this one column.
Toby
Message was edited by:
tobyc -
I forgot pattern lock on my Sony Xperia Z1 and i need it back
Hello,
on my sony xperia z1 phone i forgot my pattern lock. I can't use the Forgot Pattern Lock because it uses Wifi conection which i can't connect to...(my screen is locked) I want to hard reset it somehow but i tried allmost every method on the internet but none of them were working I tried holding the volume up and these things....but as i said it won't work for me. Can anyone please help me? THANK YOU VERY MUCHIn order to fix this you need to perform a system repair
Switch off your phone and unplug from Pc (Hold volume up and power for around 10 seconds)
Start PC Companion and select Support zone then Update my phone/tablet then in Blue Repair my phone/tablet and follow the onscreen instructions - When prompted connect your phone still switched off holding volume down or back button - This should start the repair or reformat process
If you are using Windows 8/8.1 or a 64bit operating system then adjust the settings for PC Companion and run in compatibility mode and chose Windows 7 or XP
For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled. Richard P. Feynman -
G5 locking up, random screen pattern lock ups
Alright, this is actually my brother's computer, which he's had for at least a year and half, with no problems. I just recently started using it to play a computer game, World of Warcraft. The game ran smoothly with no problems for a couple of weeks. Then, some graphical problems started showing up out of no-where and eventually, within the next week led to the game and computer locking up randomly, requiring a manual restart. The fan in the back of the flat panel would get loud sometimes when this happened.
Now the comp freezes up whenever I even try starting up a game, not just warcraft, but will play videos just fine. (I already asked about the problem on that game's tech forums and they looked at the system specs and thought it might be a problem with this comp, saying that there was some recall on this model because of a faulty part.)
When starting up the comp, there are flashy, colorful streaks all over the screen, (probably 80% of the time)
Randomly when doing anything on this comp, a colored checker or bricklike pattern will cover the entire screen and require manual restart. It really makes it hard to do anything since we have to manually restart the comp a few times before the normal screen will come up. My question is: What might be wrong with this computer? Might playing that game have revealed the problem, since there had been no games used on this computer since now?
Hardware Overview:
Machine Name: iMac G5
Machine Model: PowerMac8,1
CPU Type: PowerPC G5 (3.0)
Number Of CPUs: 1
CPU Speed: 1.8 GHz
L2 Cache (per CPU): 512 KB
Memory: 1 GB
Bus Speed: 600 MHz
Boot ROM Version: 5.2.2f2
Serial Number: W84401NRPNZ
GeForce FX 5200:
Chipset Model: GeForce FX 5200
Type: Display
Bus: AGP
Slot: AGP
VRAM (Total): 64 MB
Vendor: nVIDIA (0x10de)
Device ID: 0x0329
Revision ID: 0x00b1
ROM Revision: 2103
Displays:
iMac:
Display Type: LCD
Resolution: 1344 x 840
Depth: 32-bit Color
Built-In: Yes
Core Image: Supported
Main Display: Yes
Mirror: Off
Online: Yes
Quartz Extreme: Supported
Display:
Status: No display connected
DIMM0/J4000:
Size: 512 MB
Type: DDR SDRAM
Speed: PC3200U-30330
Status: OK
DIMM1/J4001:
Size: 512 MB
Type: DDR SDRAM
Speed: PC3200U-30330
Status: OK
IMac PowerPC G5 1.8 GHz Mac OS X (10.4.5)G'day Cory,
I'm starting to experience some of the same problems. When I boot the G5 iMac and its cold it will exhibit a heap of screen flicker in the grey screen and then boot normally. After that it boots to the OS with seemingly no problems ... except the screen refresh ... which leaves 'ghost' images all over the screen. When I Restart the problem seems to go away ... no screen streaks and lines at the grey screen, the screen refreshes as per normal ... and there are very few application hangs.
What I suspect is that since I have the original 20" 1.8 Ghz G5 iMac the resistors and/or motherboard have a fault which Apple acknowledged nearly a year back. It was common on PC's also .. hey who wants to spend 10 cents on a resistor when you can get the 'same' thing for 5 cents.
Apple announced a free repair program for this fault, so if that is what's the problem you (and I) should be able to get the puppy repaired free of charge by taking it into your nearest Apple dealer and letting them do their stuff.
I'm also covered by an AppleCare policy (hey, I had the DVD SuperDrive fail on my G4 Mac about 2 years into owning it - so figured better safe than sorry) ... but I figure this puppy will be repaired under the repair policy that Apple made known.
Regards, -
Hello...using DPL, JE (3.1.0), and trying to come up with a design that fits the following mold:
@Entity
public class Thing {
@PrimaryKey
long id;
@SecondaryKey(relate=MANY_TO_ONE)
int thingTypeId;
// how to link this to thing attribute model below?
List<ThingAttribute> thingAtts = new ArrayList<ThingAttribute>( );
}Thus, a Thing can have a list of attributes. A thing has a unique id (primary key), and a thing has a thing-type id...and there can be many instances of that thing-type, so it is MANY_TO_ONE.
Now, a ThingAttribute follows the Composite Pattern...as below. I took a stab at annotations here, but I'm not sure it seems correct:
@Persistent
public abstract class AbstractThingAttribute {
/* only simple attribute subclass has an id -- composite subclass does not
* so we add a sequence here
@PrimaryKey(sequence="ID")
long id;
// thing type id
@SecondaryKey(relate=MANY_TO_ONE)
int thingAttributeType;
@Entity
public class SimpleThingAttribute<T> extends AbstractThingAttribute {
// unique id
@SecondaryKey(relate=ONE_TO_ONE)
long id;
// generic type value
T value;
@Entity
public class CompositeThingAttribute extends AbstractThingAttribute {
// this is a recursive-definition relationship; not sure how to deal with DPL?
// list of children
List<ThingAttribute> children = new ArrayList<ThingAttribute>( );
}As an aside, there is an interface for ThingAttribute, SimpleThingAttribute, and CompositeThingAttribute...this is not too relevant for this example, but Simple/Composite interfaces extend the ThingAttribute interface.
Q1) If I create a new Thing object, and I want to persist it, it is clear to me how it works for the primary secondary key here, but how do I annotate the ThingAttribute hierarchy such that it gets persisted along with the Thing object? I guess this boils down to a couple things:
a) how to treat the thingAtts ArrayList in a Thing object itself so it gets persisted?
b) now, i have a list of objects, where each entry in the list follows the structure of the composite pattern. how should i approach annotating this model?
Thanks in advance,
DavisHi Davis!
Q1) If I create a new Thing object, and I want to
persist it, it is clear to me how it works for the
primary secondary key here, but how do I annotate the
ThingAttribute hierarchy such that it gets persisted
along with the Thing object? I guess this boils down
to a couple things:
a) how to treat the thingAtts ArrayList
in a Thing object itself so it gets persisted?You just embed the thingAttrs object (as you have) in the entity. As long as the class is @Persistent (or a simple type) you can persist arbitrarily complex graphs of objects. The thin to remember is that it is stored as one object graph per entity, indexed by primary key and optionally by one or more secondary keys.
b) now, i have a list of objects, where each entry
in the list follows the structure of the composite
pattern. how should i approach annotating this
model? Don't annotate the embedded objects with @Entity, just with @Persistent. @Entity is only used when you want a separate PrimaryIndex. Objects embedded inside an entity are annotated with @Persistent only.
So when you have multiple objects you can use either embedding or relationships. With embedding, the object graph for the entire entity is stored in a single record.
With relationships, you store the keys of one entity as a field in the other entity, and you annotate that field with @SecondaryIndex(relate=..., relatedEntity=...). With relationships, you have to get the related object yourself via its own PrimaryIndex.
Hope this helps,
Mark
Maybe you are looking for
-
After a power outage, iPod now displays Apple Logo and wont turn off
I had my iPod connected to my PC (not on iTunes or Syncing), and when the power went out I unplugged my iPod from the PC and it now displays the apple logo without backlight, then with backlight. I tried resetting, but it only repeats the pattern.
-
[SOLVED] cannot connect to wireless networks
I started this topic some time ago. I no longer have access to the WPA network I was troubleshooting on, but now I have access to an unencrypted wireless network at a library and I still can't get wireless to work. This time it's not dropping my conn
-
Talking to Internet Explorer embedded Acrobat Reader via COM
Hi all. I'm developing an Internet Explorer BHO (browser plugin) and was wondering whether it's possibly for me to communicate with Acrobat Reader via COM. I have read through the SDK docs and it's not clear whether this is possible. I'm using unmana
-
TRIM firmware for the 128 GB Samsung SSD??
I have the 128 GB Samsung MMCRE28G8MXP that came with my T410S. CystalDiskInfo (and googling) tells me that TRIM has not been implemented on the drive's firmware. I can see that CrystalDiskinfo correctly identifies TRIM on my Crucial and my intel S
-
FCP 5 Launches automatically when Tiger starts up
I'm not sure what has changed but all of a sudden when I boot up my G5, FCP launches automatically. I haven't made any recent changes and couldn't find any type of utility in the OS other than something called launchd which I know nothing about and t