Package org.apache.yoko.bindings.corba

Examples of org.apache.yoko.bindings.corba.CorbaDestination


    public void handleMessage(Message msg) {
        try {
            CorbaMessage message = (CorbaMessage) msg;
              
            CorbaDestination destination = null;
            if (message.getDestination() != null) {
                destination = (CorbaDestination)message.getDestination();
            } else {
                destination = (CorbaDestination)message.getExchange().getDestination();
            }
       
            typeMaps = new ArrayList<CorbaTypeMap>();               
            service = destination.getBindingInfo().getService();
            List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
            if (corbaTypes != null) {
                CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
                corbaStaxObject.setTypeMaps(typeMaps);
                corbaStaxObject.setServiceInfo(service);
View Full Code Here


    public void handleMessage(Message msg) {
        try {
            CorbaMessage message = (CorbaMessage)msg;
            EventDataWriter writer = (EventDataWriter)ContextUtils.getDataWriter(message);

            CorbaDestination destination = null;
            if (message.getDestination() != null) {
                destination = (CorbaDestination)message.getDestination();
            } else {
                destination = (CorbaDestination)message.getExchange().getDestination();
            }

            org.omg.CORBA.ORB orb = (org.omg.CORBA.ORB) message.get(CorbaConstants.ORB);
            if (orb == null) {
                orb = (org.omg.CORBA.ORB) message.getExchange().get(org.omg.CORBA.ORB.class);
            }
            corbaStaxObject.setOrb(orb);

            List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();               
            ServiceInfo service = destination.getBindingInfo().getService();       
            List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
            if (corbaTypes != null) {
                CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
                corbaStaxObject.setTypeMaps(typeMaps);
                corbaStaxObject.setServiceInfo(service);
            }

            Throwable ex = message.getContent(Exception.class);
            ex = ex.getCause();
            if (ex instanceof InvocationTargetException) {
                ex = ex.getCause();
            }

            // Get information about the operation being invoked from the WSDL
            // definition.
            // We need this to marshal data correctly

            BindingInfo bInfo = destination.getBindingInfo();
            InterfaceInfo info = bInfo.getInterface();       
       
            String opName = message.getExchange().get(String.class);
               
            Iterator iter = bInfo.getOperations().iterator();
View Full Code Here

        Method m = CorbaInInterceptor.class.getDeclaredMethod("handleNotRequestMessage",
                new Class[] {CorbaMessage.class, CorbaDestination.class});                                                      
        CorbaInInterceptor inInterceptor = EasyMock.createMock(CorbaInInterceptor.class, new Method[] {m});      
                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class)
        EasyMock.expect(msg.getDestination()).andReturn(destination).times(2);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
       
        inInterceptor.handleNotRequestMessage(msg, destination);
View Full Code Here

        Method m = CorbaInInterceptor.class.getDeclaredMethod("handleRequestMessage",
                new Class[] {CorbaMessage.class, CorbaDestination.class});                                                      
        CorbaInInterceptor inInterceptor = EasyMock.createMock(CorbaInInterceptor.class, new Method[] {m});      
                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class);  
        EasyMock.expect(msg.getDestination()).andReturn(destination).times(2);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
        EasyMock.expect(msg.containsKey(Message.REQUESTOR_ROLE)).andReturn(true);
       
View Full Code Here

        Method m = CorbaInInterceptor.class.getDeclaredMethod("handleRequestMessage",
                new Class[] {CorbaMessage.class, CorbaDestination.class});                                                      
         CorbaInInterceptor inInterceptor = EasyMock.createMock(CorbaInInterceptor.class, new Method[] {m});      
                                                   
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        DescriptionInfo dInfo = control.createMock(DescriptionInfo.class)
        EasyMock.expect(msg.getDestination()).andReturn(null);
        Exchange exchange = control.createMock(Exchange.class);
        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.getDestination()).andReturn(destination);       
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(bInfo.getService()).andReturn(sInfo);
        EasyMock.expect(dInfo.getExtensors(TypeMappingType.class)).andReturn(null);
        EasyMock.expect(sInfo.getDescription()).andReturn(dInfo);
        EasyMock.expect(msg.containsKey(Message.REQUESTOR_ROLE)).andReturn(true);
       
View Full Code Here

                                         CorbaStreamable[].class,
                                         List.class, List.class});                                                                                  
        CorbaInInterceptor inInterceptor = control.createMock(CorbaInInterceptor.class,
                                             new Method[] {m});
                                                                                                                      
        CorbaDestination destination = control.createMock(CorbaDestination.class);
        EndpointInfo endpointInfo = control.createMock(EndpointInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        InterfaceInfo info = control.createMock(InterfaceInfo.class);
        BindingOperationInfo bopInfo = control.createMock(BindingOperationInfo.class);
        OperationInfo opInfo = control.createMock(OperationInfo.class);
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(destination.getEndPointInfo()).andReturn(endpointInfo);               
        QName qname = new QName("" , "Test", "");
        EasyMock.expect(bInfo.getOperation(qname)).andReturn(bopInfo);
        EasyMock.expect(bopInfo.getOperationInfo()).andReturn(opInfo);                       
        CorbaMessage message = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);
        EndpointReferenceType etype = control.createMock(EndpointReferenceType.class);
        MessageInfo mInfo = control.createMock(MessageInfo.class);
        EasyMock.expect(message.getExchange()).andReturn(exchange);     
        EasyMock.expect(destination.getAddress()).andReturn(etype);
        EasyMock.expect(opInfo.getInput()).andReturn(mInfo);
        exchange.setInMessage(message);
        EasyMock.expectLastCall();       
        OperationType opType = control.createMock(OperationType.class);
        List<ParamType> paramTypes = control.createMock(List.class);
View Full Code Here

        CorbaInInterceptor inInterceptor = new CorbaInInterceptor();
        CorbaStaxObject corbaStaxObject = new CorbaStaxObject();
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        ServiceInfo service = destination.getBindingInfo().getService();       
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
            corbaStaxObject.setTypeMaps(typeMaps);
        }
       
        QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
        BindingInfo bInfo = destination.getBindingInfo();
        BindingOperationInfo bopInfo = bInfo.getOperation(name);       
        OperationType opType = bopInfo.getExtensor(OperationType.class);
        List<ParamType> paramTypes = opType.getParam();
                       
        inInterceptor.setOrb(orb);               
View Full Code Here

        orb = ORB.init(new String[0], props);
       
        TestUtils testUtils = new TestUtils();
        typeMaps = new ArrayList<CorbaTypeMap>();
        //CorbaDestination destination = (CorbaDestination)getDestination();
        CorbaDestination destination = testUtils.getComplexTypesTestDestination();
        service = destination.getBindingInfo().getService();
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);       
        CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
    }
View Full Code Here

TOP

Related Classes of org.apache.yoko.bindings.corba.CorbaDestination

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.