Looking at the code I notice when you prepare the attribute set for marshalling the attributes themselves get sorted based on the marshalled value of the attribute itself:
From reading the CMS RFC I can't see why the attributes need to be sorted, and when changing the code to not have them sorted, validation begins to fail. Wondering if you can provide some insight into why the sorting needs to occur.
Looking at the code I notice when you prepare the attribute set for marshalling the attributes themselves get sorted based on the marshalled value of the attribute itself:
From reading the CMS RFC I can't see why the attributes need to be sorted, and when changing the code to not have them sorted, validation begins to fail. Wondering if you can provide some insight into why the sorting needs to occur.