String methodJavaDoc = operation.getJavaDoc();
if(method.getReturnType().getName().equals("void")){
m = cls.method(JMod.PUBLIC, void.class, method.getName());
methodDoc = m.javadoc();
}else {
JAXBTypeAndAnnotation retType = method.getReturnType().getType();
m = cls.method(JMod.PUBLIC, retType.getType(), method.getName());
retType.annotate(m);
methodDoc = m.javadoc();
JCommentPart ret = methodDoc.addReturn();
ret.add("returns "+retType.getName());
}
if(methodJavaDoc != null)
methodDoc.add(methodJavaDoc);
writeWebMethod(operation, m);
JClass holder = cm.ref(Holder.class);
for (JavaParameter parameter: method.getParametersList()) {
JVar var;
JAXBTypeAndAnnotation paramType = parameter.getType().getType();
if (parameter.isHolder()) {
var = m.param(holder.narrow(paramType.getType().boxify()), parameter.getName());
}else{
var = m.param(paramType.getType(), parameter.getName());
}
//annotate parameter with JAXB annotations
paramType.annotate(var);
methodDoc.addParam(var);
JAnnotationUse paramAnn = var.annotate(cm.ref(WebParam.class));
writeWebParam(operation, parameter, paramAnn);
}
com.sun.tools.internal.ws.wsdl.document.Operation wsdlOp = operation.getWSDLPortTypeOperation();