@Override public Boolean isHeader(Method method, int j) { method = getDeclaredMethod(method); if (j >= 0) { WebParam webParam = getWebParam(method, j); return webParam != null && webParam.header(); } WebResult webResult = getWebResult(method); return webResult != null && webResult.header(); }
private QName getPartName(OperationInfo op, Method method, int paramNumber, MessageInfo mi, String prefix, boolean isIn) { int partIndex = getPartIndex(method, paramNumber, isIn); method = getDeclaredMethod(method); WebParam param = getWebParam(method, paramNumber); String tns = mi.getName().getNamespaceURI(); String local = null; if (param != null) { if (Boolean.TRUE.equals(isRPC(method)) || isDocumentBare(method) || param.header()) { local = param.partName(); } if (local == null || local.length() == 0) { local = param.name(); } } if (local == null || local.length() == 0) { if (Boolean.TRUE.equals(isRPC(method)) || !Boolean.FALSE.equals(isWrapped(method))) { local = getDefaultLocalName(op, method, paramNumber, partIndex, prefix); } else { local = getOperationName(op.getInterface(), method).getLocalPart(); } } return new QName(tns, local); }
WebParam parm = getWebParam(method, x); if (parm != null) { if (parm.header()) { countHeaders++;
/** * Whether this is a header param. * * @return Whether this is a header param. */ public boolean isHeader() { boolean header = false; if (annotation != null) { header = annotation.header(); } return header; }
/** * Whether this is a header param. * * @return Whether this is a header param. */ public boolean isHeader() { boolean header = false; if (annotation != null) { header = annotation.header(); } return header; }
/** * Whether this is a header param. * * @return Whether this is a header param. */ public boolean isHeader() { boolean header = false; if (annotation != null) { header = annotation.header(); } return header; }
public boolean getAnnoWebParamHeader() { if (webParamHeader == null) { // Unlike a String value, if the annotation is present, it will return a usable default value. if (getAnnoWebParam() != null) { webParamHeader = getAnnoWebParam().header(); } else { webParamHeader = WebParam_Header_DEFAULT; } } return webParamHeader.booleanValue(); }
public boolean getAnnoWebParamHeader() { if (webParamHeader == null) { // Unlike a String value, if the annotation is present, it will return a usable default value. if (getAnnoWebParam() != null) { webParamHeader = getAnnoWebParam().header(); } else { webParamHeader = WebParam_Header_DEFAULT; } } return webParamHeader.booleanValue(); }
public void readWebServicesAnnotations(Method m, Class<?> clazz, List<Intent> requiredIntents) { WebResult webResultAnnotation = m.getAnnotation(WebResult.class); if (webResultAnnotation != null) { if (webResultAnnotation.header()) { // Add SOAP intent Intent intent = policyFactory.createIntent(); intent.setName(Constants.SOAP_INTENT); requiredIntents.add(intent); return; } } Annotation[][] parameterAnnotations = m.getParameterAnnotations(); for ( int i=0; i < parameterAnnotations.length; i++ ) { for ( int j=0; j < parameterAnnotations[i].length; j++) { if ( parameterAnnotations[i][j] instanceof WebParam ) { WebParam webParam = (WebParam)parameterAnnotations[i][j]; if ( webParam.header() ) { // Add SOAP intent Intent intent = policyFactory.createIntent(); intent.setName(Constants.SOAP_INTENT); requiredIntents.add(intent); return; } } } } } public void visitInterface(JavaInterface javaInterface) throws InvalidInterfaceException {
protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) { WebParam webParam; int cnt = 0; for (VariableElement param : method.getParameters()) { webParam = param.getAnnotation(WebParam.class); if (webParam != null) { if (webParam.header()) continue; if (isEquivalentModes(mode, webParam.mode())) cnt++; } else { if (isEquivalentModes(mode, WebParam.Mode.IN)) { cnt++; } } } return cnt; }
public void readWebServicesAnnotations(Method m, Class<?> clazz, List<Intent> requiredIntents) { WebResult webResultAnnotation = m.getAnnotation(WebResult.class); if (webResultAnnotation != null) { if (webResultAnnotation.header()) { // Add SOAP intent Intent intent = policyFactory.createIntent(); intent.setName(Constants.SOAP_INTENT); requiredIntents.add(intent); return; } } Annotation[][] parameterAnnotations = m.getParameterAnnotations(); for ( int i=0; i < parameterAnnotations.length; i++ ) { for ( int j=0; j < parameterAnnotations[i].length; j++) { if ( parameterAnnotations[i][j] instanceof WebParam ) { WebParam webParam = (WebParam)parameterAnnotations[i][j]; if ( webParam.header() ) { // Add SOAP intent Intent intent = policyFactory.createIntent(); intent.setName(Constants.SOAP_INTENT); requiredIntents.add(intent); return; } } } } } public void visitInterface(JavaInterface javaInterface) throws InvalidInterfaceException {
@Override public Boolean isHeader(Method method, int j) { method = getDeclaredMethod(method); if (j >= 0) { WebParam webParam = getWebParam(method, j); return webParam != null && webParam.header(); } WebResult webResult = getWebResult(method); return webResult != null && webResult.header(); }
protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) { WebParam webParam; int cnt = 0; for (VariableElement param : method.getParameters()) { webParam = param.getAnnotation(WebParam.class); if (webParam != null) { if (webParam.header()) continue; if (isEquivalentModes(mode, webParam.mode())) cnt++; } else { if (isEquivalentModes(mode, WebParam.Mode.IN)) { cnt++; } } } return cnt; }
protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) { WebParam webParam; int cnt = 0; for (VariableElement param : method.getParameters()) { webParam = param.getAnnotation(WebParam.class); if (webParam != null) { if (webParam.header()) continue; if (isEquivalentModes(mode, webParam.mode())) cnt++; } else { if (isEquivalentModes(mode, WebParam.Mode.IN)) { cnt++; } } } return cnt; }
protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) { WebParam webParam; int cnt = 0; for (VariableElement param : method.getParameters()) { webParam = param.getAnnotation(WebParam.class); if (webParam != null) { if (webParam.header()) continue; if (isEquivalentModes(mode, webParam.mode())) cnt++; } else { if (isEquivalentModes(mode, WebParam.Mode.IN)) { cnt++; } } } return cnt; }
WebParam parm = getWebParam(method, x); if (parm != null) { if (parm.header()) { countHeaders++;
private QName getPartName(OperationInfo op, Method method, int paramNumber, MessageInfo mi, String prefix, boolean isIn) { int partIndex = getPartIndex(method, paramNumber, isIn); method = getDeclaredMethod(method); WebParam param = getWebParam(method, paramNumber); String tns = mi.getName().getNamespaceURI(); String local = null; if (param != null) { if (Boolean.TRUE.equals(isRPC(method)) || isDocumentBare(method) || param.header()) { local = param.partName(); } if (local == null || local.length() == 0) { local = param.name(); } } if (local == null || local.length() == 0) { if (Boolean.TRUE.equals(isRPC(method)) || !Boolean.FALSE.equals(isWrapped(method))) { local = getDefaultLocalName(op, method, paramNumber, partIndex, prefix); } else { local = getOperationName(op.getInterface(), method).getLocalPart(); } } return new QName(tns, local); }
private static JavaLanguageVariable buildJavaVariableFromMethodParam(Method method, int paramIndex, WebParam xmlAnnotation) { JavaLanguageVariable variable = new JavaLanguageVariable(); variable.setType(GenericsUtils.getMethodGenericParameterTypes(method, paramIndex)); variable.setVariableName(xmlAnnotation.name()); variable.setRequired(true); variable.setHeader(xmlAnnotation.header()); Class<?> paramClass = method.getParameterTypes()[paramIndex]; variable.setMultiOccurs(isClassArrayOrCollection(paramClass)); return variable; }
/** * This method will attach @WebParam annotation data to the <code> ParameterDescriptionComposite</code> * if the annotation was found on the parameter represented by this index in the parameter list. * * @param pdc - <code>ParameterDescriptionComposite</code> * @param order - the current index in the parameter list */ private void attachWebParamAnnotation(ParameterDescriptionComposite pdc, int order) { Annotation[] orderAnnots = paramAnnotations[order]; for (Annotation annot : orderAnnots) { if (annot instanceof WebParam) { WebParam webParam = (WebParam)annot; WebParamAnnot wpAnnot = WebParamAnnot.createWebParamAnnotImpl(); wpAnnot.setHeader(webParam.header()); wpAnnot.setMode(webParam.mode()); wpAnnot.setName(webParam.name()); wpAnnot.setPartName(webParam.partName()); wpAnnot.setTargetNamespace(webParam.targetNamespace()); pdc.setWebParamAnnot(wpAnnot); } } } }
/** * This method will attach @WebParam annotation data to the <code> ParameterDescriptionComposite</code> * if the annotation was found on the parameter represented by this index in the parameter list. * * @param pdc - <code>ParameterDescriptionComposite</code> * @param order - the current index in the parameter list */ private void attachWebParamAnnotation(ParameterDescriptionComposite pdc, int order) { Annotation[] orderAnnots = paramAnnotations[order]; for (Annotation annot : orderAnnots) { if (annot instanceof WebParam) { WebParam webParam = (WebParam)annot; WebParamAnnot wpAnnot = WebParamAnnot.createWebParamAnnotImpl(); wpAnnot.setHeader(webParam.header()); wpAnnot.setMode(webParam.mode()); wpAnnot.setName(webParam.name()); wpAnnot.setPartName(webParam.partName()); wpAnnot.setTargetNamespace(webParam.targetNamespace()); pdc.setWebParamAnnot(wpAnnot); } } } }