private JavaParameter getReturnParameter(WebResult webResult, Method method) {
boolean isHeader = false;
String resultName = "Return";
String resultTNS = model.getTargetNameSpace();
JavaParameter jpara = null;
QName resultQName = null;
if (webResult != null) {
resultName = webResult.name().length() > 0 && webResult.partName().length() > 0 ? webResult
.partName() : resultName;
resultName = webResult.name().length() > 0 ? webResult.name() : resultName;
resultName = webResult.partName().length() > 0 ? webResult.partName() : resultName;
resultTNS = webResult.targetNamespace().length() > 0 ? webResult.targetNamespace() : resultTNS;
isHeader = webResult.header();
}
resultQName = new QName(resultTNS, resultName);
Class returnType = method.getReturnType();
if (resultQName != null && !isOneWayMethod(method) && (returnType != null)
&& (!"void".equals(returnType.getName()))) {
// Annotation[] annotations = method.getAnnotations();
Annotation[] annotations = new Annotation[0];
if (resultQName.getLocalPart() != null) {
TypeReference rTypeReference = new TypeReference(resultQName, returnType, annotations);
jpara = new JavaParameter();
jpara.setName(method.getName() + "Response");
jpara.setTypeReference(rTypeReference);
jpara.setStyle(JavaType.Style.OUT);
jpara.setHeader(isHeader);
}
}
return jpara;
}