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

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


        while (bOp.hasNext()) {
            assertEquals(bindingOperation.getBindingInput().getName(), "op_k");
            assertEquals(bindingOperation.getBindingOutput().getName(), "op_kResponse");
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_k");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("fixed_1", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(0);

                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 31, fixed
                    .getDigits());
View Full Code Here


    private void checkFixedTypeTwo(BindingOperation bindingOperation, TypeMappingType mapType) {
        Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_m");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("X.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(2);
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 10, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 2, fixed.getScale());
View Full Code Here

    private void checkFixedTypeThree(BindingOperation bindingOperation, TypeMappingType mapType) {
        Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();           
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_n");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("Z.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(1);
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 6, fixed.getScale());
View Full Code Here

        Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
     
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "extended_op_m");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.getStructOrExceptionOrUnion().get(3);
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 2, fixed.getScale());
View Full Code Here

            }                      
            Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
            while (bOp.hasNext()) {    
                ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
                if (extElement.getElementType().getLocalPart().equals("operation")) {
                    OperationType corbaOpType = (OperationType)extElement;                
                    assertEquals(corbaOpType.getName(), "review_data");
                    assertEquals(1, corbaOpType.getParam().size());
                    assertEquals(corbaOpType.getRaises().get(0).getException().getLocalPart(),
                                 "TestException.BadRecordException");
                    assertEquals(corbaOpType.getRaises().get(1).getException().getLocalPart(),
                        "MyExceptionMessage");                         
                }
            }
        }           
    }
View Full Code Here

           
            Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
            while (bOp.hasNext()) {    
                ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
                if (extElement.getElementType().getLocalPart().equals("operation")) {
                    OperationType corbaOpType = (OperationType)extElement;                
                    assertEquals(corbaOpType.getName(), "echoString");
                    assertEquals(3, corbaOpType.getParam().size());
                    assertEquals(corbaOpType.getReturn().getName(), "return");
                    assertEquals(corbaOpType.getReturn().getIdltype(), CorbaConstants.NT_CORBA_STRING);
                    assertEquals(corbaOpType.getParam().get(0).getName(), "x");
                    assertEquals(corbaOpType.getParam().get(0).getMode().value(), "in");
                    QName qname =
                        new QName("http://schemas.apache.org/tests/corba/typemap/", "StringEnum1", "ns1");
                    assertEquals(corbaOpType.getParam().get(0).getIdltype(), qname);
                }
            }
        }           
    }
View Full Code Here

        assertEquals(bindingOp.getBindingOutput().getName(), "_get_string_attributeResponse");
        Iterator bOp = bindingOp.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {    
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;                
                assertEquals(corbaOpType.getName(), "_get_string_attribute");               
                assertEquals(corbaOpType.getReturn().getName(), "return");
                assertEquals(corbaOpType.getReturn().getIdltype(), CorbaConstants.NT_CORBA_STRING);
            }
        }
    }
View Full Code Here

        assertEquals(bindingOp.getBindingOutput().getName(), "_get_test_idResponse");
        Iterator bOp = bindingOp.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {    
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;                
                assertEquals(corbaOpType.getName(), "_get_test_id");               
                assertEquals(corbaOpType.getReturn().getName(), "return");
                assertEquals(corbaOpType.getReturn().getIdltype(), CorbaConstants.NT_CORBA_FLOAT);
            }
        }
    }
View Full Code Here

        assertEquals(bindingOp.getBindingOutput().getName(), "_set_test_idResponse");
        Iterator bOp = bindingOp.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {    
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;                
                assertEquals(corbaOpType.getName(), "_set_test_id");    
                assertEquals(1, corbaOpType.getParam().size());               
                assertEquals(corbaOpType.getParam().get(0).getName(), "_arg");
                assertEquals(corbaOpType.getParam().get(0).getMode().value(), "in");
                assertEquals(corbaOpType.getParam().get(0).getIdltype(), CorbaConstants.NT_CORBA_FLOAT);
            }
        }
    }
View Full Code Here

        assertEquals(bindingOp.getBindingOutput().getName(), "test_voidResponse");
        Iterator bOp = bindingOp.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {    
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;                
                assertEquals(corbaOpType.getName(), "test_void");    
                assertEquals(0, corbaOpType.getParam().size());                               
            }
        }
    }           
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.