Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-229

JAXBXmlProvider should tolerate user jaxb contexts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1
    • 1.1
    • Common
    • None

    Description

      Ran into a sample that had an extra creator method in the ObjectFactory that returned a JAXBElement. When this method exists, and the jaxbcontext is created using the String signature in a user's JAXB context resolver, the unmarshaller will call the ObjectFactory method that returns the JAXBElement, and thus the provider will return a JAXBElement, which may not be the desired object for the resource – this would result in an IllegalArgumentException: argument type mismatch when calling the resource method.

      See patch, with test. It'll make sense.

      Also, we don't have a good set of tests for the JAXBXmlProvider. The one included here in the patch is a good one to use for additional JAXB tests.

      Attachments

        1. WINK-229.patch
          15 kB
          Michael Rheinheimer
        2. WINK-229_2.patch
          16 kB
          Michael Rheinheimer

        Activity

          People

            Unassigned Unassigned
            rott Michael Rheinheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: