[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
Fri Oct 7 18:58:16 EDT 2011


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

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

Can we please get some activity on this?  This bug is almost two years old and it is biting me now, using a different platform jbossas-5.1.0GA and jbossws-native-3.4.0GA.

Even a comment?  Is this ever going to be fixed?

I believe I understand why it happens.  It happens because the supplied WSDL is transformed in deployment, for some reason.  Instead of my original WSDL and schema JBOSS converts it to an "equivalent" format that is quite parseable, but which breaks the schema locator which has no way of finding the original schema which has been renamed.

Here is my WSDL after JBOSS deploys it:

  <?xml version="1.0" encoding="UTF-8" ?> 
- <definitions name="SampleService" targetNamespace="http://org.javactivity/SampleService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.javactivity/SampleService/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://org.javactivity/SampleService" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <import location="http://localhost:8080/sample?wsdl&resource=SampleServicePort_PortType8512585196678794077.wsdl" namespace="http://org.javactivity/SampleService/" /> 
- <service name="SampleService">
- <port binding="ns1:SampleServicePortBinding" name="SampleSOAP">
  <soap:address location="http://localhost:8080/sample" /> 
  </port>
  </service>
  </definitions>

Obviously, I did not name my import SampleServicePort_PortType8512585196678794077.wsdl.

I am attaching the wsdl and schema that I actually built.

If there is a workaround for this problem can someone at least please post 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