Class cls = classLoader.loadClass("org.apache.header_test.rpc.TestRPCHeader");
Method meths[] = cls.getMethods();
for (Method m : meths) {
if ("testHeader1".equals(m.getName())) {
Annotation annotations[][] = m.getParameterAnnotations();
assertEquals(2, annotations.length);
assertEquals(1, annotations[1].length);
assertTrue(annotations[1][0] instanceof WebParam);
WebParam parm = (WebParam)annotations[1][0];
assertEquals("http://apache.org/header_test/rpc/types", parm.targetNamespace());
assertEquals("inHeader", parm.partName());
assertEquals("headerMessage", parm.name());
assertTrue(parm.header());
}
}
for (Method m : meths) {
if ("testInOutHeader".equals(m.getName())) {
Annotation annotations[][] = m.getParameterAnnotations();
assertEquals(2, annotations.length);
assertEquals(1, annotations[1].length);
assertTrue(annotations[1][0] instanceof WebParam);
WebParam parm = (WebParam)annotations[1][0];
assertEquals("http://apache.org/header_test/rpc/types", parm.targetNamespace());