// First try call the operation using a void return type
objContext = new ObjectMessageContextImpl();
objContext.setMethod(paramModesClass.getMethod("testSingleOutParam", params));
bindingImpl.unmarshal(corbaContext,
objContext,
new JAXBDataBindingCallback(objContext.getMethod(),
DataBindingCallback.Mode.MESSAGE,
null));
Object[] resultArgs = objContext.getMessageObjects();
// In this case, there should be no parameters since the out param is mapped to the return type
assertTrue(resultArgs == null);
// Now try the call with a return type
params = new Class[1];
params[0] = new Holder<Short>().getClass();
corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, false);
corbaContext.getMessage().setStreamableReturn(arg0);
objContext = new ObjectMessageContextImpl();
objContext.setMethod(paramModesClass.getMethod("testSingleOutParamWithReturn", params));
objContext.setMessageObjects(new Holder<Short>(new Short((short)0)));
bindingImpl.unmarshal(corbaContext,
objContext,
new JAXBDataBindingCallback(objContext.getMethod(),
DataBindingCallback.Mode.MESSAGE,
null));
resultArgs = objContext.getMessageObjects();
assertTrue(resultArgs.length == 1);