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);
}