Skip to Content.
Sympa Menu

mace-opensaml-users - Re: SAML 2.0 metadata

Subject: OpenSAML user discussion

List archive

Re: SAML 2.0 metadata


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: SAML 2.0 metadata
  • Date: Fri, 12 May 2006 07:49:20 -0400

I'm going to be doing some work with AttributeValue handling this weekend. Here's the root of the problem. AttributeValue is defined as an "any" type and xsi:type is not a required attribute so:

- If xsi:type is available, the code will attempt to look up the needed class (builder/marshaller/unmarshaller) based on that
- If it's not available, the code will attempt to look up the needed class based on the element's name
- If there still isn't anything available, the code will use the ElementProxy classes so that it can at least wrap the content so it's not lost.

Given the error you've encountered I'd guess that the attribute value you're trying to read does not have a schema instance type attribute and that AttributeValue isn't registered or is specifically registered to use the ElementProxy element.

Manuela Stanica wrote:
Hi,

I noticed that the openSAML2 and XMLTooling code compiles again, great!
I still have a question though concerning AttributeValues. I haven't found out yet how I can read the value of an <AttributeValue>. It looks like there have been some changes made around this, are they documented somewhere? I've looked into the code and found an example of how I could read this value and tried to do the same in my code, but it doesn't seem to work.
I have something like:
List<XMLObject> attrValList = idpDescr.getAttributes().get(i).getAttributeValues();
for(int n=0; n<attrValList.size(); n++){
XSString value = (XSString) attrValList.get(n);
String val = value.getValue();
.............................
}
Here I get a java.lang.ClassCastException: org.opensaml.xml.ElementProxy when trying to do the casting to XSString.
So how can I get to my AttributeValues..?

Cheers,
Manuela



--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124



Archive powered by MHonArc 2.6.16.

Top of Page