Package org.codehaus.enunciate.contract.validation

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


      if (attribute.isXmlList()) {
        result.addWarning(attribute, "The Objective-C client code won't serialize xml lists as an array, instead passing the list as a string that will need to be parsed. This may cause confusion to Objective-C consumers.");
      }

      if (attribute.isCollectionType() && attribute.isBinaryData()) {
        result.addError(attribute, "The Objective-C client code doesn't support a collection of items that are binary data. You'll have to define separate accessors for each item or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(attribute.getClientSimpleName())) {
        result.addError(attribute, "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
View Full Code Here


      if (attribute.isCollectionType() && attribute.isBinaryData()) {
        result.addError(attribute, "The Objective-C client code doesn't support a collection of items that are binary data. You'll have to define separate accessors for each item or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(attribute.getClientSimpleName())) {
        result.addError(attribute, "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
    }

    if (complexType.getValue() != null) {
      if (complexType.getValue().isXmlList()) {
View Full Code Here

      if (complexType.getValue().isXmlList()) {
        result.addWarning(complexType.getValue(), "The Objective-C client code won't serialize xml lists as an array, instead passing the list as a string that will need to be parsed. This may cause confusion to Objective-C consumers.");
      }

      if (complexType.getValue().isCollectionType() && complexType.getValue().isBinaryData()) {
        result.addError(complexType.getValue(), "The Objective-C client code doesn't support a collection of items that are binary data. You'll have to define separate accessors for each item or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(complexType.getValue().getClientSimpleName())) {
        result.addError(complexType.getValue(), "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
View Full Code Here

      if (complexType.getValue().isCollectionType() && complexType.getValue().isBinaryData()) {
        result.addError(complexType.getValue(), "The Objective-C client code doesn't support a collection of items that are binary data. You'll have to define separate accessors for each item or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(complexType.getValue().getClientSimpleName())) {
        result.addError(complexType.getValue(), "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
    }

    for (Element element : complexType.getElements()) {
      if (element.isXmlList()) {
View Full Code Here

      if (element.isXmlList()) {
        result.addWarning(element, "The Objective-C client code won't serialize xml lists as an array, instead passing the list as a string that will need to be parsed. This may cause confusion to Objective-C consumers.");
      }

      if (element.getAccessorType() instanceof MapType && !element.isAdapted()) {
        result.addError(element, "The Objective-C client doesn't have a built-in way of serializing a Map. So you're going to have to use @XmlJavaTypeAdapter to supply " +
          "your own adapter for the Map, or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(element.getClientSimpleName())) {
        result.addError(element, "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
View Full Code Here

        result.addError(element, "The Objective-C client doesn't have a built-in way of serializing a Map. So you're going to have to use @XmlJavaTypeAdapter to supply " +
          "your own adapter for the Map, or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(element.getClientSimpleName())) {
        result.addError(element, "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
    }


    return result;
View Full Code Here

    ValidationResult result = super.validateEndpointInterface(ei);

    TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
    if (!isGWTTransient(ei)) {
      if ((this.enforceNamespaceConformance) && (!ei.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace))) {
        result.addError(ei, String.format("The package of the endpoint interface, %s, must start with the GWT module namespace, %s.", ei.getPackage().getQualifiedName(), gwtModuleNamespace));
      }

      for (WebMethod webMethod : ei.getWebMethods()) {
        if (!isGWTTransient(webMethod)) {
          if (!isSupported(webMethod.getWebResult())) {
View Full Code Here

      }

      for (WebMethod webMethod : ei.getWebMethods()) {
        if (!isGWTTransient(webMethod)) {
          if (!isSupported(webMethod.getWebResult())) {
            result.addError(webMethod, "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
          }
          for (WebParam webParam : webMethod.getWebParameters()) {
            if (!isSupported(webParam.getType())) {
              result.addError(webParam, "GWT doesn't support '" + webParam.getType() + "' as a parameter type.");
            }
View Full Code Here

          if (!isSupported(webMethod.getWebResult())) {
            result.addError(webMethod, "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
          }
          for (WebParam webParam : webMethod.getWebParameters()) {
            if (!isSupported(webParam.getType())) {
              result.addError(webParam, "GWT doesn't support '" + webParam.getType() + "' as a parameter type.");
            }
          }

          allFaults.addAll(webMethod.getWebFaults());
        }
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, GWT 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, "GWT requires an implementation for each service interface.");
      }
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.