[
https://issues.jboss.org/browse/JBWS-2570?page=com.atlassian.jira.plugin....
]
Steve Cohen commented on JBWS-2570:
-----------------------------------
Another solution is here:
http://javaeenotes.blogspot.com/2011/02/when-schemavalidation-in-jax-ws-w...
It looks complicated but it isn't. Just do what the guy says, copy the code and it
works.
Basically, he's defining a handler for validation and using that annotation instead of
the @SchemaValidation.
The handler requires a URL for the schema be passed in. Which is fine since you probably
coded the Schema as a
separate file to begin with.
At least until the bug is fixed.
@SchemaValidation annotation does not work if schemaLocation property
is not specified
--------------------------------------------------------------------------------------
Key: JBWS-2570
URL:
https://issues.jboss.org/browse/JBWS-2570
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-native
Environment: jboss 4.2.3.GA
jbossws-native-3.0.5.GA
Reporter: Nick Gudushauri
Fix For: community contributions
Attachments: DataTypes.xsd, MessageTypes.xsd, SampleService.wsdl
Steps to reproduce:
1. Create simpe JAX-WS service
2. Annotate it with @SchemaValidation annotation WITHOUT specifying optional
schemaLocation property (In such case schema should be extracted from the WSDL)
3. Send test request
As the result no schema validation is performed and you will see the following messages
in log:
17:07:13,421 INFO [SOAPBodyElementDoc] Validating: DOM_VALID
17:07:13,421 WARN [SchemaExtractor] Cannot find element:
{http://schemas.xmlsoap.org/wsdl/}types
17:07:13,625 INFO [UCCServicesBean] Invoking UCC registerClearingOrder service by cer
17:07:14,515 INFO [SOAPBodyElementDoc] Validating: DOM_VALID
17:07:14,515 WARN [SchemaExtractor] Cannot find element:
{http://schemas.xmlsoap.org/wsdl/}types
The problem root is that org.jboss.ws.extensions.validation.SchemaExtractor class could
not load 'types' element from WSDL as this element does not present in WSDL
directly but imported via 'import' element.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira