mace-opensaml-users - RE: How can I create an instance of a AttributeValue
Subject: OpenSAML user discussion
List archive
- From: "Singh, Manish" <>
- To: <>
- Subject: RE: How can I create an instance of a AttributeValue
- Date: Fri, 29 Feb 2008 10:29:50 -0500
This is code from org.opensaml.saml1.core.impl.AttributeTest that might
be helpful to you.
public void testChildElementsMarshall(){
Attribute attribute = (Attribute) buildXMLObject(qname);
XSStringBuilder attributeValueBuilder = (XSStringBuilder)
builderFactory.getBuilder(XSString.TYPE_NAME);
attribute.getAttributeValues().add(attributeValueBuilder.buildObject(Att
ributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME));
attribute.getAttributeValues().add(attributeValueBuilder.buildObject(Att
ributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME));
attribute.getAttributeValues().add(attributeValueBuilder.buildObject(Att
ributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME));
attribute.getAttributeValues().add(attributeValueBuilder.buildObject(Att
ributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME));
assertEquals(expectedChildElementsDOM, attribute);
}
-----Original Message-----
From:
[mailto:]
Sent: Friday, February 29, 2008 10:11 AM
To:
Subject: How can I create an instance of a AttributeValue
How can I create an instance of an AttributeValue of a simple type such
as xs:string.
I have tried the following, but the returned XMLObjectBuilder is null.
XMLObjectBuilder xmlObjectBuilder =
xmlObjectBuilderFactory.getBuilder(AttributeValue.DEFAULT_ELEMENT_NAME);
XSString xsString =
(XSString)xmlObjectBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NA
ME, XSString.TYPE_NAME);
xsString.setValue(value);
Thanks
Regards
Matthew Webb
- How can I create an instance of a AttributeValue, matthew . webb, 02/29/2008
- Re: How can I create an instance of a AttributeValue, HÃ¥kon Sagehaug, 02/29/2008
- RE: How can I create an instance of a AttributeValue, Singh, Manish, 02/29/2008
Archive powered by MHonArc 2.6.16.