Package org.apache.cxf.tools.common.model

Examples of org.apache.cxf.tools.common.model.JavaField.annotate()


        reqField.setOwner(clz);
        List<JAnnotation> annotation = reqField.getAnnotations();
        assertEquals(0, annotation.size());
       
        reqField.annotate(new WrapperBeanFieldAnnotator());
        annotation = reqField.getAnnotations();

        String expectedNamespace = "http://doc.withannotation.fortest.tools.cxf.apache.org/";
        assertEquals("@XmlElement(name = \"array\", namespace = \"" + expectedNamespace + "\")",
                     annotation.get(0).toString());
View Full Code Here


        clz.setFullClassName("org.apache.cxf.tools.fortest.withannotation.doc.jaxws.SayHiResponse");
        JavaField resField = new JavaField("return",
                                           "String[]",
                                           "http://doc.withannotation.fortest.tools.cxf.apache.org/");
        resField.setOwner(clz);
        resField.annotate(new WrapperBeanFieldAnnotator());
        annotation = resField.getAnnotations();
        assertEquals("@XmlElement(name = \"return\", namespace = \"" + expectedNamespace + "\")",
                     annotation.get(0).toString());
    }
}
View Full Code Here

        reqField.setOwner(clz);
        JavaAnnotation annotation = reqField.getAnnotation();
        assertNull(annotation);
       
        reqField.annotate(new WrapperBeanFieldAnnotator());
        annotation = reqField.getAnnotation();

        String expectedNamespace = "http://doc.withannotation.fortest.tools.cxf.apache.org/";
        assertEquals("@XmlElement(namespace = \"" + expectedNamespace + "\", name = \"array\")",
                     annotation.toString());
View Full Code Here

        clz.setFullClassName("org.apache.cxf.tools.fortest.withannotation.doc.jaxws.SayHiResponse");
        JavaField resField = new JavaField("return",
                                           "String[]",
                                           "http://doc.withannotation.fortest.tools.cxf.apache.org/");
        resField.setOwner(clz);
        resField.annotate(new WrapperBeanFieldAnnotator());
        annotation = resField.getAnnotation();
        assertEquals("@XmlElement(namespace = \"" + expectedNamespace + "\", name = \"return\")",
                     annotation.toString());
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.