// Note, this writes only the header information. SystemException or
 // IOR may be written afterwards into the reply mesg body.
 public void write(org.omg.CORBA.portable.OutputStream ostream) {
   super.write(ostream);
   if (this.service_contexts != null) {
     service_contexts.write((org.omg.CORBA_2_3.portable.OutputStream) ostream, GIOPVersion.V1_0);
   } else {
     ServiceContexts.writeNullServiceContext((org.omg.CORBA_2_3.portable.OutputStream) ostream);
   }
   ostream.write_ulong(this.request_id);
   ostream.write_long(this.reply_status);
 }
  public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.locate_status = istream.read_long();
    isValidReplyStatus(this.locate_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.locate_status == OBJECT_FORWARD) {
      CDRInputStream cdr = (CDRInputStream) istream;
      this.ior = IORFactories.makeIOR(cdr);
    }
  }
  public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

      String reposId = istream.read_string();
      this.exClassName = ORBUtility.classNameOf(reposId);
      this.minorCode = istream.read_long();
      int status = istream.read_long();

      switch (status) {
        case CompletionStatus._COMPLETED_YES:
          this.completionStatus = CompletionStatus.COMPLETED_YES;
          break;
        case CompletionStatus._COMPLETED_NO:
          this.completionStatus = CompletionStatus.COMPLETED_NO;
          break;
        case CompletionStatus._COMPLETED_MAYBE:
          this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
          break;
        default:
          throw wrapper.badCompletionStatusInReply(
              CompletionStatus.COMPLETED_MAYBE, new Integer(status));
      }

    } else if (this.reply_status == USER_EXCEPTION) {
      // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
      CDRInputStream cdr = (CDRInputStream) istream;
      this.ior = IORFactories.makeIOR(cdr);
    }
  }
 // Note, this writes only the header information.
 // IOR may be written afterwards into the reply mesg body.
 public void write(org.omg.CORBA.portable.OutputStream ostream) {
   super.write(ostream);
   ostream.write_ulong(this.request_id);
   ostream.write_long(this.locate_status);
 }
 public void read(org.omg.CORBA.portable.InputStream istream) {
   super.read(istream);
   this.request_id = istream.read_ulong();
 }