IDL 数据类型
在将 DataObject 域用于 CORBA 时,您需要了解 XML 模式和 ESQL 类型如何与 IDL 文件中的类型保持一致。
原语 IDL 类型
下表显示 IDL 类型、XML 模式简单类型和 ESQL 类型之间的映射。
| IDL | XML 模式 | ESQL |
|---|---|---|
| boolean | xsd:boolean | BOOLEAN |
| char | <xsd:simpleType name="char">
<xsd:restriction base="xsd:string"> <xsd:length value="1" fixed="true/> </xsd:restriction> </simpleType> |
字符 |
| wchar | <xsd:simpleType name="wchar">
<xsd:restriction base="xsd:string"/> </xsd:simpleType> |
字符 |
| double | xsd:double | FLOAT |
| float | xsd:float | FLOAT |
| octet | xsd:unsignedByte | INTEGER |
| long | xsd:int | INTEGER |
| Long long | xsd:long | INTEGER |
| short | xsd:short | INTEGER |
| 字符串 | xsd:string | 字符 |
| wstring | xsd:string | 字符 |
| Unsigned short | xsd:unsignedShort | INTEGER |
| Unsigned long | xsd:unsignedInt | INTEGER |
| Unsigned long long | xsd:unsignedLong | DECIMAL |
复杂 IDL 类型
IBM® App Connect Enterprise 支持以下复杂的IDL类型:
- 枚举
- 类型定义
- 序列
- 结构
- 操作的返回类型
- In 参数
- Inout 参数
- Out 参数
- 内部异常
- 内部结构
- 内部序列
- 内部类型定义
模块
在 CORBA 中模块提供作用域。 如果 IDL 文件的模块中包含接口,那么将通过以下格式利用模块名称限定接口名称:
模块名.接口名.操作名
以下示例显示 IDL 文件中的模块。Module one {
Interface OneAInterface {
};
};名为 OneAInterface 的接口的标准名称是 one.OneAInterface。 在 IDL 文件中,模块可以嵌套在其他模块中。 在此情况下,接口的标准名称可以包含多个模块名称,从根模块开始;例如:模块名 A.模块名 B.接口名.操作名
IDL 文件可以包含具有相同名称的多个操作,前提是操作位于不同的模块中。