Article View: comp.lang.java.corba
Article #48Re: output parameter causing org.omg.CORBA.BAD_PARAM
From: donalmurtagh
Date: Fri, 27 Oct 2006 17:53
Date: Fri, 27 Oct 2006 17:53
236 lines
8557 bytes
8557 bytes
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.portable.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;
}
}
}
Technical Details
Message-ID:
<1161971629.143369.170620@i3g2000cwc.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mailReferences:
<1161967403.171452.40360@h48g2000cwc.googlegroups.com> <1161968579.814558.51100@k70g2000cwa.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 108bbb,ce8576150c069497 X-Google-Thread: f753e,ce8576150c069497 X-Google-Thread: 109156,ce8576150c069497 X-Google-Attributes: gid108bbb,gidf753e,gid109156,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail From: donalmurtagh@yahoo.co.uk Newsgroups: comp.lang.java.corba,comp.object.corba,borland.public.visibroker Subject: Re: output parameter causing org.omg.CORBA.BAD_PARAM Date: 27 Oct 2006 10:53:49 -0700 Organization: http://groups.google.com Lines: 237 Message-ID: <1161971629.143369.170620@i3g2000cwc.googlegroups.com> References: <1161967403.171452.40360@h48g2000cwc.googlegroups.com> <1161968579.814558.51100@k70g2000cwa.googlegroups.com> NNTP-Posting-Host: 216.13.50.116 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1161971634 10736 127.0.0.1 (27 Oct 2006 17:53:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 27 Oct 2006 17:53:54 +0000 (UTC) In-Reply-To: <1161968579.814558.51100@k70g2000cwa.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i3g2000cwc.googlegroups.com; posting-host=216.13.50.116; posting-account=S2ECIAwAAAAoNqiUN1QpoHiXo33plG9k