The XACML examples in the specification contain white-space characters in many <AttributeValue> tags, for indenting the text. sunxacml doesn't strip this text, but should.
Example: <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer"> 18446744073709551616
</AttributeValue>
Results in:
java.lang.NumberFormatException: For input string: "
18446744073709551616
"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at com.sun.xacml.attr.IntegerAttribute.getInstance(IntegerAttribute.java:145)
at com.sun.xacml.attr.IntegerAttribute.getInstance(IntegerAttribute.java:126)
at com.sun.xacml.attr.proxy.IntegerAttributeProxy.getInstance(IntegerAttributeProxy.java:57)
When I remove the white-space around the number, it works.
Logged In: YES
user_id=608379
Originator: YES
Just a small addition: Of course it doesn't work, since sunxacml cannot handle integer numbers larger than 2^63-1. (There's a difference between xs:integer and xs:long.)
Logged In: YES
user_id=608379
Originator: YES
Finally I'm not sure whose fault this is:
either the XACML committee doesn't know XML well enough to provide valid examples without the extra confusing white-space.
or sunxacml should strip white-space, but I couldn't find anything in the XML or XACML specification that requires an implementation to do so.
So the more probable cause is the XACML committee. Sad, but true.