@Override public String getAction(OperationInfo op, Method method) { method = getDeclaredMethod(method); WebMethod wm = method.getAnnotation(WebMethod.class); String action = ""; if (wm != null) { action = wm.action(); } if (StringUtils.isEmpty(action)) { Action act = method.getAnnotation(Action.class); if (act != null) { action = act.input(); } } return action; } public Boolean isHolder(Class<?> cls, Type type) {
LOGGER.warn("Method " + method.getName() + " has no @WebMethod annotation"); } else { this.name = webMethod.action();
/** * The action of this web method. * * @return The action of this web method. */ public String getAction() { String action = ""; if (annotation != null) { action = annotation.action(); } return action; }
/** * The action of this web method. * * @return The action of this web method. */ public String getAction() { String action = ""; if (annotation != null) { action = annotation.action(); } return action; }
public String getSOAPAction() { if (null != webMethodAnnotation) { return webMethodAnnotation.action(); } return ""; }
/** * The action of this web method. * * @return The action of this web method. */ public String getAction() { String action = ""; if (annotation != null) { action = annotation.action(); } return action; }
public <T> void introspect(Operation<T> operation, Method method, IntrospectionContext context) { WebMethod webMethod = method.getAnnotation(WebMethod.class); if (webMethod != null) { String soapAction = webMethod.action(); if (soapAction != null) { operation.addInfo(Constant.AXIS2_JAXWS_QNAME, Constant.SOAP_ACTION, soapAction); } } } }
private static String getSoapActionAnnotationFromMethod(Method method) throws InternalBusinessException { for(Annotation annotation: method.getAnnotations()) { if(annotation.annotationType() == WebMethod.class) { return ((WebMethod)annotation).action(); } } throw new InternalBusinessException("SoapAction from JaxWsServiceInterface not found"); }
private static String getSoapActionAnnotationFromMethod(Method method) throws BusinessException { for(Annotation annotation: method.getAnnotations()) { if(annotation.annotationType() == WebMethod.class) { return ((WebMethod)annotation).action(); } } throw new BusinessException("SoapAction from JaxWsServiceInterface not found"); }
private static String getSoapActionAnnotationFromMethod(Method method) throws BootStarterCxfException { for(Annotation annotation: method.getAnnotations()) { if(annotation.annotationType() == WebMethod.class) { return ((WebMethod)annotation).action(); } } throw new BootStarterCxfException("SoapAction from JaxWsServiceInterface not found"); }
inputAction = wm.action();
@Override public String getAction(OperationInfo op, Method method) { method = getDeclaredMethod(method); WebMethod wm = method.getAnnotation(WebMethod.class); String action = ""; if (wm != null) { action = wm.action(); } if (StringUtils.isEmpty(action)) { Action act = method.getAnnotation(Action.class); if (act != null) { action = act.input(); } } return action; } public Boolean isHolder(Class<?> cls, Type type) {
protected boolean hasWebMethods(TypeElement element) { if (element.getQualifiedName().toString().equals(Object.class.getName())) return false; WebMethod webMethod; for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) { webMethod = method.getAnnotation(WebMethod.class); if (webMethod != null) { if (webMethod.exclude()) { if (webMethod.operationName().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "operationName", element.getQualifiedName(), method.toString()), method); if (webMethod.action().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "action", element.getQualifiedName(), method.toString()), method); } else { return true; } } } return false;//hasWebMethods(d.getSuperclass().getDeclaration()); }
protected boolean hasWebMethods(TypeElement element) { if (element.getQualifiedName().toString().equals(Object.class.getName())) return false; WebMethod webMethod; for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) { webMethod = method.getAnnotation(WebMethod.class); if (webMethod != null) { if (webMethod.exclude()) { if (webMethod.operationName().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "operationName", element.getQualifiedName(), method.toString()), method); if (webMethod.action().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "action", element.getQualifiedName(), method.toString()), method); } else { return true; } } } return false;//hasWebMethods(d.getSuperclass().getDeclaration()); }
protected boolean hasWebMethods(TypeElement element) { if (element.getQualifiedName().toString().equals(Object.class.getName())) return false; WebMethod webMethod; for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) { webMethod = method.getAnnotation(WebMethod.class); if (webMethod != null) { if (webMethod.exclude()) { if (webMethod.operationName().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "operationName", element.getQualifiedName(), method.toString()), method); if (webMethod.action().length() > 0) builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE( "action", element.getQualifiedName(), method.toString()), method); } else { return true; } } } return false;//hasWebMethods(d.getSuperclass().getDeclaration()); }
public WebMethodAnnotation getWebMethodAnnotation(Method method) { WebMethod webMethod = (WebMethod) method.getAnnotation(WebMethod.class); if (webMethod != null) { WebMethodAnnotation annotation = new WebMethodAnnotation(); annotation.setAction(webMethod.action()); annotation.setOperationName(webMethod.operationName()); annotation.setExclude(webMethod.exclude()); return annotation; } else { return null; } }
/** * This method will drive the attachment of @WebMethod annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachWebMethodAnnotation(MethodDescriptionComposite mdc, Method method) { WebMethod webMethod = (WebMethod)ConverterUtils.getAnnotation(WebMethod.class, method); if (webMethod != null) { WebMethodAnnot wmAnnot = WebMethodAnnot.createWebMethodAnnotImpl(); wmAnnot.setAction(webMethod.action()); wmAnnot.setExclude(webMethod.exclude()); wmAnnot.setOperationName(webMethod.operationName()); mdc.setWebMethodAnnot(wmAnnot); } }
/** * This method will drive the attachment of @WebMethod annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachWebMethodAnnotation(MethodDescriptionComposite mdc, Method method) { WebMethod webMethod = (WebMethod)ConverterUtils.getAnnotation(WebMethod.class, method); if (webMethod != null) { WebMethodAnnot wmAnnot = WebMethodAnnot.createWebMethodAnnotImpl(); wmAnnot.setAction(webMethod.action()); wmAnnot.setExclude(webMethod.exclude()); wmAnnot.setOperationName(webMethod.operationName()); mdc.setWebMethodAnnot(wmAnnot); } }