if (this.isWrapped(operation)) { // wrapped response
Response response = operation.getResponse();
Block resBlock = response.getBodyBlocks().next();
returnTypeName = resBlock.getType().getJavaType().getName();
}
TypeInfo returnType = new TypeInfo();
returnType.setFullName(returnTypeName);
returnType.setName(ClassNameUtil
.stripQualifier(returnTypeName));
methodInfo.setReturnType(returnType);
methodInfo.setWebMethodAnnotation(getWebMethodAnnotation(operation, method.getName()));
methodInfo.setWebResultAnnotation(getWebResultAnnotation(operation));
methodInfo.setSoapBindingAnnotation(getSOAPBindingAnnotation(operation));
if (this.isWrapped(operation)) { // wrapped request parameter
Block reqBlock = operation.getRequest().getBodyBlocks().next();
String parameterTypeName = reqBlock.getType().getJavaType().getName();
ParameterInfo paramInfo = new ParameterInfo();
paramInfo.setName("request");
// param type
TypeInfo paramType = new TypeInfo();
paramType.setFullName(parameterTypeName);
paramType.setName(ClassNameUtil
.stripQualifier(parameterTypeName));
paramInfo.setType(paramType);
// add this param in method definition
methodInfo.getParameters().add(paramInfo);
} else {
for (JavaParameter parameter : method.getParametersList()) {
ParameterInfo paramInfo = new ParameterInfo();
// param name
paramInfo.setName(parameter.getName());
// param type
TypeInfo paramType = new TypeInfo();
paramType.setFullName(parameter.getType().getName());
paramType.setName(ClassNameUtil
.stripQualifier(parameter.getType().getName()));
paramInfo.setType(paramType);
// @WebParam
paramInfo.setWebParamAnnotation(getWebParamAnnotation(operation, parameter));