Package org.omg.CORBA

Examples of org.omg.CORBA.NVList


                opQName = bopInfo.getName();
                break;
            }
        }
        ServerRequest request = exchange.get(ServerRequest.class);
        NVList list = prepareArguments(message, destination, info, opType, opQName);
        request.arguments(list);
        message.setList(list);           
   
        OperationInfo opInfo = processWrappedOperation(bopInfo, false);
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, arguments, paramTypes, typeMaps);        
       
        return list;
       
    }
View Full Code Here

                                        List<ParamType> paramTypes,
                                        List<CorbaTypeMap> maps)
        throws Exception {
       
        // Build the list of DII arguments, returns, and exceptions       
        NVList list = orb.create_list(streamables.length);       
       
        prepareArgs(corbaMsg, paramTypes);
       
        for (int i = 0; i < paramTypes.size(); i++) {          
            ParamType param = paramTypes.get(i);
            QName paramIdlType = param.getIdltype();
            QName paramName = new QName("", param.getName());
            ModeType paramMode = param.getMode();
            CorbaObjectHandler obj =
                CorbaHandlerUtils.initializeObjectHandler(orb, paramName, paramIdlType, maps, service);

            streamables[i] = new CorbaStreamable(obj, paramName);
            if (paramMode.value().equals("in")) {
                streamables[i].setMode(org.omg.CORBA.ARG_IN.value);
            } else if (paramMode.value().equals("out")) {
                streamables[i].setMode(org.omg.CORBA.ARG_OUT.value);
            } else {
                streamables[i].setMode(org.omg.CORBA.ARG_INOUT.value);
            }

            Any value = orb.create_any();
            value.insert_Streamable(streamables[i]);
            list.add_value(streamables[i].getName(), value, streamables[i].getMode());
           
            corbaMsg.addStreamableArgument(streamables[i]);
        }       
        return list;
    }
View Full Code Here

        assertNotNull(arguments[0]);
        assertNotNull(arguments[1]);
        assertNotNull(arguments[2]);
        assertNotNull(arguments[3]);
       
        NVList list = orb.create_list(2);       
        Any value = orb.create_any();
        value.insert_Streamable(p1);
        list.add_value(p1.getName(), value, p1.getMode());
        value.insert_Streamable(p2);
        list.add_value(p2.getName(), value, p2.getMode());
               
        msg.setList(list);
        NVList resultList = msg.getList();
        assertTrue(resultList.count() == 2);       
       
        QName returnName = new QName("param2");
        QName returnIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "boolean", CorbaConstants.NP_WSDL_CORBA);
        TypeCode returnTypeCode = orb.get_primitive_tc(TCKind.tk_boolean);
        CorbaPrimitiveHandler returnValue = new CorbaPrimitiveHandler(returnName, returnIdlType, returnTypeCode, null);
View Full Code Here

        OperationType opType = bopInfo.getExtensor(OperationType.class);
        List<ParamType> paramTypes = opType.getParam();
                       
        inInterceptor.setOrb(orb);               
        CorbaStreamable[] streamables = new CorbaStreamable[1];   
        NVList nvlist = inInterceptor.prepareDIIArgsList(message, streamables, paramTypes, typeMaps);
        assertNotNull("NVList should not be null", nvlist != null);       
        assertEquals("There should be one item in the list", nvlist.count(), 1);
        assertEquals("Item name should be data", nvlist.item(0).name(), "data");
        assertEquals("Item flags should be 1", nvlist.item(0).flags(), 1);    
    }
View Full Code Here

        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
        }
       
        NVList nvlist = getArguments(message);
        NamedValue ret = getReturn(message);
        Map<TypeCode, RaisesType> exceptions = getOperationExceptions(opType, typeMaps);
        ExceptionList exList = getExceptionList(exceptions, message, opType, typeMaps);
        Request request = getRequest(message, opType.getName(), nvlist, ret, exList);
        if (request == null) {
View Full Code Here

        }
    }
      
    protected NVList getArguments(CorbaMessage message) {
        // 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 (int i = 0; i < arguments.length; ++i) {
                Any value = orb.create_any();
                value.insert_Streamable(arguments[i]);
                list.add_value(arguments[i].getName(), value, arguments[i].getMode());
            }
        } else {
            list = orb.create_list(0);
        }
View Full Code Here

        Exchange exg = msg.getExchange();       
        ServerRequest request = exg.get(ServerRequest.class);
        try {
            if (!exg.isOneWay()) {               
                CorbaMessage inMsg = (CorbaMessage)msg.getExchange().getInMessage();
                NVList list = inMsg.getList();

                if (msg.getStreamableException() != null) {                   
                    Any exAny = orb.create_any();
                    CorbaStreamable exception = msg.getStreamableException();
                    exAny.insert_Streamable(exception);
                    request.set_exception(exAny);
                    if (msg.getExchange() != null) {
                        msg.getExchange().setOutFaultMessage(msg);
                    }
                } else {
                    CorbaStreamable[] arguments = msg.getStreamableArguments();
                    if (arguments != null) {
                        for (int i = 0; i < arguments.length; ++i) {
                            if (list.item(i).flags() != org.omg.CORBA.ARG_IN.value) {
                                list.item(i).value().insert_Streamable(arguments[i]);
                            }  
                        }
                    }

                    CorbaStreamable resultValue = msg.getStreamableReturn();
View Full Code Here

                    _mesg = _queue.getMessageBlocking();
                }

                try
                {
                    final NVList _args;

                    if (_mesg == null)
                    {
                        _args = (NVList) invalidResponses_.get(_operation);
View Full Code Here

    private Request prepareRequest(String operation)
    {
        final Request _request = typedPullSupplier_._request(operation);

        final NVList _args = _request.arguments();

        final OperationDescription _operationDescription = getOperationDescription(operation);

        for (int x = 0; x < _operationDescription.parameters.length; ++x)
        {
            final Any _any = getORB().create_any();

            _any.type(_operationDescription.parameters[x].type);

            _args.add_value(_operationDescription.parameters[x].name, _any, ARG_OUT.value);
        }

        _request.set_return_type(_operationDescription.result);

        return _request;
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.