示例#1
0
 public string hello(string a_sendMsg)
 {
     MiddTec.CORBA.portable.InputStream ins = null;
     while (true)
     {
         try
         {
             MiddTec.CORBA.portable.OutputStream outs = _request("hello", true);
             outs.write_string(a_sendMsg);
             ins = _invoke(outs);
             string result = ins.read_string();
             return(result);
         }
         catch (MiddTec.CORBA.portable.RemarshalException)
         {
         }
         catch (MiddTec.CORBA.portable.ApplicationException ax)
         {
             String id = ax.getId();
             throw new MiddTec.CORBA.MARSHAL(id);
         }
         finally
         {
             this._releaseReply(ins);
         }
     }
 }
示例#2
0
        public MiddTec.CORBA.portable.OutputStream _invoke(string method, MiddTec.CORBA.portable.InputStream ins, MiddTec.CORBA.portable.ResponseHandler resh)
        {
            MiddTec.CORBA.portable.OutputStream outs = null;
            switch (method)
            {
            case "hello":
            {
                string a_sendMsg = ins.read_string();
                string result    = this.hello(a_sendMsg);
                outs = resh.createReply();
                outs.write_string(result);
                break;
            }

            default:
                throw new MiddTec.CORBA.BAD_OPERATION();
            }
            return(outs);
        }
示例#3
0
 public static Greetings read(MiddTec.CORBA.portable.InputStream inpStream)
 {
     return(narrow(inpStream.read_Object()));
 }