Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4993

Throw JAXBException if the built JAXBContext from classes are not valid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0
    • None
    • jaxws
    • None

    Description

      In the class JAXWSProxyHandler, there is some logic for choosing classloader of SEI and context classloader. Currently, it would try to build the JAXBContext with both classloaders, and compare them with a set of rules, But I found that JAXBUtils.getJAXBContext method would not return null in most scenarios even if it is not suitable, and context classloader did not have enough chance to win.
      In the JAXBUtils,getJAXBContext, it would first try to build the JAXBContext with context path style, then checked whether the built JAXBContext contains expected reference classes. If not, it will turn to build the JAXBContext with class array style, but the logic for this style is so careful, it would not throw exception as I could see it will try to find a best successful set. Also, JAXBUtils does not check the built JAXBContext contains expected reference classes at this time. Should it also do some checking and throw JAXBException if required ?

      Attachments

        1. AXIS2-4993.patch
          3 kB
          Haihong Xu
        2. AXIS-4993-01.patch
          5 kB
          Haihong Xu

        Activity

          People

            Unassigned Unassigned
            xuhaihong Haihong Xu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: