}
returnParameter.setPartName(resultPartName);
if(isResultHeader){
returnParameter.setBinding(ParameterBinding.HEADER);
}else{
ParameterBinding rb = getBinding(operationName, resultPartName, false, Mode.OUT);
returnParameter.setBinding(rb);
}
javaMethod.addParameter(returnParameter);
}
}
//get WebParam
Class<?>[] parameterTypes = method.getParameterTypes();
Type[] genericParameterTypes = method.getGenericParameterTypes();
Annotation[][] pannotations = getPrivParameterAnnotations(method);
int pos = 0;
for (Class clazzType : parameterTypes) {
String paramName = operationName; //method.getName();
String partName = null;
String requestNamespace = targetNamespace;
boolean isHeader = false;
//async
if(javaMethod.isAsync() && AsyncHandler.class.isAssignableFrom(clazzType)){
continue;
}
boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
//set the actual type argument of Holder in the TypeReference
if (isHolder) {
if (clazzType==Holder.class)
clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
}
Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
for (Annotation annotation : pannotations[pos]) {
if (annotation.annotationType() == javax.jws.WebParam.class) {
javax.jws.WebParam webParam = (javax.jws.WebParam) annotation;
paramMode = webParam.mode();
if (isHolder && paramMode == Mode.IN)
paramMode = Mode.INOUT;
isHeader = webParam.header();
if(isHeader)
paramName = "arg"+pos;
if(paramMode == Mode.OUT && !isHeader)
paramName = operationName+RESPONSE;
if (webParam.name().length() > 0)
paramName = webParam.name();
partName = webParam.partName();
if (!webParam.targetNamespace().equals("")) {
requestNamespace = webParam.targetNamespace();
}
break;
}
}
QName requestQName = new QName(requestNamespace, paramName);
//doclit/wrapped
TypeReference typeRef = //operationName with upper 1 char
new TypeReference(requestQName, clazzType,
pannotations[pos]);
ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++);
if(partName == null || (partName.length() == 0)){
partName = paramName;
}
param.setPartName(partName);
if(paramMode == Mode.INOUT){
ParameterBinding pb = getBinding(operationName, partName, isHeader, Mode.IN);
param.setInBinding(pb);
pb = getBinding(operationName, partName, isHeader, Mode.OUT);
param.setOutBinding(pb);
}else{
if (isHeader){
param.setBinding(ParameterBinding.HEADER);
}else{
ParameterBinding pb = getBinding(operationName, partName, false, paramMode);
param.setBinding(pb);
}
}
javaMethod.addParameter(param);
}