// @SOAPBinding
seiInfo.setSoapBindingAnnotation(getSOAPBindingAnnotation(port));
for (Operation operation: port.getOperations()) {
JavaMethod method = operation.getJavaMethod();
MethodInfo methodInfo = new MethodInfo();
// method name
methodInfo.setName(method.getName());
// method doc comment
String methodJavaDoc = operation.getJavaDoc();
if (methodJavaDoc == null) {
methodJavaDoc = "public method";
}
// method return type
String returnTypeName;
if(method.getReturnType().getName().equals("void")){
returnTypeName = "void";
} else {
returnTypeName = method.getReturnType().getType()
.getName();
}
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