View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Francois Perrad > CORBA-JAVA > idl2javaxml


Annotate this POD

View/Report Bugs


idl2javaxml - IDL compiler to language Java mapping & XML binding


idl2javaxml [options] spec.idl


All options are forwarded to C preprocessor, except -h -i -v -x.

With the GNU C Compatible Compiler Processor, useful options are :

-D name
-D name=definition
-I directory

Specific options :


Display help.

-i directory

Specify a path for import (only for IDL version 3.0).

-p "m1=prefix1;..."

Specify a list of prefix (gives full qualified Java package names).

-t "m1=new.name1;..."

Specify a list of name translation (gives full qualified Java package names).


Display version.


Enable export (only for IDL version 3.0).


idl2javaxml parses the given input file (IDL) and generates the same files as idl2java and a file that contains XML marshal/demarshal methods. The XML binding follows the CORBA to WSDL/SOAP Interworking Specification (WS-I comformant soap binding).

idl2javaxml is a Perl OO application what uses the visitor design pattern. The parser is generated by Parse::Yapp.

idl2javaxml needs a cpp executable.

CORBA Specifications, including IDL (Interface Language Definition) , the JAVA Language Mapping and CORBA to WSDL/SOAP Interworking are available on <>.


 // IDL
 struct StructType {
     long    field1;
     string  field2;

 // Java
 public class test
   public static void main (String[] args) throws Exception
     XMLOutputStreamImpl os = new XMLOutputStreamImpl (new FileOutputStream ("out.xml"));
     StructType obj = new StructType (1, "toto");
     StructTypeHelperXML.write (os, obj);
     os.close ();

The class StructType and StructTypeHelperXML are generated by idl2javaxml.

The class XMLOutputStreamImpl and XMLInputStreamImpl are an example of the run-time support; there derive from XMLOutputStream ans XMLInputStream that define the interface.

 // XML

This XML document is valid against the Schema generated by idl2xsd (Do you really want write by hand W3C Schema ?).

 // XSD
 <xs:schema targetNamespace="" xmlns:xs="" xmlns:tns="" elementFormDefault="qualified" attributeFormDefault="unqualified">
   <xs:complexType name="StructType">
       <xs:element name="field1" maxOccurs="1" minOccurs="1" type="xs:int"/>
       <xs:element name="field2" maxOccurs="1" minOccurs="1" type="xs:string"/>

The class PYXOutputStreamImpl and PYXInputStreamImpl are an example of the run-time support for Pyxie format (see <>); there derive from XMLOutputStream and XMLInputStream.

 // PYX


cpp, idl2html, idl2java, idl2xsd, idl2rng


(c) 2004-2007 Francois PERRAD, France. All rights reserved.

This program and all CORBA::JAVA modules and all Java class (run-time support) are distributed under the terms of the Artistic Licence.


Francois PERRAD,

syntax highlighting: