}
}
private void processSchemaValidation(Deployment dep, ServerEndpointMetaData sepMetaData, Class<?> sepClass)
{
SchemaValidation anFeature = sepClass.getAnnotation(SchemaValidation.class);
SchemaValidationFeature feature = new SchemaValidationFeature(anFeature.enabled());
String xsdLoc = anFeature.schemaLocation();
if (xsdLoc.length() > 0)
{
if (dep instanceof ArchiveDeployment)
{
try
{
URL xsdURL = ((ArchiveDeployment)dep).getMetaDataFileURL(xsdLoc);
xsdLoc = xsdURL.toExternalForm();
}
catch (IOException ex)
{
throw new WSException("Cannot load schema: " + xsdLoc, ex);
}
}
feature.setSchemaLocation(xsdLoc);
}
Class handlerClass = anFeature.errorHandler();
if (handlerClass != null)
{
try
{
ErrorHandler errorHandler = (ErrorHandler)handlerClass.newInstance();