Examples of WsdlValidator


Examples of org.apache.cxf.tools.validator.WSDLValidator

               
                InputStream toolspecStream = WSDLValidator.class
                    .getResourceAsStream("wsdlvalidator.xml");
                ToolSpec spec = new ToolSpec(toolspecStream, false);
                toolspecStream.close();
                WSDLValidator validator = new WSDLValidator(spec);
                validator.setArguments(pargs);
                boolean ok = validator.executeForMaven();
                if (!ok) {
                    throw new MojoExecutionException("WSDL failed validation: " + file.getName());
                }

                doneFile.createNewFile();
View Full Code Here

Examples of org.apache.cxf.tools.validator.WSDLValidator

                } finally {
                    if (toolspecStream != null) {
                        toolspecStream.close();
                    }
                }
                WSDLValidator validator = new WSDLValidator(spec);
                validator.setArguments(pargs);
                boolean ok = validator.executeForMaven();
                if (!ok) {
                    throw new MojoExecutionException("WSDL failed validation: " + file.getName());
                }

                doneFile.createNewFile();
View Full Code Here

Examples of org.apache.cxf.tools.validator.WSDLValidator

               
                InputStream toolspecStream = WSDLValidator.class
                    .getResourceAsStream("wsdlvalidator.xml");
                ToolSpec spec = new ToolSpec(toolspecStream, false);
                toolspecStream.close();
                WSDLValidator validator = new WSDLValidator(spec);
                validator.setArguments(pargs);
                boolean ok = validator.executeForMaven();
                if (!ok) {
                    throw new MojoExecutionException("WSDL failed validation: " + file.getName());
                }

                doneFile.createNewFile();
View Full Code Here

Examples of org.apache.cxf.tools.validator.WSDLValidator

               
                InputStream toolspecStream = WSDLValidator.class
                    .getResourceAsStream("wsdlvalidator.xml");
                ToolSpec spec = new ToolSpec(toolspecStream, false);
                toolspecStream.close();
                WSDLValidator validator = new WSDLValidator(spec);
                validator.setArguments(pargs);
                boolean ok = validator.executeForMaven();
                if (!ok) {
                    throw new MojoExecutionException("WSDL failed validation: " + file.getName());
                }

                doneFile.createNewFile();
View Full Code Here

Examples of org.apache.woden.internal.wsdl20.validation.WSDLValidator

                    compValidator = new WSDLComponentValidator();
                }
                compValidator.validate(descComp, getErrorReporter());
            }
            */
            (new WSDLValidator()).validate(descComp, fWsdlContext);
        }
       
        return descComp;
    }
View Full Code Here

Examples of org.apache.woden.internal.wsdl20.validation.WSDLValidator

                    compValidator = new WSDLComponentValidator();
                }
                compValidator.validate(descComp, getErrorReporter());
            }
            */
            (new WSDLValidator()).validate(descComp, fWsdlContext);
        }
       
        return descComp;
    }
View Full Code Here

Examples of org.apache.woden.internal.wsdl20.validation.WSDLValidator

                    compValidator = new WSDLComponentValidator();
                }
                compValidator.validate(descComp, getErrorReporter());
            }
            */
            (new WSDLValidator()).validate(descComp, fWsdlContext);
        }
       
        return descComp;
    }
View Full Code Here

Examples of org.eclipse.wst.wsdl.validation.internal.WSDLValidator

  /**
   * Constuctor.
   */
  protected WSDLValidate()
  {
    wsdlValidator = new WSDLValidator();
    configuration = new WSDLValidationConfiguration();
   
    try
    {
      validatorRB = ResourceBundle.getBundle(VALIDATOR_PROPERTIES);
View Full Code Here

Examples of org.eclipse.wst.wsdl.validation.internal.WSDLValidator

    // Set the XML catalog.
    org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog.setExtensionXMLCatalog(XMLCatalogImpl.class.getName(), getClass().getClassLoader());
    XMLCatalogImpl xmlCatalog = (XMLCatalogImpl)org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog.getExtensionCatalogInstance();
    xmlCatalog.addXMLCatalog(globalXMLCatalog);
   
    WSDLValidator wsdlValidator = new WSDLValidator();
   
    WSDLValidationConfiguration configuration = new WSDLValidationConfiguration();
    // Set the properties.
    Iterator propertyIter = properties.iterator();
    while(propertyIter.hasNext())
    {
      Property property = (Property)propertyIter.next();
      configuration.setProperty(property.getName(), property.getValue());
    }
     
    // Set the extension URIResolvers.
    Iterator resolversIter = extURIResolvers.iterator();
    while(resolversIter.hasNext())
    {
      String resolverClass = (String)resolversIter.next();
      wsdlValidator.addURIResolver(new URIResolverDelegate(resolverClass, getClass().getClassLoader()).getURIResolver());
    }
   
    // Get the list of files to validate.
    List files = getFileList();
   
    // Register the WSDL 1.1 extension validators.
    Iterator wsdl11extIter = wsdl11validators.iterator();
    while(wsdl11extIter.hasNext())
    {
      ExtensionValidator extVal = (ExtensionValidator)wsdl11extIter.next();
      WSDL11ValidatorDelegate delegate = new ClassloaderWSDL11ValidatorDelegate(extVal.getClassName());
      wsdlValidator.registerWSDL11Validator(extVal.getNamespace(), delegate);
    }
   
    // Register the extension validators.
    Iterator extIter = extvalidators.iterator();
    while(extIter.hasNext())
    {
      ExtensionValidator extVal = (ExtensionValidator)extIter.next();
      ClassloaderWSDLValidatorDelegate delegate = new ClassloaderWSDLValidatorDelegate(extVal.getClassName());
      wsdlValidator.registerWSDLExtensionValidator(extVal.getNamespace(), delegate);
    }

    // The user didn't specify any files to validate.
    if (files == null || files.isEmpty())
    {
      log(messGen.getString(_ERROR_NO_FILE_SPECIFIED), Project.MSG_ERR);
      return;
    }

    if (xsdDirectory != null)
    {
      org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog.addSchemaDir(xsdDirectory);
    }

    // Validate all the files specified.
    Iterator iFiles = files.iterator();

    // Common strings needed in validation output.
    String infoDelim = messGen.getString(_UI_INFORMATION_DELIMITER);
    String valid = messGen.getString(_UI_VALID);
    String invalid = messGen.getString(_UI_INVALID);
    String errormarker = messGen.getString(_UI_ERROR_MARKER);
    String warningmarker = messGen.getString(_UI_WARNING_MARKER);

    StringBuffer result = null;
    boolean notvalid = true;
    while (iFiles.hasNext())
    {
      result = new StringBuffer();
      notvalid = false;
      String filename = (String)iFiles.next();
      try
      {
        result.append(infoDelim).append("\n");
        result.append(messGen.getString(_UI_ACTION_VALIDATING_FILE, filename)).append(" - ");

        IValidationReport valReport = wsdlValidator.validate(filename, null, configuration);

        IValidationMessage[] messages = valReport.getValidationMessages();

        if (!valReport.hasErrors())
        {
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.profile.validator.WSDLValidator

   * @see org.wsi.test.profile.validator.ProfileValidatorFactory#newWSDLValidator()
   */
  public WSDLValidator newWSDLValidator() throws WSIException
  {
    // Create new WSDL validator
    WSDLValidator wsdlValidator = new WSDLValidatorImpl();

    // Return validator
    return wsdlValidator;
  }
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.