[
https://issues.apache.org/jira/browse/CXF-3813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463124#comment-13463124
]
Daniel Kulp commented on CXF-3813:
----------------------------------
Jason,
Most likely, in AnnotationsFactoryBeanListener.addSchemaValidationSupport, just
do:
{code}
if (annotation.enabled()) {
endpoint.put(Message.SCHEMA_VALIDATION_ENABLED, annotation.type());
} else {
endpoint.put(Message.SCHEMA_VALIDATION_ENABLED, "none");
}
{code}
which would record the property as the String. (or use an Enum for type and do
type().toString())
Then in AbstractInDatabindingInterceptor and the Out version, update the
setSchemaInMessage method to get the contextual property as an Object and if
it's a Boolean (backwords compat), do current, else if String, check for the
Request/Response/Both/True/None/False values and act appropriately. That
should keep it completely compatible with existing configs, but also allow
using "schema-validation-enabled", "Request" as the properties in the configs
to just get that behavior.
Also, not sure if it should be "Request"/"Response" or "In"/"Out". Might be
easier and make more sense for In/Out cause a global "In" on the Bus would
validate all incoming messages (could be the Request for services, but the
response for clients).
> Possibiblity to only validate requests and/or responses
> -------------------------------------------------------
>
> Key: CXF-3813
> URL: https://issues.apache.org/jira/browse/CXF-3813
> Project: CXF
> Issue Type: Improvement
> Components: JAX-WS Runtime
> Affects Versions: 2.4.2
> Environment: N/A
> Reporter: David J. M. Karlsen
> Labels: cxf, schema, validation, xsd
>
> Today it is possible to specify to validate or not, it would be even better
> if one could specify to only validate requests, only responses, or both as
> today.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira