Caused by: java.lang.RuntimeException: QName points error setting property points with value org.jboss.beans.metadata.plugins.QualifierPoint
@3e5dc994 to org.jboss.beans.metadata.plugins.AbstractInjectQualifierMetaData@2136814472
at org.jboss.xb.builder.runtime.PropertyHandler.handle(PropertyHandler.java:60)
at org.jboss.xb.builder.runtime.AbstractPropertyHandler.doHandle(AbstractPropertyHandler.java:98)
at org.jboss.xb.builder.runtime.AbstractPropertyHandler.attribute(AbstractPropertyHandler.java:118)
at org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler.attributes(AttributesHandler.java:51)
at org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.attributes(DefaultElementHandler.java:65)
at org.jboss.xb.builder.runtime.BeanHandler.startParticle(BeanHandler.java:109)
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:616)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
... 29 more
Caused by: java.lang.IllegalArgumentException: Wrong arguments. setPoints for target org.jboss.beans.metadata.plugins.AbstractInjectQualifie
rMetaData@57922f46 expected=[java.util.List] actual=[org.jboss.beans.metadata.plugins.QualifierPoint]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:69)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:151)
at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
at org.jboss.xb.spi.AbstractBeanAdapter.set(AbstractBeanAdapter.java:95)
at org.jboss.xb.builder.runtime.PropertyHandler.handle(PropertyHandler.java:56)
... 47 more

and

<qualifier points="Constructor, Property">123</qualifier>

fails with

Caused by: java.lang.RuntimeException: Invalid value Constructor, Property valid are [Method, Property, Constructor]
at org.jboss.xb.builder.runtime.EnumValueAdapter.cast(EnumValueAdapter.java:136)
at org.jboss.xb.builder.runtime.AbstractPropertyHandler.attribute(AbstractPropertyHandler.java:115)
at org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler.attributes(AttributesHandler.java:51)
at org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.attributes(DefaultElementHandler.java:65)
at org.jboss.xb.builder.runtime.BeanHandler.startParticle(BeanHandler.java:109)
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:616)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
... 29 more

Actually, we can do it by providing a value adapter. But in the schema the type of the attribute will have to be just string. So, if you care about pure XML validation this attribute will be valid as long as the value is a string.

I think I have got the choice ok (copied from the thing I am mimicking), but am unsure about the attributes. What I want is

- An attribute called 'content' that just takes a string.

- An attribute called 'type' that can be either 'Supplied', 'Optional' or 'Required' with 'Supplied' as the default.

- An attribute called 'points' that can take one or more of 'Constructor', 'Method' or 'Property'. If I am on the right path, can I make it ignore the case of these so that 'propeRTY' etc. would be valid as well?