Discussion:
Webservice (JAX-WS) and schema validation using standard way (not proprietary)
COURTAULT Francois
2017-11-22 15:34:05 UTC
Permalink
Hello,

As far as I have seen in the JAX-WS 2.3 specification there is no special description on how to perform a schema validation on SOAP incoming request.
Previously, I used Weblogic, so we have used @SchemaValidation annotation.

Does this annotation work on TomEE ?

So I have looked on other possibilities trying to not used proprietary annotation or facilities. I have found the following solutions:

- Implement a Provider and use a Validator
@WebServiceProvider(....)
public xxxRequest implements Provider<SOAPMessage> {
@override
public SOAPMessage invoke(final SOAPMessage request) {
// use a Validator here
}
}

- Use @HandlerChain(file= "handler-chain.xml") with a SOAPHandler

What is the best approach ? Is there other standard way to do that ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
Romain Manni-Bucau
2017-11-22 16:18:18 UTC
Permalink
Hi Francois,

Looks good to me. Was used to CXF API but portably it looks like you have
better solution.
Post by COURTAULT Francois
Hello,
As far as I have seen in the JAX-WS 2.3 specification there is no special
description on how to perform a schema validation on SOAP incoming request.
Does this annotation work on TomEE ?
So I have looked on other possibilities trying to not used proprietary
- Implement a Provider and use a Validator
@WebServiceProvider(....)
public xxxRequest implements Provider<SOAPMessage> {
@override
public SOAPMessage invoke(final SOAPMessage request) {
// use a Validator here
}
}
What is the best approach ? Is there other standard way to do that ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees
and may contain confidential information. Any unauthorized use or
disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for
the message if altered, changed or falsified. If you are not the intended
recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission
free from viruses, the sender will not be liable for damages caused by a
transmitted virus.
Loading...