Hi,
I'm having a problem with the valErrors out parameter in the following
IDL operation:
boolean submit(in SMSProvExt::WorkOrderData wo,
in boolean isNew,
out string woName,
out SMSProvExt::ValErrorList valErrors)
raises(ApplError);
On the client side, I pass in the following value:
ValErrorListHolder valErrors = new ValErrorListHolder();
If the server implementation returns an empty list then everything
works fine:
public boolean submit(WorkOrderData wo, boolean isNew, StringHolder
woName, ValErrorListHolder valErrors) throws ApplError {
woName.value = "";
ValError[] errors = new ValError[0];
valErrors.value = errors;
return true;
}
However if the server implementation return a non-empty list, for
example:
public boolean submit(WorkOrderData wo, boolean isNew, StringHolder
woName, ValErrorListHolder valErrors) throws ApplError {
woName.value = "";
ValError[] errors = new ValError[1];
errors[0] = new ValError();
errors[0].valErrNo = 23;
errors[0].valErrMsg = "Some error";
valErrors.value = errors;
return true;
}
Then when the client calls submit(), the following exception is thrown:
org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.inprise.vbroker.orb.SE.read(Unknown Source)
at com.inprise.vbroker.orb.DelegateImpl.handleReply(Unknown
Source)
at com.inprise.vbroker.orb.DelegateImpl.invoke(Unknown Source)
at
org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
I'm using Visibroker, and both the client and server are implemented in
Java 5.
Thanks in advance for any suggestions!
- DM


|