Package org.apache.axis.encoding.ser

Examples of org.apache.axis.encoding.ser.BeanSerializerFactory


   
    public void testXMLP4() throws Exception {
        Call call = new Call(RPC_ENDPOINT);
        call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
        call.registerTypeMapping(SOAPStruct.class, SOAPSTRUCT_QNAME,
                                 new BeanSerializerFactory(SOAPStruct.class, SOAPSTRUCT_QNAME),
                                 new BeanDeserializerFactory(SOAPStruct.class, SOAPSTRUCT_QNAME));
        call.addParameter(new QName("", "inputFloat"),
                          Constants.XSD_FLOAT, ParameterMode.IN);
        call.addParameter(new QName("", "inputInteger"),
                          Constants.XSD_INT, ParameterMode.IN);
View Full Code Here


                                             Constants.XSD_NMTOKENS)
        );

        // a xsd:NOTATION
        myRegister(Constants.XSD_NOTATION, org.apache.axis.types.Notation.class,
                   new BeanSerializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION),
                   new BeanDeserializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION)
        );

        // a xsd:XSD_ENTITY
        myRegister(Constants.XSD_ENTITY, org.apache.axis.types.Entity.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY)
        );

        // a xsd:XSD_ENTITIES
        myRegister(Constants.XSD_ENTITIES, org.apache.axis.types.Entities.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES)
        );

        // a xsd:XSD_IDREF
        myRegister(Constants.XSD_IDREF, org.apache.axis.types.IDRef.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF)
        );

        // a xsd:XSD_XSD_IDREFS
        myRegister(Constants.XSD_IDREFS, org.apache.axis.types.IDRefs.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS)
        );
       
        // a xsd:Duration
        myRegister(Constants.XSD_DURATION, org.apache.axis.types.Duration.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION),
                   new SimpleDeserializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION)
        );
       
        // a xsd:anyURI
        myRegister(Constants.XSD_ANYURI, org.apache.axis.types.URI.class,
                   new SimpleSerializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI),
                   new SimpleDeserializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI)
        );

        // a xsd:schema
        myRegister(Constants.XSD_SCHEMA, org.apache.axis.types.Schema.class,
                   new BeanSerializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA),
                   new BeanDeserializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA)
        );
       
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp(false); // don't deploy here
        TypeMapping tm = (TypeMapping)config.getTypeMappingRegistry().
                getDefaultTypeMapping();
        tm.register(BeanFault.class, TYPE_QNAME,
                    new BeanSerializerFactory(BeanFault.class, TYPE_QNAME),
                    new BeanDeserializerFactory(BeanFault.class, TYPE_QNAME));
        deploy("service", this.getClass(), Style.WRAPPED);
        //tm.register(BeanFault2.class, TYPE_QNAME,
        //            new BeanSerializerFactory(BeanFault2.class, TYPE_QNAME),
        //            new BeanDeserializerFactory(BeanFault2.class, TYPE_QNAME));
View Full Code Here

        Call call = getCall();
        call.setOperationStyle("wrapped");
        call.setOperationUse("literal");
        call.setEncodingStyle("");
        call.registerTypeMapping(BeanFault.class, TYPE_QNAME,
                    new BeanSerializerFactory(BeanFault.class, TYPE_QNAME),
                    new BeanDeserializerFactory(BeanFault.class, TYPE_QNAME));
        call.setReturnClass(BeanFault.class);
        call.addParameter("arg0", Constants.XSD_STRING, ParameterMode.IN);
        String data = "bean fault test - 1";
        try {
View Full Code Here

        Call call = getCall();
        call.setOperationStyle("wrapped");
        call.setOperationUse("literal");
        call.setEncodingStyle("");
        call.registerTypeMapping(BeanFault2.class, TYPE_QNAME,
                    new BeanSerializerFactory(BeanFault2.class, TYPE_QNAME),
                    new BeanDeserializerFactory(BeanFault2.class, TYPE_QNAME));
        call.setReturnClass(BeanFault2.class);
        call.addParameter("arg0", Constants.XSD_STRING, ParameterMode.IN);
        String data = "bean fault test - 2";
        try {
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp(false); // don't deploy here
        TypeMapping tm = (TypeMapping)config.getTypeMappingRegistry().
                getDefaultTypeMapping();
        tm.register(Data.class, TYPE_QNAME,
                    new BeanSerializerFactory(Data.class, TYPE_QNAME),
                    new BeanDeserializerFactory(Data.class, TYPE_QNAME));
    }
View Full Code Here

        Call call = getCall();
        call.setOperationStyle("wrapped");
        call.setOperationUse("literal");
        call.setEncodingStyle("");
        call.registerTypeMapping(Data.class, TYPE_QNAME,
                    new BeanSerializerFactory(Data.class, TYPE_QNAME),
                    new BeanDeserializerFactory(Data.class, TYPE_QNAME));
        call.setReturnClass(Data.class);
        call.addParameter("arg0", TYPE_QNAME, ParameterMode.IN);
        Data data = new Data();
        data.stringMember = "doc lit test";
View Full Code Here

        engine.init();

        // And deploy the type mapping
        Class javaType = Data.class;
        QName xmlType = new QName("urn:foo", "Data");
        BeanSerializerFactory   sf = new BeanSerializerFactory(javaType, xmlType);
        BeanDeserializerFactory df = new BeanDeserializerFactory(javaType, xmlType);

        TypeMappingRegistry tmr = engine.getTypeMappingRegistry();
        TypeMapping tm =
                tmr.getOrMakeTypeMapping(Constants.URI_DEFAULT_SOAP_ENC);
View Full Code Here

                false);
                */
               
                // this - demonstrates the same problem as above
                // just can check the ArrayIndexOutOfBoundsException
                BeanSerializerFactory f =
                        new BeanSerializerFactory(ComplexBean.class,
                                                  new QName("foo", "bar"));
            } catch (Exception e) {
                ex = e;
            }
           
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp(false); // don't deploy here
        TypeMapping tm = (TypeMapping)config.getTypeMappingRegistry().
                        getDefaultTypeMapping();
        tm.register(Book.class, TYPE_BOOK,
                new BeanSerializerFactory(Book.class, TYPE_BOOK),
                new BeanDeserializerFactory(Book.class, TYPE_BOOK));
        tm.register(ArrayOfBook.class, TYPE_ARRAY_OF_BOOK,
                new BeanSerializerFactory(ArrayOfBook.class,
                        TYPE_ARRAY_OF_BOOK),
                new BeanDeserializerFactory(ArrayOfBook.class,
                        TYPE_ARRAY_OF_BOOK));
        deploy("service", this.getClass(), Style.RPC, Use.LITERAL);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis.encoding.ser.BeanSerializerFactory

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.