Package org.omg.CORBA

Examples of org.omg.CORBA.Request


            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),
                                       list,
                                       ret,
                                       exList,
                                       ctxList);
            request.send_oneway();
          
        } catch (java.lang.Exception ex) {
            throw new CorbaBindingException("Exception during invokeOneWay", ex);
        }
    }
View Full Code Here


     */
    public synchronized boolean poll_next_response()
    {
        checkShutdownState();

        Request currRequest;

        // poll on each pending request
        Enumeration ve = dynamicRequests.elements();
        while (ve.hasMoreElements() == true) {
            currRequest = (Request)ve.nextElement();
            if (currRequest.poll_response() == true) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        while (true) {
            // check if there already is a response
            synchronized ( dynamicRequests ) {
                Enumeration elems = dynamicRequests.elements();
                while ( elems.hasMoreElements() ) {
                    Request currRequest = (Request)elems.nextElement();
                    if ( currRequest.poll_response() ) {
                        // get the response for this successfully polled Request
                        currRequest.get_response();
                        dynamicRequests.removeElement(currRequest);
                        return currRequest;
                    }
                }
            }
View Full Code Here

       
        org.omg.CORBA.Object obj = control.createMock(org.omg.CORBA.Object.class);
        EasyMock.expect(message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT)).andReturn(obj);
       
        //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((Context)EasyMock.anyObject(),
                            EasyMock.eq("greetMe"),
                            EasyMock.isA(NVList.class),
                            EasyMock.isA(NamedValue.class),
                            EasyMock.isA(ExceptionList.class),
                            EasyMock.isA(ContextList.class)));
        EasyMock.expectLastCall().andReturn(r);
        r.invoke();
        EasyMock.expectLastCall();
       
        control.replay();
        Request request = conduit.getRequest(message, "greetMe", nvList, ret, exList);
        request.invoke();
        control.verify();
       
          /* try {
                ContextList ctxList = orb.create_context_list();
                Context ctx = orb.get_default_context();
View Full Code Here

        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) {
            throw new CorbaBindingException("Couldn't build the corba request");
        }
        try {
            request.invoke();
        } catch (SystemException ex) {
            message.setContent(Exception.class, new Fault(ex));
            message.setSystemException(ex);
            return;
        }
        Exception ex = request.env().exception();
        if (ex != null) {
            if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException) ex;
                Any except = userEx.except;
                RaisesType raises = exceptions.get(except.type());
View Full Code Here

                                 String opName,
                                 org.omg.CORBA.NVList nvlist,
                                 org.omg.CORBA.NamedValue ret,
                                 org.omg.CORBA.ExceptionList exList)
        throws Exception {
        Request request = null;
        if (orb == null) {
            prepareOrb();
        }
        ContextList ctxList = orb.create_context_list();
        Context ctx = null;
View Full Code Here

        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) {
            throw new CorbaBindingException("Couldn't build the corba request");
        }
        try {
            request.invoke();
        } catch (SystemException ex) {
            message.setContent(Exception.class, new Fault(ex));
            message.setSystemException(ex);
            return;
        }
        Exception ex = request.env().exception();
        if (ex != null) {
            if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException) ex;
                Any except = userEx.except;
                RaisesType raises = exceptions.get(except.type());
View Full Code Here

                                 String opName,
                                 org.omg.CORBA.NVList nvlist,
                                 org.omg.CORBA.NamedValue ret,
                                 org.omg.CORBA.ExceptionList exList)
        throws Exception {
        Request request = null;
        if (orb == null) {
            prepareOrb();
        }
        ContextList ctxList = orb.create_context_list();
        Context ctx = null;
View Full Code Here

        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) {
            throw new CorbaBindingException("Couldn't build the corba request");
        }
        try {
            request.invoke();
        } catch (SystemException ex) {
            message.setContent(Exception.class, new Fault(ex));
            message.setSystemException(ex);
            return;
        }
        Exception ex = request.env().exception();
        if (ex != null) {
            if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException) ex;
                Any except = userEx.except;
                RaisesType raises = exceptions.get(except.type());
View Full Code Here

                                 String opName,
                                 org.omg.CORBA.NVList nvlist,
                                 org.omg.CORBA.NamedValue ret,
                                 org.omg.CORBA.ExceptionList exList)
        throws Exception {
        Request request = null;
        if (orb == null) {
            prepareOrb();
        }
        ContextList ctxList = orb.create_context_list();
        Context ctx = null;
View Full Code Here

TOP

Related Classes of org.omg.CORBA.Request

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.