FileDocCategorySizeDatePackage
TestAutoTypes.javaAPI DocApache Axis 1.41635Sat Apr 22 18:57:28 BST 2006test.encoding

TestAutoTypes

public class TestAutoTypes extends TestCase
Test auto-typing.

Fields Summary
private org.apache.axis.server.AxisServer
server
Constructors Summary
public TestAutoTypes(String name)


       
        super(name);
    
Methods Summary
public voidtestAutoTypes()

        TypeMappingRegistry tmr = server.getTypeMappingRegistry();
        TypeMappingDelegate tm = (TypeMappingDelegate)tmr.getDefaultTypeMapping();
        tm.setDoAutoTypes(true);
        
        QName qname = tm.getTypeQName( AttributeBean.class );
        assertEquals( "http://encoding.test",
                      qname.getNamespaceURI() );
        assertEquals( "AttributeBean", qname.getLocalPart() );
        
        assertTrue( tm.getDeserializer(qname) != null );
        assertTrue( tm.getSerializer(AttributeBean.class) != null );

        assertEquals(
            "http://encoding.test",
            Namespaces.makeNamespace(AttributeBean[].class.getName()));
        assertEquals(
            "AttributeBean[]",
            Types.getLocalNameFromFullName(AttributeBean[].class.getName()));

//        qname = tm.getTypeQName( AttributeBean[].class );
//        assertEquals( "http://encoding.test", 
//                      qname.getNamespaceURI() );
//        assertEquals( "AttributeBean[]", qname.getLocalPart() );