Oracle® Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User's Guide
10g Release 2 (10.1.2.) B25307-01 |
|
Previous |
Next |
This chapter describes the Native Format Builder Wizard, which enables you to create native schemas used for translation. Use cases and constructs for the schema are also provided.
This chapter contains the following topics:
Oracle BPEL Process Manager requires native schemas for translation, which are based on XML schema. However, not all commonly used formats use XML schema files. To address this situation, Oracle BPEL Process Manager provides the Native Format Builder Wizard. This wizard is accessible from the Define Schema for Native Format button of the Messages window of the Adapter Configuration Wizard shown in Figure 6-1. The Messages window is the last window to display in the Adapter Configuration Wizard prior to the Finish window.
Figure 6-1 Starting the Native Format Builder Wizard
The Native Format Builder Wizard guides you through the creation of a native schema file from the following formats shown in Figure 6-2. A sample data file format for the selected type must already exist; you cannot create a native schema without one. You can also select to modify an existing native schema previously created with this wizard, except for those generated from a DTD or COBOL Copybook.
This option enables you to create native schemas for records, where the fields are separated by a value such as a comma or pound sign.
This option enables you to create native schemas for records, where the fields are all fixed lengths.
This option enables you to generate native schema from the user-supplied COBOL Copybook definition.
A COBOL mainframe application typically uses a COBOL Copybook file to define its data layout. The converter creates a native schema from a copybook such that the runtime translator can parse the associated data file.
A COBOL Copybook is typically a collection of group items (structures). These group items contain other items, which can be groups or elementary items. Elementary items are items that cannot be further subdivided. For example:
01 Purchase-Order 05 Buyer 10 BuyerName PIC X(5) USAGE DISPLAY. 04 Seller 08 SellerName PICTURE XXXXX.
Purchase-order
is a group item with two child group items (Buyer
, Seller
). The numbers 01
, 05
, 04
, and so on indicate the level of the group (that is, the hierarchy of data within that group).Groups can be defined that have different level-numbers for the same level in the hierarchy. For example, Buyer
and Seller
have different level numbers, but are at the same level in the hierarchy. A group item includes all group and elementary items that follow it until a level number less than or equal to the level number of that group is encountered.
Each of the group items (Buyer
and Seller
) has a child elementary item. The PIC
or PICTURE
clause defines the data layout. For example, BuyerName
defines an alphanumeric type of size equal to five characters. SellerName
has exactly the same data layout as BuyerName
.
Group items in COBOL can be mapped to elements in XML schema with the complexType
. Similarly, elementary items can be mapped to elements of type simple type with certain native format annotations to help the run time translator parse the corresponding data file. For example, the Buyer
item can be mapped to the following definition:
<!--COBOL declaration : 05 Buyer--> <element name="Buyer"> <complexType> <sequence> <!--COBOL declaration : 10 Name PIC X(5)--> <element name="Name" type="string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="5"/> </sequence> </complexType> </element>
You are expected to provide the following information:
Target namespace for the native schema to be generated
Character set of the host computer on which the data file was generated. By default this is set to EBCDIC (ebcdic-cp-us
).
Byte order of the host computer on which the data file was generated. By default this is set to big endian.
Record delimiter, which is typically the newline character, or no delimiter, or any user-supplied string
Container tag name for generated native schema. By default, this is set to Root-Element
.
Table 6-1 describes COBOL clauses. The numeric types covered in Table 6-1 are stored as one character per digit. Support for clauses is defined as follows:
Y
indicates the clause is supported.
N
indicates the clause is not supported.
I
indicates the clause is ignored.
Table 6-1 COBOL Clauses (Numeric Types Stored as One Character Per Digit)
COBOL Clause | Design Time Support | Runtime Support | Supported Synonyms | Comments |
---|---|---|---|---|
|
|
|
|
Alphanumeric – An allowable character from the character set of the computer. Each X corresponds to |
|
|
|
|
Alphabetic – Any letter of the alphabet or space. Each A corresponds to |
|
|
|
|
Any character position that contains a numeral. Each |
|
|
|
|
Fixed length array |
|
|
|
|
For |
|
|
|
|
Allows the same computer memory area to be described by different data items. |
|
|
|
|
Size = |
|
|
|
|
|
|
|
|
|
Ignored |
|
N |
N |
|
This is rarely seen in COBOL Copybooks |
|
N |
N |
|
|
|
|
I |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The numeric types covered in Table 6-1 are stored as one character per digit. Table 6-2 covers numeric types that are stored in a more efficient manner.
Table 6-2 COBOL Clauses (Numeric Types Stored More Efficiently)
COBOL Clause | Design Time Support | Runtime Support | Supported Synonyms | Comments |
---|---|---|---|---|
|
Y |
Y |
|
Both these keywords are optional. |
|
Y |
Y |
|
Length varies with
|
|
Y |
Y |
|
Single precision, floating point number that is |
|
|
|
|
Double precision, floating point number that is |
|
|
|
|
Two digits are stored in each byte. An additional half byte at the end is allocated for the sign, even if the value is unsigned. |
|
|
|
|
Treated the same as a |
|
|
|
|
Capacity of the native binary representation. |
|
|
|
|
Sign nibble in the right-most zone by default. |
|
|
|
|
Same as |
|
|
|
|
|
|
|
|
|
Length is the same as |
|
|
|
|
Length = |
The following clauses can be added to impact the sign position.
SIGN IS LEADING
Used with signed zoned numerics.
SIGN IS TRAILING
Used with signed zoned numerics.
SIGN IS LEADING SEPARATE
The character S
is counted in the size
SIGN IS TRAILING SEPARATE
The character S
is counted in the size
Note: These assume that the numerics are stored using IBM COBOL format. If these are generated for other platforms with different data storage formats, a custom data handler for that type must be written. |
Table 6-3 describes picture editing types.
Table 6-3 Edited Pictures
Edited Pictures | Supported Editing Types | Unsupported Editing Types |
---|---|---|
Edited alphanumeric |
Simple Insertion: B(blank) |
|
Edited float numeric |
Special insertion: |
|
Edited numeric |
|
|
Edited pictures are more for presentation purposes and are rarely seen in data files. It is assumed that the editing symbols are also present in the data. For example, if you have:
05 AMOUNT PIC 999.99
Then this field is six bytes wide and has a decimal point in the data.
Simple, special, and fixed insertion are handled by this method. Floating insertion, zero suppression, and replacement insertion are not supported.
For delimited and fixed-length files, you are guided through windows that prompt you for the following information to create definitions in native schema format:
The data file to sample (from which to create a native schema) and its encoding
The number of rows to skip and the number of rows to sample in the file
If the file contains multiple records, are they the same type or different types
The target namespace, container element name, and record name
The record delimiter (for example, end-of-line) and field delimiter (for example, comma or pound sign) or field length
The field properties (such as name, datatype, delimiter, and length)
DTD and COBOL Copybook files already include definitions in their native formats. For these formats, the Native Format Builder Wizard prompts you for the following information to create native schema versions of these definitions.
The filename of the DTD or COBOL Copybook definition, namespace, and root element
The character set, byte order, and records delimiter (for COBOL Copybook only)
As you move through the wizard windows, the native schema file being created displays at the bottom. This enables you to watch the native schema file being built. The final window displays the generated native schema for the native format shown in Figure 6-3. You can edit this format before clicking Next.
Figure 6-3 Native Schema Generated From Native Format
When you click Finish, you are returned to the Messages window of the Adapter Configuration Wizard shown in Figure 6-1. The Schema File URL and Schema Element fields are filled in with details about your newly created native schema file. You can now use the Adapter Configuration Wizard to create a WSDL file for the adapter to communicate with your BPEL process.
This section provides use cases and explains various constructs of native schema to translate the native format data to XML.
This section contains the following topics:
Note: Not all native schemas can be generated from the Native Format Builder Wizard. This wizard can handle only basic scenarios. This section describes the capabilities of the native schema using various examples and use cases. |
This section contains the following topics:
A comma-separated value (CSV) file is a common non-XML file structure. A CSV file may or may not have the first few line as headers, in which case, you may want to ignore them.
The following native data format is provided:
Name,Street,City,State,Country Oracle India Private Limited, Lexington Towers, Bangalore, Karnataka, India Intel India Private Limited, Ring Road, Bangalore, Karnataka, India
The corresponding native schema definition can be defined as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
xmlns:tns="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:encoding="US-ASCII"
nxsd:headerLines="1"
nxsd:stream="chars"
nxsd:version="NXSD"> <xsd:element name="AddressBook">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Address" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="," >
</xsd:element>
<xsd:element name="Street" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="," >
</xsd:element>
<xsd:element name="City" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="," >
</xsd:element>
<xsd:element name="State" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="," > </xsd:element>
<xsd:element name="Country" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" >
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
The nxsd:headerLines="1"
in this schema, at the xsd:schema
construct, means to skip one line in the native data before actually translating the rest of the data. This is because the first line is a header line. If set, nxsd:stream="chars"
means the data is to be read as characters. If set, nxsd:stream="bytes"
means to read the native data as bytes. For each of the element declarations, Name
, Street
, City
, State
, Country
, which have a corresponding scalar data, the nxsd:style="terminated"
defines that the corresponding data is stored in terminated style. The actual terminator is then defined by the nxsd:terminatedBy=","
attribute specified at that construct. See "Defining Terminated Data" for details on the terminated style.
The native data using the corresponding native schema format is translated to the following XML:
<AddressBook xmlns="http://www.oracle.com/ias/processconnect"> <Address> <Name>Oracle India Private Limited</Name> <Street>Lexington Towers</Street> <City>Bangalore</City> <State>Karnataka</State> <Country>India</Country> </Address> <Address> <Name>Intel India Private Limited</Name> <Street>Ring Road</Street> <City>Bangalore</City> <State>Karnataka</State> <Country>India</Country> </Address> </AddressBook>
The use case defined in previous example is just one specific case of the *SV class, where the wildcard can be substituted by any character or string (for example, for the native data containing a +
separated value).
The following native data format is provided:
a+b+c+d+e f+g+h+i+j
The corresponding native schema definition is similar to the one in the previous use case except that in lieu of nxsd:terminatedBy=","
you now define the terminated by format as nxsd:terminatedBy="+"
. See "Defining Terminated Data" for details on the terminated style.
In this example, the native data used is the same as in the CSV case. The only difference is that here the data is fixed length, and not CSV.
The following native data format is provided:
Name Street City State Country Oracle India Private Limited Lexington Towers Bangalore Karnataka India Intel India Private Limited Outer Ring Road Bangalore Karnataka India
The corresponding native schema definition is similar to the definition of the CSV, but the style
now changes from nxsd:style="terminated"
to nxsd:style="fixedLength"
along with the relevant attributes for the fixed length style. For the style fixed length, the one mandatory attribute is the length: nxsd:length
. The value of nxsd:length
is the actual length of the data to be read. The complete definition for fixed length style for the native data to be translated can be defined as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
xmlns:tns="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:encoding="US-ASCII"
nxsd:headerLines="1"
nxsd:stream="chars"
nxsd:version="NXSD">
<xsd:element name="AddressBook">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Address" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="31">
</xsd:element>
<xsd:element name="Street" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="19">
</xsd:element>
<xsd:element name="City" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10">
</xsd:element>
<xsd:element name="State" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10">
</xsd:element>
<xsd:element name="Country" type="xsd:string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
See "Defining Fixed Length Data" for details on the fixed length style.
An invoice is a more complex structure than the structure in the previous CSV, *SV, and fixed length use cases. An invoice usually contains buyer information, seller information, and line items.
The following native data format for an invoice is provided:
6335722^Company One^First Street 999 San Jose 95129USCA650-801-6250 ^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
The first line in the native data is purchaser details, followed by seller details, followed by line items, and finally the total for the line items. Both purchaser and seller have the same structure:
The first 7 characters are the UID
This is followed by the buyer/seller name surrounded by Ò^
Ó
This is followed by the address until the end of the line
This address contains a fixed length street, city, and so on. The last line item ends with the sharp symbol Ò#
Ó, followed by the line-item total.
The native schema definition corresponding to the preceding native data can be defined as follows:
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/ias/pcbpel/fatransschema/demo"
xmlns:tns="http://xmlns.oracle.com/ias/pcbpel/fatransschema/demo"
xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
nxsd:version="NXSD" nxsd:stream="chars">
<element name="invoice" type="tns:invoiceType" />
<complexType name="invoiceType">
<sequence>
<element name="purchaser" type="tns:partnerType" />
<element name="seller" type="tns:partnerType" />
<element name="line-item" type="tns:line-itemType"
maxOccurs="unbounded" nxsd:style="array"
nxsd:cellSeparatedBy="${eol}" nxsd:arrayTerminatedBy="#"/>
<element name="total" type="double" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"/>
</sequence>
</complexType>
<complexType name="partnerType">
<sequence>
<element name="uid" type="string" nxsd:style="fixedLength"
nxsd:length="7" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="name" type="string" nxsd:style="surrounded"
nxsd:surroundedBy="^"/>
<element name="address" type="tns:addressType" />
</sequence>
</complexType>
<complexType name="addressType">
<sequence>
<element name="street1" type="string" nxsd:style="fixedLength"
nxsd:length="15" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="street2" type="string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="city" type="string" nxsd:style="fixedLength"
nxsd:length="15" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="postal-code" type="string" nxsd:style="fixedLength"
nxsd:length="5" nxsd:padStyle="none"/>
<element name="country" type="string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="none"/>
<element name="state" type="string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="none"/>
<element name="phone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"/>
</sequence>
</complexType>
<complexType name="line-itemType">
<sequence>
<element name="uid" type="string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="none"/>
<element name="description" type="string" nxsd:style="surrounded"
nxsd:surroundedBy="|"/>
<element name="price" type="double" nxsd:style="terminated"
nxsd:terminatedBy=","/>
<element name="quantity" type="integer" nxsd:style="terminated"
nxsd:terminatedBy=","/>
<element name="line-total" type="double" nxsd:style="surrounded"
nxsd:surroundedBy="+"/>
</sequence>
</complexType>
</schema>
The translated XML looks as follows:
<invoice xmlns="http://xmlns.oracle.com/pcbpel/demoSchema/invoice-nxsd"> <purchaser> <uid>6335722</uid> <name>Company One</name> <address> <street1>First Street</street1> <street2>999</street2> <city>San Jose</city> <postal-code>95129</postal-code> <country>US</country> <state>CA</state> <phone>650-801-6250</phone> </address> </purchaser> <seller> <uid/> <name>Oracle</name> <address> <street1>Bridge Parkway</street1> <street2>1600</street2> <city>Redwood Shores</city> <postal-code>94065</postal-code> <country>US</country> <state>CA</state> <phone>650-506-7000</phone> </address> </seller> <line-item> <uid>001</uid> <description>BPEL Process Manager Enterprise Edition</description> <price>20000</price> <quantity>2</quantity> <line-total>40000</line-total> </line-item> <line-item> <uid>002</uid> <description>BPEL Process Manager Standard Edition</description> <price>10000</price> <quantity>5</quantity> <line-total>50000</line-total> </line-item> <line-item> <uid>003</uid> <description>BPEL Process Manager Developer Edition</description> <price>1000</price> <quantity>20</quantity> <line-total>20000</line-total> </line-item> <total>110000</total> </invoice>
You can add a namespace to an inbound XML document and remove the namespace in the outbound XML document by using the Native Format Translator. You need to create a wrapper schema with targetNamespace
specified. The targetNamespace
should include the actual schema name. In addition, the wrapper schema should also have the nxsd:version
attribute set to DTD. For example:
--wrapper.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
targetNamespace="myNamespace"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
nxsd:version="DTD">
</schema>
Note: Ensure thatelementFormDefault="qualified" is specified in the actual schema.
|
Using this wrapper.xsd
in place of actual xsd would add myNamespace
namespace to the inbound xml and would remove myNamespace
namespace from the outbound xml.
A demonstration is provided that shows how the file adapter and FTP adapter process a file in COBOL Copybook format (through use of the Native Format Builder Wizard) to create a native schema file for translation. For a demonstration that uses the Native Format Builder Wizard to convert a COBOL Copybook file to a native schema file, go to
Oracle_Home\integration\orabpel\samples\tutorials\121.FileAdapter\CobolCopyBook
The following COBOL Copybook examples are also provided:
A COBOL Copybook can have multiple root levels. If all root levels are at 01
level, each such group implicitly redefines the other.
01 PAYROLL-E-RECORD. 05 PAYROLL-E-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-E-TRANS-CODE PIC X(02). 05 PAYROLL-E-NAME PIC X(08). 05 FILLER PIC X(25). 01 PAYROLL-F-RECORD. 05 PAYROLL-F-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-F-TRANS-CODE PIC X(02). 05 PAYROLL-F-IDENTIFIER-VALUE PIC X(03). 05 PAYROLL-F-NAME PIC X(30). 01 PAYROLL-H-RECORD. 05 PAYROLL-H-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-H-TRANS-CODE PIC X(02). 05 PAYROLL-H-HED-NUMBER PIC 9(03). 05 FILLER PIC X(30).
The generated schema:
<?xml version="1.0" encoding="UTF-8" ?>
<!--Native format was generated from COBOL copybook : D:\work\jDevProjects\CCB\Copybooks\payroll.cpy-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions"
targetNamespace="http://TargetNamespace.com/ccb/implicitRedefines"
xmlns:tns="http://TargetNamespace.com/ccb/implicitRedefines"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian"
nxsd:stream="chars">
<xsd:element name="Payroll-Records">
<xsd:complexType>
<!--Please add values for nxsd:lookAhead attributes for the elements in the
choice model group.-->
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<!--COBOL declaration : 01 PAYROLL-E-RECORD -->
<xsd:element name="PAYROLL-E-RECORD" nxsd:lookAhead="" nxsd:lookFor="">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 05 PAYROLL-E-EMPLOYEE-NUMBER PIC X(10)-->
<xsd:element name="PAYROLL-E-EMPLOYEE-NUMBER" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="10"/>
<!--COBOL declaration : 05 PAYROLL-E-TRANS-CODE PIC X(02)-->
<xsd:element name="PAYROLL-E-TRANS-CODE" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="2"/>
<!--COBOL declaration : 05 PAYROLL-E-NAME PIC X(08)-->
<xsd:element name="PAYROLL-E-NAME" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="8"/>
<!--COBOL declaration : 05 FILLER PIC X(25)-->
<xsd:element name="FILLER" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="25"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--COBOL declaration : 01 PAYROLL-F-RECORD -->
<xsd:element name="PAYROLL-F-RECORD" nxsd:lookAhead="" nxsd:lookFor="">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 05 PAYROLL-F-EMPLOYEE-NUMBER PIC X(10)-->
<xsd:element name="PAYROLL-F-EMPLOYEE-NUMBER" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="10"/>
<!--COBOL declaration : 05 PAYROLL-F-TRANS-CODE PIC X(02)-->
<xsd:element name="PAYROLL-F-TRANS-CODE" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="2"/>
<!--COBOL declaration : 05 PAYROLL-F-IDENTIFIER-VALUE PIC X(03)-->
<xsd:element name="PAYROLL-F-IDENTIFIER-VALUE" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="3"/>
<!--COBOL declaration : 05 PAYROLL-F-NAME PIC X(30)-->
<xsd:element name="PAYROLL-F-NAME" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="30"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--COBOL declaration : 01 PAYROLL-H-RECORD -->
<xsd:element name="PAYROLL-H-RECORD" nxsd:lookAhead="" nxsd:lookFor="">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 05 PAYROLL-H-EMPLOYEE-NUMBER PIC X(10)-->
<xsd:element name="PAYROLL-H-EMPLOYEE-NUMBER" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="10"/>
<!--COBOL declaration : 05 PAYROLL-H-TRANS-CODE PIC X(02)-->
<xsd:element name="PAYROLL-H-TRANS-CODE" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="2"/>
<!--COBOL declaration : 05 PAYROLL-H-HED-NUMBER PIC 9(03)-->
<xsd:element name="PAYROLL-H-HED-NUMBER" type="xsd:long"
nxsd:style="fixedLength" nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="3"/>
<!--COBOL declaration : 05 FILLER PIC X(30)-->
<xsd:element name="FILLER" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="30"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
The top-level payroll records are enclosed in a choice model group. Each payroll record also has two attributes: nxsd:lookAhead
and nxsd:lookFor
that help identify the type of record during runtime processing of the data file. Therefore, you must add values for these attributes. For example, assume PAYROLL-F-RECORD
occurs when the PAYROLL-F-TRANS-CODE
field has a value of FR
. The record element then looks as follows:
<xsd:element name="PAYROLL-F-RECORD" nxsd:lookAhead="10" nxsd:lookFor="FR">
The value 10
indicates the position of the lookahead field.
The following COBOL Copybook has multiple root elements at the 05
level:
05 ORG-NUM PIC 99.05 EMP-RECORD. 10 EMP-SSN PIC 9(4)V(6). 10 EMP-WZT PIC 9(6).
The generated schema:
<?xml version="1.0" encoding="UTF-8" ?>
<!--Native format was generated from COBOL copybook :
D:\work\jDevProjects\CCB\Copybooks\multipleRoot.cpy-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions"
targetNamespace="http://TargetNamespace.com/ccb/multipleRoots"
xmlns:tns="http://TargetNamespace.com/ccb/multipleRoots"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:encoding="ASCII"
nxsd:byteOrder="littleEndian" nxsd:stream="chars">
<xsd:element name="emp-info">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<!--COBOL declaration : 05 ORG-NUM PIC 99-->
<xsd:element name="ORG-NUM" type="xsd:long" nxsd:style="fixedLength"
nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="2"/>
<!--COBOL declaration : 05 EMP-RECORD-->
<xsd:element name="EMP-RECORD">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 10 EMP-SSN PIC 9(4)V(6)-->
<xsd:element name="EMP-SSN" type="xsd:decimal"
nxsd:style="virtualDecimal" extn:assumeDecimal="4"
extn:picSize="9"/>
<!--COBOL declaration : 10 EMP-WZT PIC 9(6)-->
<xsd:element name="EMP-WZT" type="xsd:long"
nxsd:style="fixedLength" nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="6"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
In this (non-01
level) case, an unbounded sequence of the root level items is generated.
The following COBOL Copybook has a single root level item PO-RECORD
. In a single root level case, the level number does not matter because the converter's behavior is the same. This COBOL Copybook also shows an example of a field declared as a virtual decimal (PO-ITEM-PRICE
).
05 PO-RECORD. 10 PO-BUYER. 15 PO-UID PIC 9(7). 15 PO-NAME PIC X(15). 15 PO-ADDRESS. 20 PO-STREET PIC X(15). 20 PO-CITY PIC X(10). 20 PO-ZIP PIC 9(5). 20 PO-STATE PIC X(2). 10 PO-ITEM. 15 POITEM OCCURS 3 TIMES. 20 PO-LINE-ITEM. 25 PO-ITEM-ID PIC 9(3). 25 PO-ITEM-NAME PIC X(40). 25 PO-ITEM-QUANTITY PIC 9(2). 25 PO-ITEM-PRICE PIC 9(5)V9(2). 10 PO-TOTAL PIC 9(7)V9(2).
The generated schema:
<?xml version="1.0" encoding="UTF-8" ?>
<!--Native format was generated from COBOL copybook : D:\work\
jDevProjects\CCB\Copybooks\po-ccb.cpy-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions"
targetNamespace="http://TargetNamespace.com/ccb/singleRoot"
xmlns:tns="http://TargetNamespace.com/ccb/singleRoot"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian"
nxsd:stream="chars">
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 05 PO-RECORD -->
<xsd:element name="PO-RECORD" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 10 PO-BUYER-->
<xsd:element name="PO-BUYER">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 15 PO-UID PIC 9(7)-->
<xsd:element name="PO-UID" type="xsd:long"
nxsd:style="fixedLength" nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="7"/>
<!--COBOL declaration : 15 PO-NAME PIC X(15)-->
<xsd:element name="PO-NAME" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="15"/>
<!--COBOL declaration : 15 PO-ADDRESS-->
<xsd:element name="PO-ADDRESS">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 20 PO-STREET PIC X(15)-->
<xsd:element name="PO-STREET" type="xsd:string"
nxsd:style="fixedLength"
nxsd:padStyle="tail" nxsd:paddedBy=" "
nxsd:length="15"/>
<!--COBOL declaration : 20 PO-CITY PIC X(10)-->
<xsd:element name="PO-CITY" type="xsd:string"
nxsd:style="fixedLength"
nxsd:padStyle="tail" nxsd:paddedBy=" "
nxsd:length="10"/>
<!--COBOL declaration : 20 PO-ZIP PIC 9(5)-->
<xsd:element name="PO-ZIP" type="xsd:long"
nxsd:style="fixedLength"
nxsd:padStyle="head" nxsd:paddedBy="0"
nxsd:length="5"/>
<!--COBOL declaration : 20 PO-STATE PIC X(2)-->
<xsd:element name="PO-STATE" type="xsd:string"
nxsd:style="fixedLength"
nxsd:padStyle="tail" nxsd:paddedBy=" "
nxsd:length="2"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--COBOL declaration : 10 PO-ITEM-->
<xsd:element name="PO-ITEM">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 15 POITEM OCCURS 3 TIMES-->
<xsd:element name="POITEM" minOccurs="3" maxOccurs="3">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 20 PO-LINE-ITEM-->
<xsd:element name="PO-LINE-ITEM">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 25 PO-ITEM-ID PIC 9(3)-->
<xsd:element name="PO-ITEM-ID" type="xsd:long"
nxsd:style="fixedLength"
nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="3"/>
<!--COBOL declaration : 25 PO-ITEM-NAME PIC X(40)--> <xsd:element name="PO-ITEM-NAME"
type="xsd:string"
nxsd:style="fixedLength"
nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="40"/>
<!--COBOL declaration : 25 PO-ITEM-QUANTITY PIC 9(2)--> <xsd:element name="PO-ITEM-QUANTITY"
type="xsd:long"
nxsd:style="fixedLength"
nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="2"/>
<!--COBOL declaration : 25 PO-ITEM-PRICE PIC 9(5)V9(2)-->
<xsd:element name="PO-ITEM-PRICE"
type="xsd:decimal"
nxsd:style="virtualDecimal"
extn:assumeDecimal="5"
extn:picSize="7"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!--COBOL declaration : 10 PO-TOTAL PIC 9(7)V9(2)-->
<xsd:element name="PO-TOTAL" type="xsd:decimal"
nxsd:style="virtualDecimal" extn:assumeDecimal="7"
extn:picSize=" "/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
05 EMP-RECORD . 10 EMP-NAME PIC X(30). 10 EMP-DIV-NUM PIC 9(5). 10 DIV-ENTRY OCCURS 1 TO 50 TIMES DEPENDING ON EMP-DIV-NUM. 20 DIV-CODE PIC X(30).
<?xml version="1.0" encoding="UTF-8" ?>
<!--Native format was generated from COBOL copybook : D:\work\
jDevProjects\CCB\Copybooks\odo.cpy-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions"
targetNamespace="http://TargetNamespace.com/ccb/varLengthArray"
xmlns:tns="http://TargetNamespace.com/ccb/varLengthArray"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian"
nxsd:stream="chars">
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration :05 EMP-RECORD -->
<xsd:element name="EMP-RECORD" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<nxsd:variables>
<nxsd:variable name="DIV-ENTRY_var0"/>
</nxsd:variables>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 10 EMP-NAME PIC X(30)-->
<xsd:element name="EMP-NAME" type="xsd:string"
nxsd:style="fixedLength" nxsd:padStyle="tail"
nxsd:paddedBy=" " nxsd:length="30"/>
<!--COBOL declaration : 10 EMP-DIV-NUM PIC 9(5)-->
<xsd:element name="EMP-DIV-NUM" type="xsd:long"
nxsd:style="fixedLength" nxsd:padStyle="head"
nxsd:paddedBy="0" nxsd:length="5">
<xsd:annotation>
<xsd:appinfo>
<nxsd:variables> <nxsd:assign name="DIV-ENTRY_var0" value="${0}"/> </nxsd:variables> </xsd:appinfo> </xsd:annotation> </xsd:element> <!--COBOL declaration : 10 DIV-ENTRY OCCURS 1 TO 50 TIMES DEPENDING ON
EMP-DIV-NUM--> <xsd:element name="DIV-ENTRY" nxsd:style="array" nxsd:arrayLength="${DIV-ENTRY_var0}" minOccurs="1" maxOccurs="50"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 20 DIV-CODE PIC X(30)--> <xsd:element name="DIV-CODE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="30"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
01 NUMERIC-FORMATS. 05 Salary PIC 9(5) COMP-3. 05 Rating PICTURE S9(5). 05 Age PIC 9(3) USAGE COMP. 05 Revenue PIC 9(3)V9(2). 05 Growth PIC S9(3) SIGN IS LEADING. 05 Computation COMP-1.
<?xml version="1.0" encoding="UTF-8" ?>
<!--Native format was generated from COBOL copybook :
D:\work\jDevProjects\CCB\Copybooks\numeric.cpy-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions"
targetNamespace="http://TargetNamespace.com/ccb/numeric"
xmlns:tns="http://TargetNamespace.com/ccb/numeric"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian"
nxsd:stream="bytes">
<xsd:element name="Numerics">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration :01 NUMERIC-FORMATS-->
<xsd:element name="NUMERIC-FORMATS" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<!--COBOL declaration : 05 Salary PIC 9(5) COMP-3-->
<xsd:element name="Salary" type="xsd:long" nxsd:style="comp3"
extn:sign="unticked" extn:picSize="5"/>
<!--COBOL declaration : 05 Rating PICTURE S9(5)-->
<xsd:element name="Rating" type="xsd:string"
nxsd:style="signZoned" extn:sign="ticked"
extn:picSize="5" extn:signPosn="tailUpperNibble"/>
<!--COBOL declaration : 05 Age PIC 9(3) USAGE COMP--> <xsd:element name="Age" type="xsd:long" nxsd:style="comp"
extn:picSize="3" extn:sign="unticked"/>
<!--COBOL declaration : 05 Revenue PIC 9(3)V9(2)-->
<xsd:element name="Revenue" type="xsd:decimal"
nxsd:style="virtualDecimal" extn:assumeDecimal="3"
extn:picSize="5"/>
<!--COBOL declaration : 05 Growth PIC S9(3) SIGN IS LEADING-->
<xsd:element name="Growth" type="xsd:string"
nxsd:style="signZoned" extn:sign="ticked"
extn:picSize="3" extn:signPosn="headUpperNibble"/>
<!--COBOL declaration : 05 Computation COMP-1-->
<xsd:element name="Computation" type="xsd:float"
nxsd:style="comp1" extn:sign="ticked"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
In this case, all the numeric types follow formats specified according to IBM COBOL formats. If the data file originates from a different system using different layouts, the generated schema requires modification.
This section contains the following topics:
Fixed length data in the native format can be defined in the native schema using the fixed length style. There are three types of fixed length:
With padding
Without padding
With the actual length also being read from the native data
The actual data may be less than the length specified. In this case, you can specify the paddedBy
and padStyle
as head or tail. When the data is read, the pads are trimmed accordingly.
GBP*UK000012550.00
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="fixedlength">
<complexType>
<sequence>
<element name="currency_code" nxsd:style="fixedLength" nxsd:length="4"
nxsd:padStyle="tail" nxsd:paddedBy="*">
<simpleType>
<restriction base="string">
<maxLength value="4" />
</restriction>
</simpleType>
</element>
<element name="country_code" nxsd:style="fixedLength" nxsd:length="2"
nxsd:padStyle="none">
<simpleType>
<restriction base="string">
<length value="2" />
</restriction>
</simpleType>
</element>
<element name="to_usd_rate" nxsd:style="fixedLength" nxsd:length="12"
nxsd:padStyle="head" nxsd:paddedBy="0">
<simpleType>
<restriction base="string">
<maxLength value="12" />
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
</element>
</schema>
<fixedlength xmlns="http://www.oracle.com/ias/processconnect"> <currency_code>GBP</currency_code> <country_code>UK</country_code> <to_usd_rate>12550.00</to_usd_rate> </fixedlength>
To define a fixed length data in native schema, you can use the fixed length style. In case the actual data is less than the length specified, the white spaces are not trimmed.
GBP*UK000012550.00
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="fixedlength">
<complexType>
<sequence>
<element name="currency_code" nxsd:style="fixedLength" nxsd:length="4">
<simpleType>
<restriction base="string">
<maxLength value="4" />
</restriction>
</simpleType>
</element>
<element name="country_code" nxsd:style="fixedLength" nxsd:length="2">
<simpleType>
<restriction base="string">
<length value="2" />
</restriction>
</simpleType>
</element>
<element name="to_usd_rate" nxsd:style="fixedLength" nxsd:length="12">
<simpleType>
<restriction base="string">
<maxLength value="12" />
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
</element>
</schema>
<fixedlength xmlns="http://www.oracle.com/ias/processconnect"> <currency_code>GBP*</currency_code> <country_code>UK</country_code> <to_usd_rate>000012550.00</to_usd_rate> </fixedlength>
When the length of the data is also stored in the native stream, this style is used to first read the length, and subsequently read the data according to the length read.
03joe13DUZac.1HKVmIY
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="fixedlength">
<complexType>
<sequence>
<element name="user" type="string" nxsd:style="fixedLength"
nxsd:identifierLength="2" />
<element name="encr_user" type="string" nxsd:style="fixedLength"
nxsd:identifierLength="2" />
</sequence>
</complexType>
</element>
</schema>
This format is used when the terminating mark itself is supposed to be treated as part of the actual data and not as a delimiter. When it is not clear whether the mark is part of actual data or not, you can use the nxsd:quotedBy
to be safe. Specifying nxsd:quotedBy
means the corresponding native data may or may not be quoted. If it is quoted, the actual data is read from the begin quote to the end quote as specified in nxsd:quotedBy
. Otherwise, it is read until the terminatedBy
is found.
The following examples are provided:
Optionally quoted
Not quoted
Fred,"2 Old Street, Old Town,Manchester",20-08-1954,0161-499-1718
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="terminated">
<complexType>
<sequence>
<element name="PersonName" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="Telephone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
</element>
<terminated xmlns="http://www.oracle.com/ias/processconnect"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </terminated>
This is used when the data is terminated by a particular string or character.
1020,16,18,,1580.00
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="terminated">
<complexType>
<sequence>
<element name="product" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="ordered" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="inventory" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="backlog" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," />
<element name="listprice" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
</element>
</schema>
This is used when the native data is surrounded by a mark.
The following examples are provided:
Left and right surrounding marks are different
Left and right surrounding marks are the same
(Ernest Hemingway Museum){Whitehead St.}
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://www.oracle.com/ias/processconnect"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="limstring">
<complexType>
<sequence>
<element name="Landmark" type="string" nxsd:style="surrounded" nxsd:leftSurroundedBy="(" nxsd:rightSurroundedBy=")" />
<element name="Street" type="string" nxsd:style="surrounded" nxsd:leftSurroundedBy="{" nxsd:rightSurroundedBy="}" />
</sequence>
</complexType>
</element>
</schema>
<limstring xmlns="http://www.oracle.com/ias/processconnect"> <Landmark>Ernest Hemingway Museum</Landmark> <Street>Whitehead St.</Street> </limstring>
.FL..Florida Keys.+Key West+
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://www.oracle.com/ias/processconnect"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="limstring">
<complexType>
<sequence>
<element name="State" type="string" nxsd:style="surrounded" nxsd:surroundedBy="."/>
<element name="Region" type="string" nxsd:style="surrounded" nxsd:surroundedBy="." />
<element name="City" type="string" nxsd:style="surrounded" nxsd:surroundedBy="+" />
</sequence>
</complexType>
</element>
</schema>
This format is for lists with the following characteristics:
All items separated by the same mark, except the last item (bounded)
All items separated by the same mark, including the last item (unbounded)
125,200,255
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="list" type="tns:Colors" />
<complexType name="Colors" nxsd:style="list" nxsd:itemSeparatedBy=","
nxsd:listTerminatedBy="${eol}">
<sequence>
<element name="Red" type="string" />
<element name="Green" type="string" />
<element name="Blue" type="string" />
</sequence>
</complexType>
</schema>
<list xmlns="http://www.oracle.com/ias/processconnect"> <Red>125</Red> <Green>200</Green> <Blue>255</Blue> </list>
configure;startup;runtest;shutdown;
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="list" type="tns:CommandSet" />
<complexType name="CommandSet" nxsd:style="list" nxsd:itemSeparatedBy=";">
<sequence>
<element name="Cmd1" type="string" />
<element name="Cmd2" type="string" />
<element name="Cmd3" type="string" />
<element name="Cmd4" type="string" />
</sequence>
</complexType>
</schema>
This is for an array of complex types where the individual cells are separated by a separating character and the last cell of the array is terminated by a terminating character.
The following examples are provided:
All cells separated by the same mark, except the last cell (bounded)
All cells separated by the same mark, including the last cell (unbounded)
Cells not separated by any mark, except the last cell (bounded)
The number of cells also being read from the native data
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717". Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718". "Smith, Bob",,,0161-499-1719.#
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD"><element name="array">
<complexType>
<sequence>
<element name="Member" maxOccurs="unbounded"
nxsd:style="array" nxsd:cellSeparatedBy="${eol}"
nxsd:arrayTerminatedBy="#">
<complexType>
<sequence>
<element name="Name" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Telephone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="." nxsd:quotedBy='"'/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
All Cells Separated by the Same Mark, Including the Last Cell (Unbounded)
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717". Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718". "Smith, Bob",,,0161-499-1719.
All Cells Separated by the Same Mark, Including the Last Cell (Unbounded)
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="array">
<complexType>
<sequence>
<element name="Member" maxOccurs="unbounded"
nxsd:style="array" nxsd:cellSeparatedBy="\r\n">
<complexType>
<sequence>
<element name="Name" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Telephone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="." nxsd:quotedBy='"'/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717" Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718" "Smith, Bob",,,0161-499-1719 #
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="array">
<complexType>
<sequence>
<element name="Member" maxOccurs="unbounded"
nxsd:style="array" nxsd:arrayTerminatedBy="#">
<complexType>
<sequence>
<element name="Name" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Telephone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="\r\n" nxsd:quotedBy='"'/> </sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
3"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717" Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718" "Smith, Bob",,,0161-499-1719
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="arrayidentifierlength">
<complexType>
<sequence>
<element name="Member" maxOccurs="unbounded" nxsd:style="array"
nxsd:arrayIdentifierLength="1">
<complexType>
<sequence>
<element name="Name" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<element name="Telephone" type="string" nxsd:style="terminated"
nxsd:terminatedBy="\r\n" nxsd:quotedBy='"'/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
<arrayidentifierlength xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </arrayidentifierlength>
The following examples are provided:
Processing one element within a choice model group based on the condition
Processing elements based within a sequence model group on the condition
PO28/06/2004^|ABCD Inc.|Oracle OracleApps025070,000.00 Database 021230,000.00 ProcessCon021040,000.00 PO01/07/2004^|EFGH Inc.|Oracle Websphere 025070,000.00 DB2 021230,000.00 Eclipse 021040,000.00 SO29/06/2004|Oracle Apps|5 Navneet Singh PO28/06/2004^|IJKL Inc.|Oracle Weblogic 025070,000.00 Tuxedo 021230,000.00 JRockit 021040,000.00 IN30/06/2004;Navneet Singh;Oracle;Oracle Apps;5;70,000.00;350,000.00
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://www.oracle.com/ias/processconnect"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="container">
<complexType>
<choice maxOccurs="unbounded" nxsd:choiceCondition="fixedLength"
nxsd:length="2">
<element ref="tns:PurchaseOrder" nxsd:conditionValue="PO" />
<element ref="tns:SalesOrder" nxsd:conditionValue="SO" />
<element ref="tns:Invoice" nxsd:conditionValue="IN" />
</choice>
</complexType>
</element>
<!-- PO -->
<element name="PurchaseOrder" type="tns:POType"/>
<complexType name="POType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy="^" />
<element name="Buyer" type="string" nxsd:style="surrounded"
nxsd:surroundedBy="|" />
<element name="Supplier" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
<element name="Items">
<complexType>
<sequence>
<element name="Line-Item" minOccurs="3" maxOccurs="3">
<complexType>
<group ref="tns:LineItems" />
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<group name="LineItems">
<sequence>
<element name="Id" type="string" nxsd:style="fixedLength" nxsd:length="10"
nxsd:padStyle="none"/>
<element name="Quantity" type="string" nxsd:style="fixedLength"
nxsd:identifierLength="2" />
<element name="Price" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</group>
<!-- SO -->
<element name="SalesOrder" type="tns:SOType" />
<complexType name="SOType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy="|" />
<element name="Item" type="string" nxsd:style="terminated"
nxsd:terminatedBy="|" />
<element name="Quantity" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
<element name="Buyer" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
<!-- INV -->
<element name="Invoice" type="tns:INVType" />
<complexType name="INVType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Purchaser" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Seller" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Item" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Price" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Quantity" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="TotalPrice" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
</schema>
<container xmlns="http://www.oracle.com/ias/processconnect"> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>ABCD Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>OracleApps</Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Database </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>ProcessCon</Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <PurchaseOrder> <Date>01/07/2004</Date> <Buyer>EFGH Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Websphere </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>DB2 </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>Eclipse </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <SalesOrder> <Date>29/06/2004</Date> <Item>Oracle Apps</Item> <Quantity>5</Quantity> <Buyer>Navneet Singh</Buyer> </SalesOrder> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>IJKL Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Weblogic </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Tuxedo </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>JRockit </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <Invoice> <Date>30/06/2004</Date> <Purchaser>Navneet Singh</Purchaser> <Seller>Oracle</Seller> <Item>Oracle Apps</Item> <Price>5</Price> <Quantity>70,000.00</Quantity> <TotalPrice>350,000.00</TotalPrice> </Invoice> </container>
PO28/06/2004^|ABCD Inc.|Oracle OracleApps025070,000.00 Database 021230,000.00 ProcessCon021040,000.00 PO01/07/2004^|EFGH Inc.|Oracle Websphere 025070,000.00 DB2 021230,000.00 Eclipse 021040,000.00 SO29/06/2004|Oracle Apps|5 Navneet Singh PO28/06/2004^|IJKL Inc.|Oracle Weblogic 025070,000.00 Tuxedo 021230,000.00 JRockit 021040,000.00 IN30/06/2004;Navneet Singh;Oracle;Oracle Apps;5;70,000.00;350,000.00
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://www.oracle.com/ias/processconnect"
targetNamespace="http://www.oracle.com/ias/processconnect"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="container">
<complexType>
<sequence maxOccurs="unbounded">
<element ref="tns:PurchaseOrder" minOccurs="0" nxsd:startsWith="PO" />
<element ref="tns:SalesOrder" minOccurs="0" nxsd:startsWith="SO" />
<element ref="tns:Invoice" minOccurs="0" nxsd:startsWith="IN" />
</sequence>
</complexType>
</element>
<!-- PO -->
<element name="PurchaseOrder" type="tns:POType"/>
<complexType name="POType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy="^" /> <element name="Buyer" type="string" nxsd:style="surrounded"
nxsd:surroundedBy="|" />
<element name="Supplier" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
<element name="Items">
<complexType>
<sequence>
<element name="Line-Item" minOccurs="3" maxOccurs="3">
<complexType>
<group ref="tns:LineItems" />
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<group name="LineItems">
<sequence>
<element name="Id" type="string" nxsd:style="fixedLength" nxsd:length="10"
nxsd:padStyle="none"/>
<element name="Quantity" type="string" nxsd:style="fixedLength"
nxsd:identifierLength="2" />
<element name="Price" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</group>
<!-- SO -->
<element name="SalesOrder" type="tns:SOType" />
<complexType name="SOType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy="|" />
<element name="Item" type="string" nxsd:style="terminated"
nxsd:terminatedBy="|" />
<element name="Quantity" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
<element name="Buyer" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" /> </sequence>
</complexType>
<!-- INV -->
<element name="Invoice" type="tns:INVType" />
<complexType name="INVType">
<sequence>
<element name="Date" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Purchaser" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Seller" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Item" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" /> <element name="Price" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="Quantity" type="string" nxsd:style="terminated"
nxsd:terminatedBy=";" />
<element name="TotalPrice" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
</schema>
<container xmlns="http://www.oracle.com/ias/processconnect"> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>ABCD Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>OracleApps</Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Database </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>ProcessCon</Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <PurchaseOrder> <Date>01/07/2004</Date> <Buyer>EFGH Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Websphere </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>DB2 </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>Eclipse </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <SalesOrder> <Date>29/06/2004</Date> <Item>Oracle Apps</Item> <Quantity>5</Quantity> <Buyer>Navneet Singh</Buyer> </SalesOrder> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>IJKL Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Weblogic </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Tuxedo </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>JRockit </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <Invoice> <Date>30/06/2004</Date> <Purchaser>Navneet Singh</Purchaser> <Seller>Oracle</Seller> <Item>Oracle Apps</Item> <Price>5</Price> <Quantity>70,000.00</Quantity> <TotalPrice>350,000.00</TotalPrice> </Invoice> </container>
This example shows how to define dates.
11/16/0224/11/02 11-20-2002 23*11*2002 01/02/2003 01:02 01/02/2003 03:04:05
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="dateformat">
<complexType>
<sequence>
<element name="StartDate" type="dateTime" nxsd:dateFormat="MM/dd/yy"
nxsd:style="fixedLength" nxsd:length="8" />
<element name="EndDate" type="dateTime" nxsd:dateFormat="dd/MM/yy"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
<element name="Milestone" type="dateTime" nxsd:dateFormat="MM-dd-yyyy"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
<element name="DueDate" type="dateTime" nxsd:dateFormat="dd*MM*yyyy"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
<element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
<element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm:ss"
nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
</sequence>
</complexType>
</element>
</schema>
<dateformat xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <StartDate>2002-11-16T00:00:00</StartDate> <EndDate>2002-11-24T00:00:00</EndDate> <Milestone>2002-11-20T00:00:00</Milestone> <DueDate>2002-11-23T00:00:00</DueDate> <Date>2003-01-02T01:02:00</Date> <Date>2003-01-02T03:04:05</Date> </dateformat>
This example shows how to use variables.
{,;}Fred,"2 Old Street, Old Town,Manchester","20-08-1954";"0161-499-1718" phone-2 phone-3
<?xml version="1.0" encoding="US-ASCII"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema
"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:stream="chars"
nxsd:version="NXSD">
<element name="variable">
<annotation>
<documentation>
1. var1 - variable declaration
2. var2 - variable declaration with default value
3. EOL - variable declaration with referencing a system variable
</documentation>
<appinfo>
<junkies/>
<nxsd:variables>
<nxsd:variable name="var1" />
<nxsd:variable name="var2" value="," />
<nxsd:variable name="SystemEOL" value="${system.line.separator}" />
</nxsd:variables>
<junkies/>
<junkies/>
<junkies/>
</appinfo>
</annotation>
<complexType>
<sequence>
<element name="delims" type="string" nxsd:style="surrounded"
nxsd:leftSurroundedBy="{" nxsd:rightSurroundedBy="}" >
<annotation>
<appinfo>
<junkies/>
<junkies/>
<junkies/>
<nxsd:variables>
<nxsd:assign name="var1" value="${0,1}"/>
<nxsd:assign name="var2" value="${1}" />
</nxsd:variables>
</appinfo>
</annotation>
</element>
<element name="PersonName" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${var1}" nxsd:quotedBy=""" />
<element name="Address" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${var1}" nxsd:quotedBy="""/>
<element name="DOB" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${var2}" nxsd:quotedBy='"'/>
<element name="Telephone1" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/>
<element name="Telephone2" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/>
<element name="Telephone3" type="string" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/>
</sequence>
</complexType>
</element>
</schema>
<variable xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <delims>,;</delims> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone1>0161-499-1718</Telephone1> <Telephone2>phone-2</Telephone2> <Telephone3>phone-3</Telephone3> </variable>
Table 6-4 shows the constructs applicable only on the <schema>
tag.
Table 6-4 Constructs Applicable Only on the <schema> Tag
Construct | Description |
---|---|
The byte order of the native data as |
|
The encoding in which the actual data is stored. Any legal encoding supported by |
|
A positive integer specifying the number of lines to be skipped, before translating the native data. |
|
Skip until the specified string, before translating the native data. |
|
If declared, adds the standalone attribute in the XML declaration prolog of the translated XML, with the actual value as that specified in |
|
Whether the data is stored as characters or bytes. Allowed values are |
|
String specifying the unique message separator in the native data, in case of a batch of messages. |
|
The type of native data. Possible values are |
|
If declared, adds the XML declaration prolog to the translated XML with the actual value as that specified in |
Table 6-5 shows the constructs applicable on all tags other than the <schema>
tag.
Table 6-5 Constructs Applicable On All Tags Other Than the <schema> Tag
Construct | Description |
---|---|
The length of the array being stored in the native data occupying the specified length |
|
The value of this construct is used as the length of the array, which can also be a variable resolved to a valid number. This value overrides any nxsd:style="array" nxsd:arrayLength="10" This indicates that the array length is |
|
The last item in the array being terminated by the specified string |
|
Assigns a value to the already declared variable |
|
The cells of the array in the native data being separated by the specified string |
|
Either |
|
Matches the string read from the native stream for the |
|
A valid Java date format representing the date in the native data |
|
The number of characters and bytes in which the actual length of the data is stored |
|
The items in the list being separated by the specified string |
|
The native data surrounded |
|
The length of the native data to be read. Used with fixed length style. |
|
The last item in the list being terminated by the specified string |
|
Looks for a match ahead of the current position in the input stream. If a match is found, the node on which this construct is specified is processed; otherwise, it is skipped. Use this feature as follows: nxsd:lookAhead="20" nxsd:lookFor="abc" This indicates to skip |
|
The string used for padding |
|
|
|
The native data being quoted by the specified string |
|
Skips the specified number of bytes or characters |
|
Skips the number of lines specified |
|
Skips until the string specified |
|
Looks for the specified string in the native data. If it exists, then proceeds with the element where it is specified; otherwise, skips and processes the next element. |
|
The style used to read the native data from the input stream. Allowed values are |
|
The native data being surrounded by the specified string |
|
The native data being terminated by the string specified |
|
Declares a single variable |
|
Declares a set of variables or assigns the already declared variables a valid value |
Oracle BPEL Process Manager requires native schemas for translation, which are based on XML schema. However, not all commonly used formats use XML schema files. This chapter describes the Native Format Builder Wizard, which enables you to create native schemas used for translation. The Native Format Builder Wizard guides you through the creation of a native schema file from delimited formats (such as CSVs), fixed length formats, DTD formats, and COBOL Copybook formats. This chapter also provides use cases and constructs for the schema.