Package org.apache.axis.encoding.ser

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


        Call call = getCall();
        call.setOperationStyle("rpc");
        call.setOperationUse("literal");
        call.setEncodingStyle("");
        call.registerTypeMapping(Book.class, TYPE_BOOK,
                new BeanSerializerFactory(Book.class, TYPE_BOOK),
                new BeanDeserializerFactory(Book.class, TYPE_BOOK));
        call.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
        call.addParameter("varBook", TYPE_BOOK, ParameterMode.INOUT);
        Book data = new Book();
        data.setAuthor("author1");
View Full Code Here


        Call call = getCall();
        call.setOperationStyle("rpc");
        call.setOperationUse("literal");
        call.setEncodingStyle("");
        call.registerTypeMapping(ArrayOfBook.class, TYPE_ARRAY_OF_BOOK,
                new BeanSerializerFactory(ArrayOfBook.class,
                        TYPE_ARRAY_OF_BOOK),
                new BeanDeserializerFactory(ArrayOfBook.class,
                        TYPE_ARRAY_OF_BOOK));
        call.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
        call.addParameter("varBook", TYPE_ARRAY_OF_BOOK, ParameterMode.INOUT);
View Full Code Here

    public void testGlobalTypes() throws Exception {
        Call call = new Call("http://localhost:8080/jws/GlobalTypeTest.jws");
        QName qname = new QName("http://globalTypeTest", "GlobalType");
        call.registerTypeMapping(GlobalBean.class, qname,
                    new BeanSerializerFactory(GlobalBean.class, qname),
                    new BeanDeserializerFactory(GlobalBean.class, qname));
        GlobalBean bean = new GlobalBean();
        bean.setIntValue(4);
        GlobalBean ret = (GlobalBean)call.invoke("echo", new Object [] { bean });
        assertEquals(4, ret.getIntValue());
View Full Code Here

    public void testGlobalTypes() throws Exception {
        Call call = new Call("http://localhost:8080/jws/GlobalTypeTest.jws");
        QName qname = new QName("http://globalTypeTest", "GlobalType");
        call.registerTypeMapping(GlobalBean.class, qname,
                    new BeanSerializerFactory(GlobalBean.class, qname),
                    new BeanDeserializerFactory(GlobalBean.class, qname));
        GlobalBean bean = new GlobalBean();
        bean.setIntValue(4);
        GlobalBean ret = (GlobalBean)call.invoke("echo", new Object [] { bean });
        assertEquals(4, ret.getIntValue());
View Full Code Here

    TypeMappingRegistry reg = context.getTypeMappingRegistry();
    TypeMapping tm = (TypeMapping) reg.createTypeMapping();
    tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
    reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

    tm.register(SuperBean.class, superTypeQName, new BeanSerializerFactory(SuperBean.class,superTypeQName), new BeanDeserializerFactory(SuperBean.class,superTypeQName));
    tm.register(DerivatedBean.class, inheritedTypeQName, new BeanSerializerFactory(DerivatedBean.class,inheritedTypeQName), new BeanDeserializerFactory(DerivatedBean.class,inheritedTypeQName));
  }
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

        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

        QName beanQName = new QName("typeNS", "TheBean");
        tm.register(AttributeBean.class,
                    beanQName,
                    new BeanSerializerFactory(AttributeBean.class, beanQName),
                    new BeanDeserializerFactory(AttributeBean.class, beanQName));

        // Serialize the bean in to XML
        msg.output(context);
        // Get the XML as a string
View Full Code Here

   
    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

        provider.deployService(SOAPAction, reverse);

        // 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

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.