Examples of NVList


Examples of org.omg.CORBA.NVList

        return endpointInfo.getAddress();
    }
       
    public void buildRequest(CorbaMessage message, OperationType opType) throws Exception {       
        ServiceInfo service = message.getExchange().get(ServiceInfo.class);
        NVList nvlist = getArguments(message);
        NamedValue ret = getReturn(message);
        Map<TypeCode, RaisesType> exceptions = getOperationExceptions(opType, typeMap);
        ExceptionList exList = getExceptionList(exceptions, message, opType);
        Request request = getRequest(message, opType.getName(), nvlist, ret, exList);
        if (request == null) {
View Full Code Here

Examples of org.omg.CORBA.NVList

    public NVList getArguments(CorbaMessage message) {
        if (orb == null) {
            prepareOrb();
        }
        // Build the list of DII arguments, returns, and exceptions
        NVList list = null;
        if (message.getStreamableArguments() != null) {
            CorbaStreamable[] arguments = message.getStreamableArguments();
            list = orb.create_list(arguments.length);

            for (CorbaStreamable argument : arguments) {
                Any value = CorbaAnyHelper.createAny(orb);
                argument.getObject().setIntoAny(value, argument, true);
                list.add_value(argument.getName(), value, argument.getMode());
            }
        } else {
            list = orb.create_list(0);
        }
View Full Code Here

Examples of org.omg.CORBA.NVList

        }

        orb = (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

Examples of org.omg.CORBA.NVList

        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

Examples of org.omg.CORBA.NVList

                                        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

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

Examples of org.omg.CORBA.NVList

        }

        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

Examples of org.omg.CORBA.NVList

        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

Examples of org.omg.CORBA.NVList

                                        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

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
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.