WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
assertEquals("Greeter", webServiceAnn.name());
Method method = clz.getMethod("sayHi", new Class[] {});
WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
if (webMethodAnno.operationName() != null
&& !"".equals(webMethodAnno.operationName())) {
assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
webMethodAnno.operationName());
}
RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
RequestWrapper.class);
assertEquals("org.apache.hello_world_soap12_http.types.SayHi", requestWrapperAnn.className());
ResponseWrapper resposneWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
ResponseWrapper.class);
assertEquals("sayHiResponse", resposneWrapperAnn.localName());
WebResult webResultAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);
assertEquals("responseType", webResultAnno.name());
method = clz.getMethod("pingMe", new Class[] {});
webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
if (webMethodAnno.operationName() != null
&& !"".equals(webMethodAnno.operationName())) {
assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "pingMe",
webMethodAnno.operationName());
}
Class[] exceptionCls = method.getExceptionTypes();
assertEquals(1, exceptionCls.length);
assertEquals("org.apache.hello_world_soap12_http.PingMeFault", exceptionCls[0].getName());
}