returnParameter.setPartName(resultPartName);
if(isResultHeader){
returnParameter.setBinding(ParameterBinding.HEADER);
javaMethod.addParameter(returnParameter);
}else{
ParameterBinding rb = getBinding(operationName, resultPartName, false, Mode.OUT);
returnParameter.setBinding(rb);
if(rb.isBody()){
WSDLPart p = getPart(new QName(targetNamespace,operationName), resultPartName, Mode.OUT);
if(p == null)
resRpcParams.put(resRpcParams.size()+10000, returnParameter);
else
resRpcParams.put(p.getIndex(), returnParameter);
}else{
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 = "";
String paramNamespace = "";
String partName = "";
boolean isHeader = false;
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;
paramName = webParam.name();
partName = webParam.partName();
isHeader = webParam.header();
WebParam.Mode mode = webParam.mode();
paramNamespace = webParam.targetNamespace();
if (isHolder && mode == Mode.IN)
mode = Mode.INOUT;
paramMode = mode;
break;
}
}
if (paramName.length() == 0) {
paramName = "arg"+pos;
}
if (partName.length() == 0) {
partName = paramName;
} else if (!isHeader) {
paramName = partName;
}
if (partName.length() == 0) {
partName = paramName;
}
QName paramQName;
if (!isHeader) {
//its rpclit body param, set namespace to ""
paramQName = new QName("", paramName);
} else {
if (paramNamespace.length() == 0)
paramNamespace = targetNamespace;
paramQName = new QName(paramNamespace, paramName);
}
typeRef =
new TypeReference(paramQName, clazzType, pannotations[pos]);
ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++);
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);
}
}
if(param.getInBinding().isBody()){
if(!param.isOUT()){