Package org.objectweb.celtix.context

Examples of org.objectweb.celtix.context.GenericMessageContext


                                                                  orb.get_primitive_tc(TCKind.tk_short),
                                                                  null);
        handler.setValue(new Short((short)123));
        CorbaStreamable arg0 = new CorbaStreamable(handler, handler.getName());

        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
        corbaContext.setMessage(new CorbaMessage());
        corbaContext.getMessage().addStreamableArgument(arg0);
       
        // First try call the operation using a void return type
View Full Code Here


                                                                   orb.get_primitive_tc(TCKind.tk_short),
                                                                   null);
        handler1.setValue(new Short((short)456));
        CorbaStreamable arg1 = new CorbaStreamable(handler1, handler1.getName());

        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
        corbaContext.setMessage(new CorbaMessage());
        corbaContext.getMessage().addStreamableArgument(arg0);
        corbaContext.getMessage().addStreamableArgument(arg1);
       
View Full Code Here

                                                                   orb.get_primitive_tc(TCKind.tk_short),
                                                                   null);
        handler1.setValue(new Short((short)456));
        CorbaStreamable arg1 = new CorbaStreamable(handler1, handler1.getName());

        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
        corbaContext.setMessage(new CorbaMessage());
        corbaContext.getMessage().addStreamableArgument(arg0);
        corbaContext.getMessage().addStreamableArgument(arg1);
       
View Full Code Here

                                                                   orb.get_primitive_tc(TCKind.tk_short),
                                                                   null);
        handler1.setValue(new Short((short)456));
        CorbaStreamable arg1 = new CorbaStreamable(handler1, handler1.getName());

        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
        corbaContext.setMessage(new CorbaMessage());
        corbaContext.getMessage().addStreamableArgument(arg0);
        corbaContext.getMessage().addStreamableArgument(arg1);
       
View Full Code Here

                                                                   orb.get_primitive_tc(TCKind.tk_short),
                                                                   null);
        handler2.setValue(new Short((short)789));
        CorbaStreamable arg2 = new CorbaStreamable(handler2, handler2.getName());

        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
        corbaContext.setMessage(new CorbaMessage());
        corbaContext.getMessage().addStreamableArgument(arg0);
        corbaContext.getMessage().addStreamableArgument(arg1);
        corbaContext.getMessage().addStreamableArgument(arg2);
View Full Code Here

        // First try call the operation using a void return type
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleInParam", params));
        objContext.setMessageObjects((short)123);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
                                                        DataBindingCallback.Mode.MESSAGE,
                                                        null));
       
        // Verify that everything was marshalled correctly
        CorbaStreamable[] streamables = corbaContext.getMessage().getStreamableArguments();
        assertTrue(streamables.length == 1);
        CorbaStreamable param0 = streamables[0];
        assertTrue(param0.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param0.getMode() == ARG_IN.value);

        // Now try the call with a return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleInParamWithReturn", params));
        objContext.setMessageObjects((short)123);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

        params = new Class[0];
       
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleOutParam", params));
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
                                                        DataBindingCallback.Mode.MESSAGE,
                                                        null));
       
        // Verify that everything was marshalled correctly
        CorbaStreamable[] streamables = corbaContext.getMessage().getStreamableArguments();
        assertTrue(streamables.length == 1);
        CorbaStreamable param0 = streamables[0];
        assertTrue(param0.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param0.getMode() == ARG_OUT.value);

        // Now try the call with a return value
        params = new Class[1];
        params[0] = new Holder<Short>().getClass();
       
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleOutParamWithReturn", params));
        objContext.setMessageObjects(new Holder<Short>((short)123));
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

       
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleInOutParam", params));
        objContext.setMessageObjects(new Holder<Short>(new Short((short)123)));
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
                                                        DataBindingCallback.Mode.MESSAGE,
                                                        null));
       
        // Verify that everything was marshalled correctly
        CorbaStreamable[] streamables = corbaContext.getMessage().getStreamableArguments();
        assertTrue(streamables.length == 1);
        CorbaStreamable param0 = streamables[0];
        assertTrue(param0.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param0.getMode() == ARG_INOUT.value);
       
        // Now try the call with the return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleInOutParamWithReturn", params));
        objContext.setMessageObjects(new Holder<Short>(new Short((short)123)));
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

        Object[] paramObjs = new Object[2];
        paramObjs[0] = (short)123;
        paramObjs[1] = (short)456;
        objContext.setMessageObjects(paramObjs);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
                                                        DataBindingCallback.Mode.MESSAGE,
                                                        null));
       
        // Verify that everything was marshalled correctly
        CorbaStreamable[] streamables = corbaContext.getMessage().getStreamableArguments();
        assertTrue(streamables.length == 2);
        CorbaStreamable param0 = streamables[0];
        assertTrue(param0.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param0.getMode() == ARG_IN.value);
        CorbaStreamable param1 = streamables[1];
        assertTrue(param1.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param1.getMode() == ARG_IN.value);
       
        // Now try the call with a return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testMultipleInParamsWithReturn", params));
        objContext.setMessageObjects(paramObjs);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

        Object[] paramObjs = new Object[2];
        paramObjs[0] = new Holder<Short>((short)123);
        paramObjs[1] = new Holder<Short>((short)456);
        objContext.setMessageObjects(paramObjs);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
                                                        DataBindingCallback.Mode.MESSAGE,
                                                        null));
       
        // Verify that everything was marshalled correctly
        CorbaStreamable[] streamables = corbaContext.getMessage().getStreamableArguments();
        assertTrue(streamables.length == 2);
        CorbaStreamable param0 = streamables[0];
        assertTrue(param0.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param0.getMode() == ARG_OUT.value);
        CorbaStreamable param1 = streamables[1];
        assertTrue(param1.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param1.getMode() == ARG_OUT.value);

        // Now try the call with a return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testMultipleOutParamsWithReturn", params));
        objContext.setMessageObjects(paramObjs);
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.context.GenericMessageContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.