Fri, 24 Sep 2010 22:42:14 -0700
6891766: Vulnerabilities in use of reflection in CORBA
Reviewed-by: hawtin
duke@1 | 1 | /* |
ohair@158 | 2 | * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@158 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@158 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@158 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@158 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@158 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | /* |
duke@1 | 26 | * File: ./org/omg/CosNaming/_NamingContextImplBase.java |
duke@1 | 27 | * From: nameservice.idl |
duke@1 | 28 | * Date: Tue Aug 11 03:12:09 1998 |
duke@1 | 29 | * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18 |
duke@1 | 30 | * @deprecated Deprecated in JDK 1.4. |
duke@1 | 31 | */ |
duke@1 | 32 | |
duke@1 | 33 | package org.omg.CosNaming; |
duke@1 | 34 | public abstract class _NamingContextImplBase extends org.omg.CORBA.DynamicImplementation implements org.omg.CosNaming.NamingContext { |
duke@1 | 35 | // Constructor |
duke@1 | 36 | public _NamingContextImplBase() { |
duke@1 | 37 | super(); |
duke@1 | 38 | } |
duke@1 | 39 | // Type strings for this class and its superclases |
duke@1 | 40 | private static final String _type_ids[] = { |
duke@1 | 41 | "IDL:omg.org/CosNaming/NamingContext:1.0" |
duke@1 | 42 | }; |
duke@1 | 43 | |
duke@1 | 44 | public String[] _ids() { return (String[]) _type_ids.clone(); } |
duke@1 | 45 | |
duke@1 | 46 | private static java.util.Dictionary _methods = new java.util.Hashtable(); |
duke@1 | 47 | static { |
duke@1 | 48 | _methods.put("bind", new java.lang.Integer(0)); |
duke@1 | 49 | _methods.put("bind_context", new java.lang.Integer(1)); |
duke@1 | 50 | _methods.put("rebind", new java.lang.Integer(2)); |
duke@1 | 51 | _methods.put("rebind_context", new java.lang.Integer(3)); |
duke@1 | 52 | _methods.put("resolve", new java.lang.Integer(4)); |
duke@1 | 53 | _methods.put("unbind", new java.lang.Integer(5)); |
duke@1 | 54 | _methods.put("list", new java.lang.Integer(6)); |
duke@1 | 55 | _methods.put("new_context", new java.lang.Integer(7)); |
duke@1 | 56 | _methods.put("bind_new_context", new java.lang.Integer(8)); |
duke@1 | 57 | _methods.put("destroy", new java.lang.Integer(9)); |
duke@1 | 58 | } |
duke@1 | 59 | // DSI Dispatch call |
duke@1 | 60 | public void invoke(org.omg.CORBA.ServerRequest r) { |
duke@1 | 61 | switch (((java.lang.Integer) _methods.get(r.op_name())).intValue()) { |
duke@1 | 62 | case 0: // org.omg.CosNaming.NamingContext.bind |
duke@1 | 63 | { |
duke@1 | 64 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 65 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 66 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 67 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 68 | org.omg.CORBA.Any _obj = _orb().create_any(); |
duke@1 | 69 | _obj.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_objref)); |
duke@1 | 70 | _list.add_value("obj", _obj, org.omg.CORBA.ARG_IN.value); |
duke@1 | 71 | r.params(_list); |
duke@1 | 72 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 73 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 74 | org.omg.CORBA.Object obj; |
duke@1 | 75 | obj = _obj.extract_Object(); |
duke@1 | 76 | try { |
duke@1 | 77 | this.bind(n, obj); |
duke@1 | 78 | } |
duke@1 | 79 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 80 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 81 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 82 | r.except(_except); |
duke@1 | 83 | return; |
duke@1 | 84 | } |
duke@1 | 85 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 86 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 87 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 88 | r.except(_except); |
duke@1 | 89 | return; |
duke@1 | 90 | } |
duke@1 | 91 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 92 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 93 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 94 | r.except(_except); |
duke@1 | 95 | return; |
duke@1 | 96 | } |
duke@1 | 97 | catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound e3) { |
duke@1 | 98 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 99 | org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e3); |
duke@1 | 100 | r.except(_except); |
duke@1 | 101 | return; |
duke@1 | 102 | } |
duke@1 | 103 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 104 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 105 | r.result(__return); |
duke@1 | 106 | } |
duke@1 | 107 | break; |
duke@1 | 108 | case 1: // org.omg.CosNaming.NamingContext.bind_context |
duke@1 | 109 | { |
duke@1 | 110 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 111 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 112 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 113 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 114 | org.omg.CORBA.Any _nc = _orb().create_any(); |
duke@1 | 115 | _nc.type(org.omg.CosNaming.NamingContextHelper.type()); |
duke@1 | 116 | _list.add_value("nc", _nc, org.omg.CORBA.ARG_IN.value); |
duke@1 | 117 | r.params(_list); |
duke@1 | 118 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 119 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 120 | org.omg.CosNaming.NamingContext nc; |
duke@1 | 121 | nc = org.omg.CosNaming.NamingContextHelper.extract(_nc); |
duke@1 | 122 | try { |
duke@1 | 123 | this.bind_context(n, nc); |
duke@1 | 124 | } |
duke@1 | 125 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 126 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 127 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 128 | r.except(_except); |
duke@1 | 129 | return; |
duke@1 | 130 | } |
duke@1 | 131 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 132 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 133 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 134 | r.except(_except); |
duke@1 | 135 | return; |
duke@1 | 136 | } |
duke@1 | 137 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 138 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 139 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 140 | r.except(_except); |
duke@1 | 141 | return; |
duke@1 | 142 | } |
duke@1 | 143 | catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound e3) { |
duke@1 | 144 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 145 | org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e3); |
duke@1 | 146 | r.except(_except); |
duke@1 | 147 | return; |
duke@1 | 148 | } |
duke@1 | 149 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 150 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 151 | r.result(__return); |
duke@1 | 152 | } |
duke@1 | 153 | break; |
duke@1 | 154 | case 2: // org.omg.CosNaming.NamingContext.rebind |
duke@1 | 155 | { |
duke@1 | 156 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 157 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 158 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 159 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 160 | org.omg.CORBA.Any _obj = _orb().create_any(); |
duke@1 | 161 | _obj.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_objref)); |
duke@1 | 162 | _list.add_value("obj", _obj, org.omg.CORBA.ARG_IN.value); |
duke@1 | 163 | r.params(_list); |
duke@1 | 164 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 165 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 166 | org.omg.CORBA.Object obj; |
duke@1 | 167 | obj = _obj.extract_Object(); |
duke@1 | 168 | try { |
duke@1 | 169 | this.rebind(n, obj); |
duke@1 | 170 | } |
duke@1 | 171 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 172 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 173 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 174 | r.except(_except); |
duke@1 | 175 | return; |
duke@1 | 176 | } |
duke@1 | 177 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 178 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 179 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 180 | r.except(_except); |
duke@1 | 181 | return; |
duke@1 | 182 | } |
duke@1 | 183 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 184 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 185 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 186 | r.except(_except); |
duke@1 | 187 | return; |
duke@1 | 188 | } |
duke@1 | 189 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 190 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 191 | r.result(__return); |
duke@1 | 192 | } |
duke@1 | 193 | break; |
duke@1 | 194 | case 3: // org.omg.CosNaming.NamingContext.rebind_context |
duke@1 | 195 | { |
duke@1 | 196 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 197 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 198 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 199 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 200 | org.omg.CORBA.Any _nc = _orb().create_any(); |
duke@1 | 201 | _nc.type(org.omg.CosNaming.NamingContextHelper.type()); |
duke@1 | 202 | _list.add_value("nc", _nc, org.omg.CORBA.ARG_IN.value); |
duke@1 | 203 | r.params(_list); |
duke@1 | 204 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 205 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 206 | org.omg.CosNaming.NamingContext nc; |
duke@1 | 207 | nc = org.omg.CosNaming.NamingContextHelper.extract(_nc); |
duke@1 | 208 | try { |
duke@1 | 209 | this.rebind_context(n, nc); |
duke@1 | 210 | } |
duke@1 | 211 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 212 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 213 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 214 | r.except(_except); |
duke@1 | 215 | return; |
duke@1 | 216 | } |
duke@1 | 217 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 218 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 219 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 220 | r.except(_except); |
duke@1 | 221 | return; |
duke@1 | 222 | } |
duke@1 | 223 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 224 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 225 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 226 | r.except(_except); |
duke@1 | 227 | return; |
duke@1 | 228 | } |
duke@1 | 229 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 230 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 231 | r.result(__return); |
duke@1 | 232 | } |
duke@1 | 233 | break; |
duke@1 | 234 | case 4: // org.omg.CosNaming.NamingContext.resolve |
duke@1 | 235 | { |
duke@1 | 236 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 237 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 238 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 239 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 240 | r.params(_list); |
duke@1 | 241 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 242 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 243 | org.omg.CORBA.Object ___result; |
duke@1 | 244 | try { |
duke@1 | 245 | ___result = this.resolve(n); |
duke@1 | 246 | } |
duke@1 | 247 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 248 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 249 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 250 | r.except(_except); |
duke@1 | 251 | return; |
duke@1 | 252 | } |
duke@1 | 253 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 254 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 255 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 256 | r.except(_except); |
duke@1 | 257 | return; |
duke@1 | 258 | } |
duke@1 | 259 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 260 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 261 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 262 | r.except(_except); |
duke@1 | 263 | return; |
duke@1 | 264 | } |
duke@1 | 265 | org.omg.CORBA.Any __result = _orb().create_any(); |
duke@1 | 266 | __result.insert_Object(___result); |
duke@1 | 267 | r.result(__result); |
duke@1 | 268 | } |
duke@1 | 269 | break; |
duke@1 | 270 | case 5: // org.omg.CosNaming.NamingContext.unbind |
duke@1 | 271 | { |
duke@1 | 272 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 273 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 274 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 275 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 276 | r.params(_list); |
duke@1 | 277 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 278 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 279 | try { |
duke@1 | 280 | this.unbind(n); |
duke@1 | 281 | } |
duke@1 | 282 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 283 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 284 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 285 | r.except(_except); |
duke@1 | 286 | return; |
duke@1 | 287 | } |
duke@1 | 288 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e1) { |
duke@1 | 289 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 290 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1); |
duke@1 | 291 | r.except(_except); |
duke@1 | 292 | return; |
duke@1 | 293 | } |
duke@1 | 294 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e2) { |
duke@1 | 295 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 296 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2); |
duke@1 | 297 | r.except(_except); |
duke@1 | 298 | return; |
duke@1 | 299 | } |
duke@1 | 300 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 301 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 302 | r.result(__return); |
duke@1 | 303 | } |
duke@1 | 304 | break; |
duke@1 | 305 | case 6: // org.omg.CosNaming.NamingContext.list |
duke@1 | 306 | { |
duke@1 | 307 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 308 | org.omg.CORBA.Any _how_many = _orb().create_any(); |
duke@1 | 309 | _how_many.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong)); |
duke@1 | 310 | _list.add_value("how_many", _how_many, org.omg.CORBA.ARG_IN.value); |
duke@1 | 311 | org.omg.CORBA.Any _bl = _orb().create_any(); |
duke@1 | 312 | _bl.type(org.omg.CosNaming.BindingListHelper.type()); |
duke@1 | 313 | _list.add_value("bl", _bl, org.omg.CORBA.ARG_OUT.value); |
duke@1 | 314 | org.omg.CORBA.Any _bi = _orb().create_any(); |
duke@1 | 315 | _bi.type(org.omg.CosNaming.BindingIteratorHelper.type()); |
duke@1 | 316 | _list.add_value("bi", _bi, org.omg.CORBA.ARG_OUT.value); |
duke@1 | 317 | r.params(_list); |
duke@1 | 318 | int how_many; |
duke@1 | 319 | how_many = _how_many.extract_ulong(); |
duke@1 | 320 | org.omg.CosNaming.BindingListHolder bl; |
duke@1 | 321 | bl = new org.omg.CosNaming.BindingListHolder(); |
duke@1 | 322 | org.omg.CosNaming.BindingIteratorHolder bi; |
duke@1 | 323 | bi = new org.omg.CosNaming.BindingIteratorHolder(); |
duke@1 | 324 | this.list(how_many, bl, bi); |
duke@1 | 325 | org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value); |
duke@1 | 326 | org.omg.CosNaming.BindingIteratorHelper.insert(_bi, bi.value); |
duke@1 | 327 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 328 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 329 | r.result(__return); |
duke@1 | 330 | } |
duke@1 | 331 | break; |
duke@1 | 332 | case 7: // org.omg.CosNaming.NamingContext.new_context |
duke@1 | 333 | { |
duke@1 | 334 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 335 | r.params(_list); |
duke@1 | 336 | org.omg.CosNaming.NamingContext ___result; |
duke@1 | 337 | ___result = this.new_context(); |
duke@1 | 338 | org.omg.CORBA.Any __result = _orb().create_any(); |
duke@1 | 339 | org.omg.CosNaming.NamingContextHelper.insert(__result, ___result); |
duke@1 | 340 | r.result(__result); |
duke@1 | 341 | } |
duke@1 | 342 | break; |
duke@1 | 343 | case 8: // org.omg.CosNaming.NamingContext.bind_new_context |
duke@1 | 344 | { |
duke@1 | 345 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 346 | org.omg.CORBA.Any _n = _orb().create_any(); |
duke@1 | 347 | _n.type(org.omg.CosNaming.NameHelper.type()); |
duke@1 | 348 | _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value); |
duke@1 | 349 | r.params(_list); |
duke@1 | 350 | org.omg.CosNaming.NameComponent[] n; |
duke@1 | 351 | n = org.omg.CosNaming.NameHelper.extract(_n); |
duke@1 | 352 | org.omg.CosNaming.NamingContext ___result; |
duke@1 | 353 | try { |
duke@1 | 354 | ___result = this.bind_new_context(n); |
duke@1 | 355 | } |
duke@1 | 356 | catch (org.omg.CosNaming.NamingContextPackage.NotFound e0) { |
duke@1 | 357 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 358 | org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0); |
duke@1 | 359 | r.except(_except); |
duke@1 | 360 | return; |
duke@1 | 361 | } |
duke@1 | 362 | catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound e1) { |
duke@1 | 363 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 364 | org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e1); |
duke@1 | 365 | r.except(_except); |
duke@1 | 366 | return; |
duke@1 | 367 | } |
duke@1 | 368 | catch (org.omg.CosNaming.NamingContextPackage.CannotProceed e2) { |
duke@1 | 369 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 370 | org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e2); |
duke@1 | 371 | r.except(_except); |
duke@1 | 372 | return; |
duke@1 | 373 | } |
duke@1 | 374 | catch (org.omg.CosNaming.NamingContextPackage.InvalidName e3) { |
duke@1 | 375 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 376 | org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e3); |
duke@1 | 377 | r.except(_except); |
duke@1 | 378 | return; |
duke@1 | 379 | } |
duke@1 | 380 | org.omg.CORBA.Any __result = _orb().create_any(); |
duke@1 | 381 | org.omg.CosNaming.NamingContextHelper.insert(__result, ___result); |
duke@1 | 382 | r.result(__result); |
duke@1 | 383 | } |
duke@1 | 384 | break; |
duke@1 | 385 | case 9: // org.omg.CosNaming.NamingContext.destroy |
duke@1 | 386 | { |
duke@1 | 387 | org.omg.CORBA.NVList _list = _orb().create_list(0); |
duke@1 | 388 | r.params(_list); |
duke@1 | 389 | try { |
duke@1 | 390 | this.destroy(); |
duke@1 | 391 | } |
duke@1 | 392 | catch (org.omg.CosNaming.NamingContextPackage.NotEmpty e0) { |
duke@1 | 393 | org.omg.CORBA.Any _except = _orb().create_any(); |
duke@1 | 394 | org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.insert(_except, e0); |
duke@1 | 395 | r.except(_except); |
duke@1 | 396 | return; |
duke@1 | 397 | } |
duke@1 | 398 | org.omg.CORBA.Any __return = _orb().create_any(); |
duke@1 | 399 | __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); |
duke@1 | 400 | r.result(__return); |
duke@1 | 401 | } |
duke@1 | 402 | break; |
duke@1 | 403 | default: |
duke@1 | 404 | throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); |
duke@1 | 405 | } |
duke@1 | 406 | } |
duke@1 | 407 | } |