Package org.apache.schemas.yoko.bindings.corba

Examples of org.apache.schemas.yoko.bindings.corba.OperationType


           
    protected void handleNotRequestMessage(CorbaMessage message,
                                           CorbaDestination destination)
        throws Exception {
        QName opQName = null;
        OperationType opType = null;
        BindingInfo bInfo = destination.getBindingInfo();             
        InterfaceInfo info = bInfo.getInterface();       
        EventDataReader reader = (EventDataReader) ContextUtils.getDataReader(message);
        
        Exchange exchange = message.getExchange();
View Full Code Here


    }
   
    protected void handleRequestMessage(CorbaMessage message,
                                        CorbaDestination destination)
        throws Exception {
        OperationType opType = null;
       
        orb = (org.omg.CORBA.ORB) message.get(CorbaConstants.ORB)
        if (corbaStaxObject != null) {
            corbaStaxObject.setOrb(orb);
        } else {
            corbaStaxObject = new CorbaStaxObject(orb);
        }
        if (message.getStreamableException() != null) {
            Endpoint ep = message.getExchange().get(Endpoint.class);
            message.getInterceptorChain().abort();
            if (ep.getInFaultObserver() != null) {
                ep.getInFaultObserver().onMessage(message);
                return;
            }
        }

        EventDataReader reader;
        reader = (EventDataReader) ContextUtils.getDataReader(message);
        BindingInfo bInfo = destination.getBindingInfo();             
        InterfaceInfo info = bInfo.getInterface();
       
        Exchange exchange = message.getExchange();
        BindingOperationInfo bopInfo = exchange.get(BindingOperationInfo.class);

        // Handle the parameters that are given for the operation
        List<ParamType> paramTypes = null;    
        ArgType argType = null;
       
        if (opType != null) {
            paramTypes = opType.getParam();    
            argType = opType.getReturn();
        }
        CorbaMessage outMessage = (CorbaMessage)exchange.getOutMessage();
       
        opType = bopInfo.getExtensor(OperationType.class);
View Full Code Here

            String opName = message.getExchange().get(String.class);
               
            Iterator iter = bInfo.getOperations().iterator();

            BindingOperationInfo bopInfo = null;
            OperationType opType = null;          
            while (iter.hasNext()) {
                bopInfo = (BindingOperationInfo)iter.next();
                if (bopInfo.getName().getLocalPart().equals(opName)) {
                    opType = bopInfo.getExtensor(OperationType.class);
                    break;
                }
            }
            if (opType == null) {
                throw new CorbaBindingException("Unable to find operation definition");
            }

            OperationInfo opInfo = bopInfo.getOperationInfo();

            QName exIdlType = null;
            List<RaisesType> exList = opType.getRaises();
            for (Iterator<RaisesType> i = exList.iterator(); i.hasNext();) {
                // REVISIT: Note that this assumes that exception names need to
                // be unique. We should make
                // sure that this is really the case.
                RaisesType raises = i.next();
View Full Code Here

        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exg = control.createMock(Exchange.class);
        EasyMock.expect(msg.getExchange()).andReturn(exg);
        BindingOperationInfo bopInfo = control.createMock(BindingOperationInfo.class);
        EasyMock.expect(exg.get(BindingOperationInfo.class)).andReturn(bopInfo);
        OperationType opType = control.createMock(OperationType.class);
        bopInfo.getExtensor(OperationType.class);
        EasyMock.expectLastCall().andReturn(opType);
        conduit.buildRequest(msg, opType);
        EasyMock.expectLastCall();
        OutputStream os =control.createMock(OutputStream.class);
View Full Code Here

        assertTrue("EndpointReferenceType should not be null", endpoint != null);
    }
   
    public void testGetOperationExceptions() {   
        CorbaConduit conduit = control.createMock(CorbaConduit.class);   
        OperationType opType = control.createMock(OperationType.class);
        List<CorbaTypeMap> typeMaps = control.createMock(List.class);
       
        Map<TypeCode, RaisesType> exceptions = control.createMock(HashMap.class);
        List<RaisesType> exlist = control.createMock(ArrayList.class);               
        opType.getRaises();
        EasyMock.expectLastCall().andReturn(exlist);
        int i = 0;
        EasyMock.expect(exlist.size()).andReturn(i);       
        RaisesType rType = control.createMock(RaisesType.class);       
        EasyMock.expect(exlist.get(0)).andReturn(rType);
View Full Code Here

        EasyMock.expect(exchange.get(ServiceInfo.class)).andReturn(service);
        List<CorbaTypeMap> list = control.createMock(List.class);
        List<CorbaTypeMap> typeMaps = control.createMock(List.class);
        EasyMock.expect(service.getExtensors(CorbaTypeMap.class)).andReturn(list);               
       
        OperationType opType = control.createMock(OperationType.class);
        conduit.getArguments(message);
        EasyMock.expectLastCall().andReturn(null)
        conduit.getReturn(message);
        EasyMock.expectLastCall().andReturn(null);
        conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
View Full Code Here

    public void testBuildExceptionListEmpty() throws Exception {
        CorbaConduit conduit = setupCorbaConduit(false);
        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);
View Full Code Here

        TestUtils testUtils = new TestUtils();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        EndpointInfo endpointInfo = destination.getEndPointInfo();
        QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
        BindingOperationInfo bInfo = destination.getBindingInfo().getOperation(name);
        OperationType opType = bInfo.getExtensor(OperationType.class);
       
        List<TypeMappingType> corbaTypes =
            endpointInfo.getService().getDescription().getExtensors(TypeMappingType.class);       
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
View Full Code Here

    }
   
   
    protected void handleOutBoundMessage(CorbaMessage message, BindingOperationInfo boi)
        throws Exception {
        OperationType opType = boi.getExtensor(OperationType.class);
        EventDataWriter writer = (EventDataWriter)getDataWriter(message);
        List<ParamType> paramTypes = opType.getParam();
        List<Object> args = message.getContent(List.class);
        MessageInfo msgInfo = message.get(MessageInfo.class);
        addMarshalRequestParams(message,
                                args,
                                boi,
                                paramTypes,
                                getXMLInputFactory(),
                                getXMLOutputFactory(),
                                writer);

        ArgType returnParam = opType.getReturn();
        if (returnParam != null) {
            QName retIdlType = returnParam.getIdltype();
            QName retName = new QName("", returnParam.getName());
            CorbaObjectHandler obj = CorbaHandlerUtils
                .initializeObjectHandler(orb, retName, retIdlType, typeMaps, service);
View Full Code Here

        }
    }
   
    protected void handleInBoundMessage(CorbaMessage message, BindingOperationInfo boi)
        throws Exception {
        OperationType opType = boi.getExtensor(OperationType.class);
        EventDataWriter writer = (EventDataWriter)getDataWriter(message);
        ArgType returnParam = opType.getReturn();
        List<Object> args = message.getContent(List.class);
        addMarshalResponseParams(message,
                                 args,
                                 boi,
                                 opType,
View Full Code Here

TOP

Related Classes of org.apache.schemas.yoko.bindings.corba.OperationType

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.