// send an ordinary request
IMessage iMessage = receiveMessage(iReciever, sendRequest(iSender,
oId,
TypeDescription.getTypeDescription(test.XTestInterface.class),
"returnAny",
new ThreadId(new byte[]{0, 1}),
null,
new Boolean[1],
new Boolean[1]));
// send a reply
iMessage = receiveMessage(iSender, sendReply(iReciever,
false,
new ThreadId(new byte[]{0, 1}),
new com.sun.star.uno.Any(Void.class, null)));
Object result = iMessage.getData(new Object[1][]);
System.err.println("\t\t\tgot as result:" + result + " expected: void-any");
boolean tmp_passed = (result instanceof Any) && (((Any)result).getType().getTypeDescription().getZClass() == void.class);
System.err.println("\t\t\tpassed? " + tmp_passed);
passed = passed && tmp_passed;
System.err.println("\t\t\tnull interface:");
// send an ordinary request
iMessage = receiveMessage(iReciever, sendRequest(iSender,
oId,
TypeDescription.getTypeDescription(test.XTestInterface.class),
"returnAny",
new ThreadId(new byte[]{0, 1}),
null,
new Boolean[1],
new Boolean[1]));
// send a reply
iMessage = receiveMessage(iSender, sendReply(iReciever,
false,
new ThreadId(new byte[]{0, 1}),
new Any(XInterface.class, null)));
result = iMessage.getData(new Object[1][]);
System.err.println("\t\t\tgot as result:" + result + " expected: null interface");
tmp_passed = result == null;
System.err.println("\t\t\tpassed? " + tmp_passed);
passed = passed && tmp_passed;
System.err.println("\t\t\tinteger object:");
// send an ordinary request
iMessage = receiveMessage(iReciever, sendRequest(iSender,
oId,
TypeDescription.getTypeDescription(test.XTestInterface.class),
"returnAny",
new ThreadId(new byte[]{0, 1}),
null,
new Boolean[1],
new Boolean[1]));
// send a reply
iMessage = receiveMessage(iSender, sendReply(iReciever,
false,
new ThreadId(new byte[]{0, 1}),
new Integer(501)));
result = iMessage.getData(new Object[1][]);
System.err.println("\t\t\tgot as result:" + result + " expected: Integer(501)");
tmp_passed = result.equals(new Integer(501));
System.err.println("\t\t\tpassed? " + tmp_passed);