Package org.omg.CORBA

Examples of org.omg.CORBA.NVList


        }
        return result;
    }

    public static NVList nvListFromStreamables(ORB orb, CorbaStreamable[] streamables) {
        NVList list = null;
        if (streamables != null && streamables.length > 0) {
            list = orb.create_list(streamables.length);
            for (int i = 0; i < streamables.length; ++i) {
                Any value = orb.create_any();
                value.insert_Streamable(streamables[i]);
                list.add_value(streamables[i].getName(), value, streamables[i].getMode());
            }
        } else {
            list = orb.create_list(0);
        }
        return list;
View Full Code Here


        }

        orb = exchange.get(ORB.class);

        ServerRequest request = exchange.get(ServerRequest.class);
        NVList list = prepareArguments(message, info, opType,
                                       opQName, typeMap,
                                       destination, service);
        request.arguments(list);
        message.setList(list);
View Full Code Here

        corbaMsg.put(MessageInfo.class, opInfo.getInput());
                      
        List<ParamType> paramTypes = opType.getParam();      
        CorbaStreamable[] arguments = new CorbaStreamable[paramTypes.size()];                              
        NVList list = prepareDIIArgsList(corbaMsg, bOpInfo,
                                         arguments, paramTypes,
                                         typeMap,
                                         exg.get(ORB.class), service);        
       
        return list;
View Full Code Here

                                        CorbaTypeMap map,
                                        ORB orb,
                                        ServiceInfo service) {
        try {
            // Build the list of DII arguments, returns, and exceptions       
            NVList list = orb.create_list(streamables.length);       

            OperationInfo opInfo = boi.getOperationInfo();
            MessageInfo input = opInfo.getInput();         
            MessageInfo output = opInfo.getOutput();
       
            String inWrapNSUri = null;
            String outWrapNSUri = null;

            boolean wrap = false;
            if (boi.isUnwrappedCapable()) {
                wrap = true;
                if (input != null) {
                    inWrapNSUri = getWrappedParamNamespace(input);
                    if (!CorbaUtils.isElementFormQualified(service, inWrapNSUri)) {
                        inWrapNSUri = "";
                    }
                }
                if (output != null) {
                    outWrapNSUri = getWrappedParamNamespace(output);
                    if (!CorbaUtils.isElementFormQualified(service, outWrapNSUri)) {
                        outWrapNSUri = "";
                    }
                }
            }

            int inMsgIndex = 0;
            int outMsgIndex = 0;
            for (int i = 0; i < paramTypes.size(); i++) {
                ParamType param = paramTypes.get(i);
                QName paramIdlType = param.getIdltype();
                QName paramName;
                ModeType paramMode = param.getMode();
                if (paramMode.value().equals("in")) {
                    if (wrap) {
                        paramName = new QName(inWrapNSUri, param.getName());
                    } else {
                        paramName = getMessageParamQName(input, param.getName(), inMsgIndex);
                        inMsgIndex++;
                    }
                } else {
                    if (wrap) {
                        paramName = new QName(outWrapNSUri, param.getName());
                    } else {
                        paramName = getMessageParamQName(output, param.getName(), outMsgIndex);
                        outMsgIndex++;
                    }
                }
                CorbaObjectHandler obj =
                    CorbaHandlerUtils.initializeObjectHandler(orb, paramName, paramIdlType, map, service);
                streamables[i] = corbaMsg.createStreamableObject(obj, paramName);

                Any value = CorbaAnyHelper.createAny(orb);
                if (paramMode.value().equals("in")) {
                    streamables[i].setMode(org.omg.CORBA.ARG_IN.value);
                    streamables[i].getObject().setIntoAny(value, streamables[i], false);
                } else if (paramMode.value().equals("out")) {
                    streamables[i].setMode(org.omg.CORBA.ARG_OUT.value);
                    streamables[i].getObject().setIntoAny(value, streamables[i], true);
                } else {
                    streamables[i].setMode(org.omg.CORBA.ARG_INOUT.value);
                    streamables[i].getObject().setIntoAny(value, streamables[i], false);
                }

                list.add_value(streamables[i].getName(), value, streamables[i].getMode());             
                corbaMsg.addStreamableArgument(streamables[i]);
            }
            return list;
        } catch (Exception ex) {
            throw new RuntimeException(ex);
View Full Code Here

        }
        return result;
    }

    public static NVList nvListFromStreamables(ORB orb, CorbaStreamable[] streamables) {
        NVList list = null;
        if (streamables != null && streamables.length > 0) {
            list = orb.create_list(streamables.length);
            for (int i = 0; i < streamables.length; ++i) {
                Any value = orb.create_any();
                value.insert_Streamable(streamables[i]);
                list.add_value(streamables[i].getName(), value, streamables[i].getMode());
            }
        } else {
            list = orb.create_list(0);
        }
        return list;
View Full Code Here

        }
        return result;
    }

    public static NVList nvListFromStreamables(ORB orb, CorbaStreamable[] streamables) {
        NVList list = null;
        if (streamables != null && streamables.length > 0) {
            list = orb.create_list(streamables.length);
            for (int i = 0; i < streamables.length; ++i) {
                Any value = orb.create_any();
                value.insert_Streamable(streamables[i]);
                list.add_value(streamables[i].getName(), value, streamables[i].getMode());
            }
        } else {
            list = orb.create_list(0);
        }
        return list;
View Full Code Here

    private NVList getExpectedParamList(String operation)
    {
        final OperationDescription _operation = getOperationDescription(operation);

        final NVList _expectedParams = getORB().create_list(_operation.parameters.length);

        for (int x = 0; x < _operation.parameters.length; ++x)
        {
            Any _value = getORB().create_any();

            _value.type(_operation.parameters[x].type);

            _expectedParams.add_value(_operation.parameters[x].name, _value,
                    ParameterMode._PARAM_IN);
        }

        return _expectedParams;
    }
View Full Code Here

            supportedInterfaces_ = new String[] { supportedInterface_ };
        }

        public void invoke(ServerRequest request)
        {
            final NVList _params = getExpectedParamList(request.operation());

            request.arguments(_params);

            final String _operationName = getFullQualifiedName(request.operation());
View Full Code Here

        control.verify();
    }       
               
    @Test
    public void testBuildRequestResult() {
        NVList list = orb.create_list(0);       
        CorbaServerConduit conduit = setupCorbaServerConduit(false)
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);       
        ServerRequest request = control.createMock(ServerRequest.class);
       
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void testBuildRequestResultException() {
        NVList list = orb.create_list(0);       
        CorbaServerConduit conduit = setupCorbaServerConduit(false)
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);       
        ServerRequest request = control.createMock(ServerRequest.class);
       
View Full Code Here

TOP

Related Classes of org.omg.CORBA.NVList

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.