Problem while marshalling SAML-Attribute

Selhorst, Marcel Marcel.Selhorst at BDR.de
Fri Jan 25 08:56:48 EST 2013


Dear List,

I am currently facing a problem when trying to marshall an AuthnRequest.
I have an extension with an xsAny-Object. In it, I'd like to add a couple of Attributes (saml2:Attribute) with AttributeValues (saml2:AttributeValue).
If I use xsString as an AttributeValue-Object, everything works fine.
However, if I use any other type (such as xsBoolean, xsDateTime, ...), I get the following Marshalling exception:

java.lang.ClassCastException: org.opensaml.xml.schema.impl.XSBooleanImpl cannot be cast to org.opensaml.xml.schema.XSString
	at org.opensaml.xml.schema.impl.XSStringMarshaller.marshallElementContent(XSStringMarshaller.java:39)

Please find attached the full stack trace along with a demo testcase.
If you remove the comment on line 83, you will get the exception.
Any idea?

Thanks in advance,
Marcel

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SAML_Marshalling_Exception.txt
Url: http://shibboleth.net/pipermail/dev/attachments/20130125/223bfbbe/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SAMLAttributeTestCases.java
Type: application/octet-stream
Size: 4999 bytes
Desc: SAMLAttributeTestCases.java
Url : http://shibboleth.net/pipermail/dev/attachments/20130125/223bfbbe/attachment.obj 


More information about the dev mailing list