Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Corba > Re: output para...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 464 of 558
Post > Topic >>

Re: output parameter causing org.omg.CORBA.BAD_PARAM

by donalmurtagh@[EMAIL PROTECTED] Oct 27, 2006 at 10:53 AM

Thanks for your reply. Yes, in the IDL file ValError is a struct that
looks like this:

	struct ValError {
		short valErrNo;
		string valErrMsg;
		long sorId;
		string vdtName;
		SDRTypeEnum sdrType;
		long sdrIndex;
		long sdrSubIndex;
		string vatName;
		string attrValue;
		NVList valErrorNVs;
	};


The .java file generated from this looks like this:

package surePay.idl2java.SMSProvExt;

/**
 * <ul>
 * <li> <b>IDL Source</b>
"C:/workspace/patrol/sure-pay/src/idl/SMSProvExt.idl"
 * <li> <b>IDL Name</b>      ::SMSProvExt::ValError
 * <li> <b>Repository Id</b> IDL:SMSProvExt/ValError:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * struct ValError {
  ...
};
 * </pre>
 */
public final class ValError implements org.omg.CORBA.****table.IDLEntity
{

  public short valErrNo;

  public java.lang.String valErrMsg;

  public int sorId;

  public java.lang.String vdtName;

  public surePay.idl2java.SMSProvExt.SDRTypeEnum sdrType;

  public int sdrIndex;

  public int sdrSubIndex;

  public java.lang.String vatName;

  public java.lang.String attrValue;

  public surePay.idl2java.SMSProvExt.NameValue[] valErrorNVs;

  public ValError () {
    valErrMsg = "";
    vdtName = "";
    vatName = "";
    attrValue = "";
  }

  public ValError (final short valErrNo,
                   final java.lang.String valErrMsg,
                   final int sorId,
                   final java.lang.String vdtName,
                   final surePay.idl2java.SMSProvExt.SDRTypeEnum
sdrType,
                   final int sdrIndex,
                   final int sdrSubIndex,
                   final java.lang.String vatName,
                   final java.lang.String attrValue,
                   final surePay.idl2java.SMSProvExt.NameValue[]
valErrorNVs) {
    this.valErrNo = valErrNo;
    this.valErrMsg = valErrMsg;
    this.sorId = sorId;
    this.vdtName = vdtName;
    this.sdrType = sdrType;
    this.sdrIndex = sdrIndex;
    this.sdrSubIndex = sdrSubIndex;
    this.vatName = vatName;
    this.attrValue = attrValue;
    this.valErrorNVs = valErrorNVs;
  }

