' oicbasics: Opaque Schema in OIC
September 22, 2022

Opaque Schema in OIC

 


Schema  In OIC Schema File (i.e. XML Schema) is used to define the structure of the file which is being used to store data.

Below is an example of an XML schema, or XML schema definition (XSD).

- Advertisement -



<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/employeedetails" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EmployeeRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="Employee" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Emp_Id" type="xs:integer" minOccurs="0" />
<xs:element name="Emp_FirstName" type="xs:string" minOccurs="0" />
<xs:element name="Emp_LastName" type="xs:string" minOccurs="0" />
<xs:element name="Emp_Designation" type="xs:string" minOccurs="0" />
<xs:element name="Emp_DC_Location" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Opaque Schema Now suppose you are not sure about the structure of the File or you simply don't want to define the structure of the file then you can  use the Opaque Schema. 

You can use an opaque schema in a stage file action Read File or Write File operation without concern for a schema for the file. The only condition is that whatever is sent to the opaque element in the opaque schema must be base64-encoded data.

Save the below xml as opaqueschema.xsd file and then you can use it in the integration.

<?xml version = '1.0' encoding = 'UTF-8'?>  
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
        xmlns="http://www.w3.org/2001/XMLSchema" >
  <element name="opaqueElement" type="base64Binary" />
</schema>

For Your Reference 👇





No comments:

Post a Comment

If you have any doubts, Please let me know.

Top