{
definitionContext = getWadlContext( messageExchange, context );
}
catch( Exception e1 )
{
throw new AssertionException( new AssertionError( e1.getMessage() ) );
}
WadlValidator validator = new WadlValidator( wadlContext );
try
{
AssertionError[] errors = validator.assertResponse( messageExchange );
if( errors.length > 0 )
throw new AssertionException( errors );
}
catch( AssertionException e )
{
throw e;
}
catch( Exception e )
{
throw new AssertionException( new AssertionError( e.getMessage() ) );
}
return "Schema compliance OK";
}