Package org.eclipse.wst.wsi.internal.core.util

Examples of org.eclipse.wst.wsi.internal.core.util.ErrorList


    TestAssertion testAssertion,
    EntryContext entryContext)
    throws WSIException
  {
    result = AssertionResult.RESULT_PASSED;
    ErrorList errorList = new ErrorList();

    // Get the types from the entry context
    Types types = (Types) entryContext.getEntry().getEntryDetail();

    if (types != null)
    {
      ExtensibilityElement extElement;
      List extElements = types.getExtensibilityElements();

      // Process each ext. element
      for (int i = 0; i < extElements.size(); i++)
      {
        // If it is an unknown ext. element and it is a schema, then check it
        if ((extElement = (ExtensibilityElement) extElements.get(i))
          instanceof Schema)
        {
          if (!extElement.getElementType().equals(WSITag.ELEM_XSD_SCHEMA))
          {
            // If it is not a schema definition, then it is an error
            errorList.add(
              extElement.getElementType().toString()
                + " can not be a child of the wsdl:types element.");
          }
        }
      }
    }

    // If XMLSchemaValidator could not find any errors, check errors from the inline schema validator
    if (errorList.isEmpty())
      errorList.add(validator.wsdlDocument.getSchemasValidationErrors());

    if (!errorList.isEmpty())
    {
      result = AssertionResult.RESULT_FAILED;
      failureDetail = this.validator.createFailureDetail(errorList.toString(), entryContext);
    }

    return validator.createAssertionResult(testAssertion, result, failureDetail);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsi.internal.core.util.ErrorList

Copyright © 2018 www.massapicom. 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.