Examples of GenericMessageContext


Examples of org.objectweb.celtix.context.GenericMessageContext

        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_INOUT.value);
        CorbaStreamable param1 = streamables[1];
        assertTrue(param1.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param1.getMode() == ARG_INOUT.value);

        // Now try the call with a return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testMultipleInOutParamsWithReturn", 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

Examples of org.objectweb.celtix.context.GenericMessageContext

        paramObjs[0] = (short)123;
        paramObjs[1] = new Holder<Short>((short)456);
        paramObjs[2] = new Holder<Short>((short)789);
        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 == 3);
        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_OUT.value);
        CorbaStreamable param2 = streamables[2];
        assertTrue(param2.getObject().getTypeCodeKind().value() == TCKind._tk_short);
        assertTrue(param2.getMode() == ARG_INOUT.value);

        // Now try the call with a return value
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testMultipleMixedParamsWithReturn", 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

Examples of org.objectweb.celtix.context.GenericMessageContext

        Class[] params = null;
       
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testReturn", params));
       
        corbaContext = new CorbaMessageContextImpl(new GenericMessageContext());
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, true);
       
        bindingImpl.marshal(objContext,
                            corbaContext,
                            new JAXBDataBindingCallback(objContext.getMethod(),
View Full Code Here

Examples of org.objectweb.celtix.context.GenericMessageContext

    public void invoke(ServerRequest request) throws CorbaBindingException {
        try {
            CorbaMessageContext corbaCtx =
                (CorbaMessageContext)serverBinding.getBindingImpl().
                    createBindingMessageContext(new GenericMessageContext());
            corbaCtx.setMessage(new CorbaMessage());
            corbaCtx.put(ObjectMessageContext.MESSAGE_INPUT, Boolean.TRUE);

            QName operationName = new QName(request.operation());
            corbaCtx.put(MessageContext.WSDL_OPERATION, operationName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.