Package org.codehaus.xfire.aegis.type

Examples of org.codehaus.xfire.aegis.type.Type


        type.setTypeClass(ByteBean.class);
        type.setTypeMapping(mapping);
        type.setSchemaType(new QName("urn:Bean", "bean"));
   
        QName name = new QName("urn:Bean", "data");
        Type dataType = type.getTypeInfo().getType(name);
        assertNotNull(dataType);
       
        assertTrue( type.getTypeInfo().isNillable(name) );
       
        ByteBean bean = new ByteBean();
View Full Code Here


       
        TypeClassInfo info = createBasicClassInfo(clazz);
        info.setDescription(clazz.toString());
        info.setGenericType(component);
       
        Type type = createTypeForClass(info);
       
        return type;
    }
View Full Code Here

        MessagePartInfo info = (MessagePartInfo)
            service.getServiceInfo().getOperation("GetWeatherByZipCode").getInputMessage().getMessageParts().get(0);

        assertNotNull(info);
       
        Type type = (Type) info.getSchemaType();
        assertTrue(type instanceof JaxbType);
       
        assertTrue(type.isComplex());
        assertFalse(type.isWriteOuter());
       
        assertEquals(new QName("http://www.webservicex.net", "GetWeatherByZipCode"), info.getName());
       
        Document response = invokeService("WeatherService", "GetWeatherByZip.xml");
View Full Code Here

        MessagePartInfo info = (MessagePartInfo)
            service.getServiceInfo().getOperation("GetWeatherByZipCode").getInputMessage().getMessageParts().get(0);

        assertNotNull(info);
       
        Type type = (Type) info.getSchemaType();
        assertTrue(type instanceof JaxbType);
       
        assertTrue(type.isComplex());
        assertFalse(type.isWriteOuter());
       
        assertEquals(new QName("http://www.webservicex.net", "GetWeatherByZipCode"), info.getName());
       
        Document response = invokeService("WeatherService", "GetWeatherByZip.xml");
View Full Code Here

    public void testType() throws Exception
    {
        Method m = CollectionService.class.getMethod("getStrings", new Class[0]);
       
        Type type = creator.createType(m, -1);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
        QName componentName = colType.getSchemaType();
    
        assertEquals("ArrayOfString", componentName.getLocalPart());
        assertEquals("ArrayOfString", componentName.getLocalPart());
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

    public void testRecursiveCollections() throws Exception
    {
        Method m = CollectionService.class.getMethod("getStringCollections", new Class[0]);
       
        Type type = creator.createType(m, -1);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
        QName componentName = colType.getSchemaType();
    
        assertEquals("ArrayOfArrayOfString", componentName.getLocalPart());
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType2 = (CollectionType) type;
        componentName = colType2.getSchemaType();
    
        assertEquals("ArrayOfString", componentName.getLocalPart());
       
        type = colType2.getComponentType();
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

   
    public void testPDType() throws Exception
    {
        PropertyDescriptor pd =
            Introspector.getBeanInfo(CollectionDTO.class, Object.class).getPropertyDescriptors()[0];
        Type type = creator.createType(pd);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

        CustomTypeMapping tm = new CustomTypeMapping();
        Java5TypeCreator creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
       
        Type dto = creator.createType(CollectionDTO.class);
        Set deps = dto.getDependencies();
       
        Type type = (Type) deps.iterator().next();

        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        deps = dto.getDependencies();
        assertEquals(1, deps.size());
       
        Type comType = colType.getComponentType();
        assertEquals(String.class, comType.getTypeClass());
    }
View Full Code Here

        CustomTypeMapping tm = new CustomTypeMapping();
        Java5TypeCreator creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
       
        Type dto = creator.createType(ObjectDTO.class);
        Set deps = dto.getDependencies();
                              
        assertFalse( deps.isEmpty() );

        Type type = (Type) deps.iterator().next();

        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        deps = dto.getDependencies();
        assertEquals(1, deps.size());
       
        Type comType = colType.getComponentType();
        assertEquals(Object.class, comType.getTypeClass());
    }
View Full Code Here

       
        if( heldCls == null){
          return super.createHolderType(info);
        }
        info.setTypeClass(heldCls);
        Type delegate = createTypeForClass(info);

        HolderType type = new HolderType(delegate);
        return type;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.aegis.type.Type

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.