/** Test accessing the names and types of members in a DynStruct object. */
  public void testAccessStructMembers() {
    String msg;
    String memberName = null;
    TCKind memberKind = null;
    org.omg.CORBA.Any any = null;
    EmptyException exception = null;
    org.omg.DynamicAny.DynStruct dynAny = null;

    exception = new EmptyException();
    any = orb.create_any();
    EmptyExceptionHelper.insert(any, exception);
    dynAny = createDynAnyFromAny(any);

    // test getting the name of the current member
    msg = "Failed to throw a TypeMismatch exception when calling ";
    msg += "DynStruct::current_member_name operation on an empty exception";
    try {
      memberName = dynAny.current_member_name();

      fail(msg);
    } catch (AssertionFailedError ex) {
      throw ex;
    } catch (Throwable ex) {
      if (!(ex instanceof org.omg.DynamicAny.DynAnyPackage.TypeMismatch)) {
        fail(msg + ": " + ex);
      }
    }

    // test getting the kind of the current member
    msg = "Failed to throw a TypeMismatch exception when calling ";
    msg += "DynStruct::current_member_kind operation on an empty exception";
    try {
      memberKind = dynAny.current_member_kind();

      fail(msg);
    } catch (AssertionFailedError ex) {
      throw ex;
    } catch (Throwable ex) {
      if (!(ex instanceof org.omg.DynamicAny.DynAnyPackage.TypeMismatch)) {
        fail(msg + ": " + ex);
      }
    }
  }