OpenSAML - Trouble with XSAnyImpl

Nick Duan nduan at verizon.net
Tue Sep 6 17:33:53 BST 2011


XSAny is not a SAMLObject.   So using an unmarshaller for SAMLObject won't
work.  You may want to use an XMLObject's unmarshaller, i.e. the
XSAnyUnmarshaller to be specific.

BTW, if you want to find more info, the basic XMLObject related APIs are
packaged/defined in xmltooling, instead of in opensaml.

Cheers!

ND

-----Original Message-----
From: dev-bounces at shibboleth.net [mailto:dev-bounces at shibboleth.net] On
Behalf Of Nicolas Peifer
Sent: Tuesday, September 06, 2011 11:27 AM
To: dev at shibboleth.net
Subject: OpenSAML - Trouble with XSAnyImpl

Hello,

I have to override the processChildElement(XMLObject parentSAMLObject,
XMLObject childSAMLObject) method in an unmarshaller. The unmarshaller is
for a SAMLObject that is used in place of an anyType. So, the problem is
that when OpenSAML calls the method the parentSAMLObject and childSAMLObject
have the type XSAnyType. Consequently the following cast fails with a
ClassCastException (XSAnyImpl cannot be cast to
CustomOpenSAML.core.AuthnRequestExtension):

public class AuthnRequestExtensionUnmarshaller extends
AbstractSAMLObjectUnmarshaller {
	//... version with highlighted syntax: http://paste.kde.org/118837/
@Override
protected void processChildElement(XMLObject parentSAMLObject, XMLObject
childSAMLObject) throws UnmarshallingException {
		//...
	AuthnRequestExtension authnRequestExtension =
(AuthnRequestExtension) parentSAMLObject;
		//...

Has anyone an idea why these (parameter) objects are of the type XSAnyType
and how can I cast them to the right objects?

Regards,
Nicolas
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
--
To unsubscribe from this list send an email to
dev-unsubscribe at shibboleth.net



More information about the dev mailing list