}
private WebParamAnnotation getWebParamAnnotation(Operation operation, JavaParameter javaParameter) {
WebParamAnnotation webParamAnnotation = new WebParamAnnotation();
Parameter param = javaParameter.getParameter();
Request req = operation.getRequest();
Response res = operation.getResponse();
boolean header = isHeaderParam(param, req) ||
(res != null && isHeaderParam(param, res));
String name;
boolean isWrapped = operation.isWrapped();
if((param.getBlock().getLocation() == Block.HEADER) || (isDocStyle && !isWrapped))
name = param.getBlock().getName().getLocalPart();
else
name = param.getName();
webParamAnnotation.setName(name);
String ns= null;
if (isDocStyle) {
ns = param.getBlock().getName().getNamespaceURI(); // its bare nsuri
if(isWrapped){
ns = param.getType().getName().getNamespaceURI();
}
}else if(header){
ns = param.getBlock().getName().getNamespaceURI();
}
if((ns != null) && (!ns.equals(serviceNS) || (isDocStyle && isWrapped)))
webParamAnnotation.setTargetNamespace(ns);
if (header) {
webParamAnnotation.setHeader(true);
}
if (param.isINOUT()){
webParamAnnotation.setMode("javax.jws.WebParam.Mode.INOUT");
}else if ((res != null) && (isMessageParam(param, res) || isHeaderParam(param, res) || isAttachmentParam(param, res) ||
isUnboundParam(param,res) || param.isOUT())){
webParamAnnotation.setMode("javax.jws.WebParam.Mode.OUT");
}
//doclit wrapped could have additional headers
if(!(isDocStyle && isWrapped) || header)