Examples of ExceptionList


Examples of org.omg.CORBA.ExceptionList

        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        OperationType opType = new OperationType();
        opType.setName("review_data");
        ExceptionList exList = conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
                                                        message,
                                                        opType,
                                                        typeMaps);
        assertNotNull("ExcepitonList is not null", exList != null);
        assertEquals("The list should be empty", exList.count(), 0);       
    }
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

            endpointInfo.getService().getDescription().getExtensors(TypeMappingType.class);       
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
        }
       
        ExceptionList exList = conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
                                                        message,
                                                        opType,
                                                        typeMaps);
       
        assertNotNull("ExcepitonList is not null", exList != null);
        assertNotNull("TypeCode is not null", exList.item(0) != null);
        assertEquals("ID should be equal", exList.item(0).id(), "IDL:BadRecord:1.0");
        assertEquals("ID should be equal", exList.item(0).name(), "BadRecord");
        assertEquals("ID should be equal", exList.item(0).member_count(), 2);
        assertEquals("ID should be equal", exList.item(0).member_name(0), "reason");
        assertNotNull("Member type is not null", exList.item(0).member_type(0) != null);               
    }
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

       
        //msg.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, obj);       
        Request r = control.createMock(Request.class);       
        NVList nvList = (NVList)orb.create_list(0);
        NamedValue ret = control.createMock(NamedValue.class);
        ExceptionList exList = control.createMock(ExceptionList.class);       
       
        EasyMock.expect(obj._create_request(EasyMock.isA(Context.class),
                            EasyMock.eq("greetMe"),
                            EasyMock.isA(NVList.class),
                            EasyMock.isA(NamedValue.class),
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

        }
       
        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) {
            throw new CorbaBindingException("Couldn't build the corba request");
        }
        request.invoke();
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

                                             CorbaMessage message,
                                             OperationType opType,
                                             List<CorbaTypeMap> typeMaps) {
        // Get the typecodes for the exceptions this operation can throw.
        // These are defined in the operation definition from WSDL.
        ExceptionList exList = orb.create_exception_list();

              
        if (exceptions != null) {
            Object[] tcs = null;
            tcs = exceptions.keySet().toArray();
       
            for (int i = 0; i < exceptions.size(); ++i) {
                exList.add((TypeCode)tcs[i]);
            }
        }
        return exList;
    }
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

  public void testSystemException()
  {
    try
      {
        ExceptionList exList = orb.create_exception_list();
        exList.add(ourUserExceptionHelper.type());

        Request rq =
          object._create_request(null, "throwException", orb.create_list(1),
                                 null, exList, null
                                );
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

               throw stdWrapper.piOperationNotSupported2() ;
            }

            // Get the list of exceptions from DII request data, If there are
            // no exceptions raised then this method will return null.
            ExceptionList excList = request.exceptions( );
            int count = excList.count();
            TypeCode[] excTCList = new TypeCode[count];
            try {
                for( int i = 0; i < count; i++ ) {
                    excTCList[i] = excList.item( i );
                }
            } catch( Exception e ) {
                throw wrapper.exceptionInExceptions( e ) ;
            }
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

    {
        if (! isDIIRequest()) {
            return null;
        }

        ExceptionList _exceptions = diiRequest.exceptions();

        try {
            // Find the typecode for the exception
            for (int i=0; i<_exceptions.count() ; i++) {
                TypeCode tc = _exceptions.item(i);
                if ( tc.id().equals(repoId) ) {
                    // Since we dont have the actual user exception
                    // class, the spec says we have to create an
                    // UnknownUserException and put it in the
                    // environment.
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

                ret = orb.create_named_value("return", orb.create_any(), org.omg.CORBA.ARG_OUT.value);
            }

            // Get the typecodes for the exceptions this operation can throw.  These are defined in the
            // operation definition from WSDL.
            ExceptionList exList = orb.create_exception_list();
            OperationType operation = CorbaUtils.getCorbaOperationType(callback.getOperationName(),
                                                                       bus,
                                                                       endpointRef);

            if (operation == null) {
                throw new CorbaBindingException("Unable to obtain operation definition");
            }

            Map<TypeCode, RaisesType> exceptions = getOperationExceptions(operation);
            Object[] tcs = exceptions.keySet().toArray();
            for (int i = 0; i < exceptions.size(); ++i) {
                exList.add((TypeCode) tcs[i]);
            }

            Request request =
                target._create_request(ctx,
                                       (String)objectCtx.get(ObjectMessageContext.WSDL_OPERATION),
View Full Code Here

Examples of org.omg.CORBA.ExceptionList

                ret = orb.create_named_value("return", orb.create_any(), org.omg.CORBA.ARG_OUT.value);
            }

            // Get the typecodes for the exceptions this operation can throw.  These are defined in the
            // operation definition from WSDL.
            ExceptionList exList = orb.create_exception_list();
            OperationType operation = CorbaUtils.getCorbaOperationType(callback.getOperationName(),
                                                                       bus,
                                                                       endpointRef);

            if (operation == null) {
                throw new CorbaBindingException("Unable to obtain operation definition");
            }

            Map<TypeCode, RaisesType> exceptions = getOperationExceptions(operation);
            Object[] tcs = exceptions.keySet().toArray();
            for (int i = 0; i < exceptions.size(); ++i) {
                exList.add((TypeCode) tcs[i]);
            }

            Request request =
                target._create_request(ctx,
                                       (String)objectCtx.get(ObjectMessageContext.WSDL_OPERATION),
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.