IDL Complex Type
struct The CORBA struct is represented by a .NET class type that has the /** @attribute Serializable() */ attribute for .Net serializing/deserializing.  The class members in J# class type must be declarerd in the same order as the corresponding CORBA data elements defined in IDL.  Each CORBA structs maps to two J#'s classes as follow.
// CORBA IDL
struct Node 
{
   string name;
};
 
// J#
import System.IO.*;
import System.Runtime.Serialization.Formatters.Binary.*;
import System.Runtime.Serialization.*;
import System.SerializableAttribute;	
				 
package demo.any;

/**
 * Struct definition : Node
 * 
 * @author TomORB J# Native Compiler
*/
/** @attribute Serializable() */
public final class Node implements org.omg.CORBA.portable.IDLEntity
{
   /**
    * Struct member name
    */
   public java.lang.String name;

   /**
    * Struct member next
    */
   public demo.any.Node[] next;

   /**
    * Default constructor
    */
   public Node()
   { }

   /**
    * Constructor with fields initialization
    * @param name name struct member
    * @param next next struct member
    */
   public Node(java.lang.String name, demo.any.Node[] next)
   {
      this.name = name;
      this.next = next;
   }

}

package demo.any;

/** 
 * Helper class for : Node
 *  
 * @author TomORB J# Native Compiler
 */ 
public class NodeHelper
{
   /**
    * Insert Node into an any
    * @param a an any
    * @param t Node value
    */
   public static void insert(org.omg.CORBA.Any a, demo.any.Node t)
   {
      a.insert_Streamable(new demo.any.NodeHolder(t));
   }

   /**
    * Extract Node from an any
    * @param a an any
    * @return the extracted Node value
    */
   public static demo.any.Node extract(org.omg.CORBA.Any a)
   {
      if (!a.type().equal(type()))
         throw new org.omg.CORBA.MARSHAL();
      return read(a.create_input_stream());
   }

   //
   // Internal TypeCode value
   //
   private static org.omg.CORBA.TypeCode _tc = null;
   private static boolean _working = false;

   /**
    * Return the Node TypeCode
    * @return a TypeCode
    */
   public static org.omg.CORBA.TypeCode type()
   {
      if (_tc == null) {
         synchronized(org.omg.CORBA.TypeCode.class) {
            if (_tc != null)
               return _tc;
            if (_working)
               return org.omg.CORBA.ORB.init().create_recursive_tc(id());
            _working = true;
            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
            org.omg.CORBA.StructMember []_members = new org.omg.CORBA.StructMember[2];

            _members[0] = new org.omg.CORBA.StructMember();
            _members[0].name = "name";
            _members[0].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_string);
            _members[1] = new org.omg.CORBA.StructMember();
            _members[1].name = "next";
            _members[1].type = orb.create_sequence_tc(0,demo.any.NodeHelper.type());
            _tc = orb.create_struct_tc(id(),"Node",_members);
            _working = false;
         }
      }
      return _tc;
   }

   /**
    * Return the Node IDL ID
    * @return an ID
    */
   public static java.lang.String id()
   {
      return _id;
   }

   private final static java.lang.String _id = "IDL:demo/any/Node:1.0";

   /**
    * Read Node from a marshalled stream
    * @param istream the input stream
    * @return the readed Node value
    */
   public static demo.any.Node read(org.omg.CORBA.portable.InputStream istream)
   {
      demo.any.Node new_one = new demo.any.Node();
      new_one.name = istream.read_string();
      {
         int size1 = istream.read_ulong();
         new_one.next = new demo.any.Node[size1];
         for (int i1=0; i1<new_one.next.length; i1++)
         {
            new_one.next[i1] = demo.any.NodeHelper.read(istream);
         }
      }
      return new_one;
   }

   /**
    * Write Node into a marshalled stream
    * @param ostream the output stream
    * @param value Node value
    */
   public static void write(org.omg.CORBA.portable.OutputStream ostream, demo.any.Node value)
   {
      ostream.write_string(value.name);
      ostream.write_ulong(value.next.length);
      for (int i1=0; i1<value.next.length; i1++)
      {
         demo.any.NodeHelper.write(ostream,value.next[i1]);
      }
   }
}

package demo.any;

/**
 * Holder class for : Node
 * 
 * @author TomORB J# Native Compiler
 */
final public class NodeHolder
      implements org.omg.CORBA.portable.Streamable
{
   /**
    * Internal Node value
    */
   public demo.any.Node value;

   /**
    * Default constructor
    */
   public NodeHolder()
   { }

   /**
    * Constructor with value initialisation
    * @param initial the initial value
    */
   public NodeHolder(demo.any.Node initial)
   {
      value = initial;
   }

   /**
    * Read Node from a marshalled stream
    * @param istream the input stream
    */
   public void _read(org.omg.CORBA.portable.InputStream istream)
   {
      value = NodeHelper.read(istream);
   }

   /**
    * Write Node into a marshalled stream
    * @param ostream the output stream
    */
   public void _write(org.omg.CORBA.portable.OutputStream ostream)
   {
      NodeHelper.write(ostream,value);
   }

   /**
    * Return the Node TypeCode
    * @return a TypeCode
    */
   public org.omg.CORBA.TypeCode _type()
   {
      return NodeHelper.type();
   }

}