Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6118

Schema Validation refinements

    XMLWordPrintableJSON

Details

    • Moderate

    Description

      Disabling input schema-validation for my <jaxws:client> was unsuccessful following the docs. Neither 'false' nor 'NONE' were effective and the client (an integration test) was still validating & throwing exceptions.

      Debugging the CXF code, I found Message.SCHEMA_VALIDATION_ENABLED being set to 'IN' by code in AbstractInDatabindingInterceptor.setOperationSchemaValidation(). This setting of 'IN' appears to be coming from the Service/ Endpoint definitions!

      I had defined the service (LoanApplicationWS) as validating IN (by means of annotations). When I changed the service validation to NONE, client was no longer forced to validate.

      There are two issues here:
      1) Service/Endpoint validation settings, should not automatically be overriding Client settings
      2) Service OUT validation corresponds to Client IN validation; the directions are inverted.

      The background here, is to extend a service & schema designed for "complete" Loan Applications to be able to retrieve "draft" applications – which are only partly-formed, and thus do not include some elements required in the schema.

      For this reason, I intend to disable output validation of the Service; and correspondingly disable input validation at the Client.

      However, CXF is somehow finding validation settings Service/Endpoint and applying them (in an incorrect directional sense) to the Client.

      I've included screenshots of the Client 1) broken and 2) working, according to changes to the Service validation setting.

      Please find a partial project attached containing a few relevant files & the screenshots.

      Thanks,
      Regards
      Thomas

      Attachments

        1. problem example.zip
          284 kB
          Thomas Whitmore

        Activity

          People

            jpell Jason Pell
            thomasw_nz Thomas Whitmore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: