[jbossws-issues] [JBoss JIRA] (JBWS-2570) @SchemaValidation annotation does not work if schemaLocation property is not specified

Steve Cohen (Commented) (JIRA) jira-events at lists.jboss.org
Mon Oct 10 09:24:16 EDT 2011


    [ https://issues.jboss.org/browse/JBWS-2570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633523#comment-12633523 ] 

Steve Cohen commented on JBWS-2570:
-----------------------------------

>> This jira is marked for community contribution, so it's going to be fixed if someone is providing a patch for it. Perhaps you can have a try? 

Sorry, that's a bit above my newbie status at this point.  

Could you at least confirm that I am on the right track - that SchemaValidation fails because the schema cannot be located once the JBoss deployer has transformed it?  I'm pretty sure this is true because I am making progress on a bandaid.  This workaround uses Maven to copy the schema to another web project deployed in the same ear as web content (/{context-root}/schema.xsd).  This can then be seen by the @SchemaValidation tag.  It seems to work pretty well, but it's obviously a bandaid,  However, it's a bandaid that tends to confirm my hypothesis - if JBossws could only see the schema, it could use it to validate.

Perhaps you might be able to enlighten me on why JBoss transforms the wsdl and schema in the first place?  This seems to be a pretty fundamental thing and I'm sure there must be a good reason for it.  Could it be somehow made optional without completely hosing jbossws?  I have a feeling that this is a minefield.  My goal was simply to use JBoss and I may not have enough time to look this deeply into it.



  
                
> @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

        


More information about the jbossws-issues mailing list