Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-5188

Need to remove ImmutableListAdapter and ImmutableCollectionAdapter from our service definitions and come up with a better solution because it is producing undesirable XML


    • Type: Bug Fix
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-m5, 2.0
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required


      Currently, the ImmutableListAdapter is producing XML schema like the following (this example is from the GroupService):

      <xs:complexType name="getDirectParentGroupIdsResponse">
           <xs:element minOccurs="0" name="directParentGroupIds" type="ns1:anyTypeArray"/>

      In this case, anyTypeArray comes from the http://jaxb.dev.java.net/array schema and does not properly use the schema types from the elements of the "array". This is because this adapater is currently declared as follows:

      public class ImmutableListAdapter extends XmlAdapter<Object[], List<?>> {

      This use of Object[] triggers the issue. Unfortunately, because of the nature of type erasure and the way that the JAXB adapter system works, there is no way to create a single, general-purpose adapter that targets the appropriate parameterized list type.

      Possible options here include:

      1. Look at the possibility introducing a custom CXF interceptor which will translate appropriately, would need to define a custom marker annotation to identify which lists/collections need to be unmodifiable
      2. Add some functionality to the KSB so that it creates it's own client-side proxies that consider immutability on list return types, would still need a custom annotation as above
      3. Create an adapter class per immutable parameterized list type and annotate using that

      Either way, the current usage of ImmutableListAdapter and ImmutableCollectionAdapter needs to be removed.



          ewestfal Eric Westfall created issue -
          jwhaley Jason Whaley (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.0 [ 14190 ]
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Start Date
          Fix Date 2012-01-27 [ set to sprint end date ]
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow custom [ 97822 ] Copy of custom for rice [ 212720 ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow Copy of custom for rice [ 212720 ] custom [ 222468 ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow custom [ 222468 ] Rice Workflow [ 232216 ]


            • Assignee:
              jwhaley Jason Whaley (Inactive)
              ewestfal Eric Westfall
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: