Package org.codehaus.enunciate.contract.validation

Examples of org.codehaus.enunciate.contract.validation.ValidationResult.addError()


    ValidationResult result = super.validateEndpointInterface(ei);

    WebService eiAnnotation = ei.getAnnotation(WebService.class);
    if (ei.isInterface()) {
      if (!"".equals(eiAnnotation.serviceName())) {
        result.addError(ei, "JBoss fails if you specify 'serviceName' on an endpoint interface.");
      }
      if (!"".equals(eiAnnotation.portName())) {
        result.addError(ei, "JBoss fails if you specify 'portName' on an endpoint interface.");
      }
      for (MethodDeclaration m : ei.getMethods()) {
View Full Code Here


    if (ei.isInterface()) {
      if (!"".equals(eiAnnotation.serviceName())) {
        result.addError(ei, "JBoss fails if you specify 'serviceName' on an endpoint interface.");
      }
      if (!"".equals(eiAnnotation.portName())) {
        result.addError(ei, "JBoss fails if you specify 'portName' on an endpoint interface.");
      }
      for (MethodDeclaration m : ei.getMethods()) {
        javax.jws.WebMethod wm = m.getAnnotation(javax.jws.WebMethod.class);
        if (wm != null && wm.exclude()) {
          result.addError(m, "JBoss fails if you specify 'exclude=true' on an endpoint interface.");
View Full Code Here

        result.addError(ei, "JBoss fails if you specify 'portName' on an endpoint interface.");
      }
      for (MethodDeclaration m : ei.getMethods()) {
        javax.jws.WebMethod wm = m.getAnnotation(javax.jws.WebMethod.class);
        if (wm != null && wm.exclude()) {
          result.addError(m, "JBoss fails if you specify 'exclude=true' on an endpoint interface.");
        }
      }
    }

    if (ei.getEndpointImplementations().size() > 1) {
View Full Code Here

    if (ei.getEndpointImplementations().size() > 1) {
      ArrayList<String> impls = new ArrayList<String>();
      for (EndpointImplementation impl : ei.getEndpointImplementations()) {
        impls.add(impl.getQualifiedName());
      }
      result.addError(ei, "Sorry, JBoss doesn't support two endpoint implementations for interface '" + ei.getQualifiedName() +
        "'.  Found " + ei.getEndpointImplementations().size() + " implementations (" + impls.toString() + ").");
    }
    else if (ei.getEndpointImplementations().isEmpty()) {
      result.addError(ei, "JBoss requires an implementation for each service interface.");
    }
View Full Code Here

      }
      result.addError(ei, "Sorry, JBoss doesn't support two endpoint implementations for interface '" + ei.getQualifiedName() +
        "'.  Found " + ei.getEndpointImplementations().size() + " implementations (" + impls.toString() + ").");
    }
    else if (ei.getEndpointImplementations().isEmpty()) {
      result.addError(ei, "JBoss requires an implementation for each service interface.");
    }

    EndpointInterface visited = visitedEndpoints.put(ei.getServiceName(), ei);
    if (visited != null) {
      if (visited.getTargetNamespace().equals(ei.getTargetNamespace())) {
View Full Code Here

    }

    EndpointInterface visited = visitedEndpoints.put(ei.getServiceName(), ei);
    if (visited != null) {
      if (visited.getTargetNamespace().equals(ei.getTargetNamespace())) {
        result.addError(ei, "Ummm... you already have a service named " + ei.getServiceName() + " at " +
          visited.getPosition() + ".  You need to disambiguate.");
      }
    }

    return result;
View Full Code Here

    processor = new EnunciateAnnotationProcessor(enunciate) {
      @Override
      protected ValidationResult validate(EnunciateFreemarkerModel model, Validator validator) {
        ValidationResult result = new ValidationResult();
        result.addWarning(beanThree, "test warning.");
        result.addError(beanTwo, "test error");
        result.addError(beanTwo, "test error2");
        return result;
      }

      @Override
View Full Code Here

      @Override
      protected ValidationResult validate(EnunciateFreemarkerModel model, Validator validator) {
        ValidationResult result = new ValidationResult();
        result.addWarning(beanThree, "test warning.");
        result.addError(beanTwo, "test error");
        result.addError(beanTwo, "test error2");
        return result;
      }

      @Override
      protected Messager getMessager() {
View Full Code Here

    AnnotationProcessorEnvironment ape = Context.getCurrentEnvironment();
    ValidationResult result = new ValidationResult();

    String requestBeanName = wrapper.getRequestBeanName();
    if (!alreadyVisited.add(requestBeanName)) {
      result.addError(wrapper.getWebMethod(), requestBeanName + " conflicts with another generated bean name.  Please use the @RequestWrapper " +
        "annotation to customize the bean name.");
    }

    return result;
  }
View Full Code Here

    AnnotationProcessorEnvironment ape = Context.getCurrentEnvironment();
    ValidationResult result = new ValidationResult();

    String responseBeanName = wrapper.getResponseBeanName();
    if (!alreadyVisited.add(responseBeanName)) {
      result.addError(wrapper.getWebMethod(), responseBeanName + " conflicts with another generated bean name.  Please use the @ResponseWrapper " +
        "annotation to customize the bean name.");
    }

    return result;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.