//Generated by the IDL-to-C#-compiler MiddCorIdl //Source: C:/project/MC/MinCorNet/DemoJava/OverloadMethods/IDL/OverloadMethods.idl //Dienstag, 22. März 2005, 19:10:31 using System; using System.Collections; using Middsol; //Types namespace OverloadMethods { namespace GreetingsPackage { } } //Interfaces and Value Factories namespace OverloadMethods { public interface Greetings : GreetingsOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity { } } //Interface Operations and Value Types namespace OverloadMethods { public interface GreetingsOperations { string hello__CORBA_WStringValue__CORBA_WStringValue( string a_arg0, string a_arg1 ); string hello__CORBA_WStringValue( string a_arg0 ); } } //Helpers namespace OverloadMethods { public class GreetingsHelper { private static string _id = "RMI:OverloadMethods.Greetings:0000000000000000"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "Greetings" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, Greetings s ) { a.type( type()); write( a.create_output_stream(), s ); } public static Greetings extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, Greetings s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static Greetings read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static Greetings narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is Greetings ) { return (Greetings) obj; } if( obj._is_a( id() ) ) { _GreetingsStub stub = new _GreetingsStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace GreetingsPackage { } } //Stubs and Value Default Factories namespace OverloadMethods { public class _GreetingsStub : Middsol.CORBA.portable.ObjectImpl, Greetings { private string[] ids = {"RMI:OverloadMethods.Greetings:0000000000000000"}; public override string[] _ids() { return ids; } public string hello__CORBA_WStringValue__CORBA_WStringValue( string a_arg0, string a_arg1 ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello__CORBA_WStringValue__CORBA_WStringValue", true ); Middsol.CORBA.WStringValueHelper.write( outs, a_arg0 ); Middsol.CORBA.WStringValueHelper.write( outs, a_arg1 ); ins = _invoke( outs ); string result = Middsol.CORBA.WStringValueHelper.read( ins ); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } public string hello__CORBA_WStringValue( string a_arg0 ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello__CORBA_WStringValue", true ); Middsol.CORBA.WStringValueHelper.write( outs, a_arg0 ); ins = _invoke( outs ); string result = Middsol.CORBA.WStringValueHelper.read( ins ); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } } //POA namespace OverloadMethods { public abstract class GreetingsPOA : Middsol.PortableServer.Servant, GreetingsOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"RMI:OverloadMethods.Greetings:0000000000000000"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public Greetings _this() { return GreetingsHelper.narrow( base._this_object( ) ); } public Greetings _this( Middsol.CORBA.ORB orb ) { return GreetingsHelper.narrow( base._this_object( orb ) ); } virtual public string hello__CORBA_WStringValue__CORBA_WStringValue( string a_arg0, string a_arg1 ){ return (string)(System.Object) null ;} virtual public string hello__CORBA_WStringValue( string a_arg0 ){ return (string)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "hello__CORBA_WStringValue__CORBA_WStringValue": { string a_arg0 = Middsol.CORBA.WStringValueHelper.read( ins ); string a_arg1 = Middsol.CORBA.WStringValueHelper.read( ins ); string result = this.hello__CORBA_WStringValue__CORBA_WStringValue( a_arg0, a_arg1 ); outs = resh.createReply(); Middsol.CORBA.WStringValueHelper.write( outs, result ); break; } case "hello__CORBA_WStringValue": { string a_arg0 = Middsol.CORBA.WStringValueHelper.read( ins ); string result = this.hello__CORBA_WStringValue( a_arg0 ); outs = resh.createReply(); Middsol.CORBA.WStringValueHelper.write( outs, result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } } //POATie namespace OverloadMethods { public class GreetingsPOATie : GreetingsPOA { public GreetingsPOATie( GreetingsOperations impl ) { this._impl = impl; } public GreetingsPOATie( GreetingsOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public GreetingsOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public string hello__CORBA_WStringValue__CORBA_WStringValue( string a_arg0, string a_arg1 ) { return ((GreetingsOperations)_impl).hello__CORBA_WStringValue__CORBA_WStringValue( a_arg0, a_arg1 ); } override public string hello__CORBA_WStringValue( string a_arg0 ) { return ((GreetingsOperations)_impl).hello__CORBA_WStringValue( a_arg0 ); } private GreetingsOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } }