Message msg = new Message("LOAD_CLASS_ERROR", LOG, reqClassName);
throw new ToolException(msg, e);
}
QName reqQN = new QName(reqNS, reqName);
TypeReference typeRef = new TypeReference(reqQN, reqClass, new Annotation[0]);
WSDLParameter request = new WSDLParameter(reqName, typeRef, JavaType.Style.IN);
request.setTargetNamespace(reqNS);
javaMethod.addRequest(request);
WSDLParameter response = null;
if (!isOneWayMethod(method)) {
// process response
ResponseWrapper resWrapper = method.getAnnotation(ResponseWrapper.class);
String resClassName = "";
// rule 3.5 suffix -"Response"
String resName = method.getName() + "Response";
String resNS = model.getTargetNameSpace();
if (resWrapper != null) {
resClassName = resWrapper.className();
resName = resWrapper.localName().length() > 0 ? resWrapper.localName() : resName;
resNS = resWrapper.targetNamespace().length() > 0 ? resWrapper.targetNamespace() : resNS;
} else {
resClassName = model.getPackageName() + ".types."
+ AnnotationUtil.capitalize(method.getName())
+ "Response";
}
Class resClass = null;
QName resQN = new QName(resNS, resName);
try {
resClass = AnnotationUtil
.loadClass(resClassName, method.getDeclaringClass().getClassLoader());
} catch (Exception e) {
Message msg = new Message("LOAD_CLASS_ERROR", LOG, resClassName);
throw new ToolException(msg, e);
}
typeRef = new TypeReference(resQN, resClass, new Annotation[0]);
response = new WSDLParameter(resName, typeRef, JavaType.Style.OUT);
response.setTargetNamespace(resNS);
javaMethod.addResponse(response);
WebResult webResult = method.getAnnotation(WebResult.class);
JavaParameter returnParameter = getReturnParameter(webResult, method);