  private transient java.util.Hashtable _printMap = null;
  public java.lang.String toString() {
    final java.lang.StringBuffer _ret = new
java.lang.StringBuffer("struct surePay.idl2java.SMSProvExt.ValError
{");
    final java.lang.Thread _currentThread =
java.lang.Thread.currentThread();
    boolean justCreated = false;
    if (_printMap == null) {
      synchronized (this) {
        if (_printMap == null) {
          justCreated = true;
          _printMap = new java.util.Hashtable();
        }
      }
    }
    if (!justCreated) {
      if (_printMap.get(_currentThread) != null) {
        _ret.append("...}");
        return _ret.toString();
      }
    }
    _printMap.put(_currentThread, this);
    _ret.append("\n");
    _ret.append("short valErrNo=");
    _ret.append(valErrNo);
    _ret.append(",\n");
    _ret.append("java.lang.String valErrMsg=");
    _ret.append(valErrMsg != null?'\"' + valErrMsg + '\"':null);
    _ret.append(",\n");
    _ret.append("int sorId=");
    _ret.append(sorId);
    _ret.append(",\n");
    _ret.append("java.lang.String vdtName=");
    _ret.append(vdtName != null?'\"' + vdtName + '\"':null);
    _ret.append(",\n");
    _ret.append("surePay.idl2java.SMSProvExt.SDRTypeEnum sdrType=");
    _ret.append(sdrType);
    _ret.append(",\n");
    _ret.append("int sdrIndex=");
    _ret.append(sdrIndex);
    _ret.append(",\n");
    _ret.append("int sdrSubIndex=");
    _ret.append(sdrSubIndex);
    _ret.append(",\n");
    _ret.append("java.lang.String vatName=");
    _ret.append(vatName != null?'\"' + vatName + '\"':null);
    _ret.append(",\n");
    _ret.append("java.lang.String attrValue=");
    _ret.append(attrValue != null?'\"' + attrValue + '\"':null);
    _ret.append(",\n");
    _ret.append("surePay.idl2java.SMSProvExt.NameValue[]
valErrorNVs=");
    _ret.append("{");
    if (valErrorNVs == null) {
      _ret.append(valErrorNVs);
    } else {
      for (int $counter112 = 0; $counter112 < valErrorNVs.length;
$counter112++) {
        _ret.append(valErrorNVs[$counter112]);
        if ($counter112 < valErrorNVs.length - 1) {
          _ret.append(",");
        }
      }
    }
    _ret.append("}");
    _ret.append("\n");
    _printMap.remove(_currentThread);
    _ret.append("}");
    return _ret.toString();
  }

  private transient java.util.Hashtable _cmpMap = null;
  public boolean equals (java.lang.Object o) {
    if (this == o) return true;
    if (o == null) return false;

    final java.lang.Thread _currentThread =
java.lang.Thread.currentThread();
    boolean justCreated = false;
    if (_cmpMap == null) {
      synchronized (this) {
        if (_cmpMap == null) {
          justCreated = true;
          _cmpMap = new java.util.Hashtable();
        }
      }
    }
    if (!justCreated) {
      final java.lang.Object _cmpObj;
      _cmpObj= _cmpMap.get(_currentThread);
      if (_cmpObj != null) return o == _cmpObj;
    }
    if (o instanceof surePay.idl2java.SMSProvExt.ValError) {
      _cmpMap.put(_currentThread, o);
      final surePay.idl2java.SMSProvExt.ValError obj =
(surePay.idl2java.SMSProvExt.ValError)o;
      boolean res = true;
      do {
        res = this.valErrNo == obj.valErrNo;
        if (!res) break;
        res = this.valErrMsg == obj.valErrMsg ||
         (this.valErrMsg != null && obj.valErrMsg != null &&
this.valErrMsg.equals(obj.valErrMsg));
        if (!res) break;
        res = this.sorId == obj.sorId;
        if (!res) break;
        res = this.vdtName == obj.vdtName ||
         (this.vdtName != null && obj.vdtName != null &&
this.vdtName.equals(obj.vdtName));
        if (!res) break;
        res = this.sdrType == obj.sdrType ||
         (this.sdrType != null && obj.sdrType != null &&
this.sdrType.equals(obj.sdrType));
        if (!res) break;
        res = this.sdrIndex == obj.sdrIndex;
        if (!res) break;
        res = this.sdrSubIndex == obj.sdrSubIndex;
        if (!res) break;
        res = this.vatName == obj.vatName ||
         (this.vatName != null && obj.vatName != null &&
this.vatName.equals(obj.vatName));
        if (!res) break;
        res = this.attrValue == obj.attrValue ||
         (this.attrValue != null && obj.attrValue != null &&
this.attrValue.equals(obj.attrValue));
        if (!res) break;
          if (res = (this.valErrorNVs.length ==
obj.valErrorNVs.length)) {
            for (int $counter113 = 0; res && $counter113 <
this.valErrorNVs.length; $counter113++) {
              res = this.valErrorNVs[$counter113] ==
obj.valErrorNVs[$counter113] ||
               (this.valErrorNVs[$counter113] != null &&
obj.valErrorNVs[$counter113] != null &&
this.valErrorNVs[$counter113].equals(obj.valErrorNVs[$counter113]));
            }
          }
      } while (false);
      _cmpMap.remove(_currentThread);
      return res;
    }
    else {
      return false;
    }
  }
}
 




 5 Posts in Topic:
output parameter causing org.omg.CORBA.BAD_PARAM
donalmurtagh@[EMAIL PROTE  2006-10-27 09:43:23 
Re: output parameter causing org.omg.CORBA.BAD_PARAM
"Mark Woyna" &l  2006-10-27 10:02:59 
Re: output parameter causing org.omg.CORBA.BAD_PARAM
donalmurtagh@[EMAIL PROTE  2006-10-27 10:53:49 
Re: output parameter causing org.omg.CORBA.BAD_PARAM
donalmurtagh@[EMAIL PROTE  2006-10-27 12:16:01 
Re: output parameter causing org.omg.CORBA.BAD_PARAM
donalmurtagh@[EMAIL PROTE  2006-10-27 12:17:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 23:41:42 CST 2008.