Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2570

@SchemaValidation annotation does not work if schemaLocation property is not specified

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        1. DataTypes.xsd
          0.7 kB
        2. MessageTypes.xsd
          0.9 kB
        3. SampleService.wsdl
          2 kB

        Activity

          People

            Unassigned Unassigned
            nikoloz_jira Nick Gudushauri (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: