setNotValue
adrian.brock Oct 25, 2005 6:36 PMThere is a comment in the code (and an error message) about not supporting
overriding property names of a simple type. It just supports a setValue()
I tried to hack around the issue with a "null" convertor that takes a string
and outputs the same string, but this just looks to have confused it,
so there is probably more to it or I have found another problem? :-)
<xsd:complexType name="beanType"> <xsd:annotation> <xsd:appinfo> <jbxb:class impl="org.jboss.test.xml.pojoserver.metadata.AbstractBeanMetaData"/> </xsd:appinfo> </xsd:annotation> <xsd:sequence> ... <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"> <xsd:annotation> <xsd:appinfo> <jbxb:property name="supplies" collectionType="java.util.HashSet"/> </xsd:appinfo> </xsd:annotation> </xsd:element> </xsd:sequence> ... </xsd:complexType> <xsd:complexType name="supplyType"> <xsd:annotation> <xsd:appinfo> <jbxb:class impl="org.jboss.test.xml.pojoserver.metadata.AbstractSupplyMetaData"/> <jbxb:characters> <jbxb:property name="supply"/> <jbxb:value unmarshalMethod="org.jboss.test.xml.pojoserver.metadata.StringDataTypeConverter.unmarshalStringValue"/> </jbxb:characters> </xsd:appinfo> </xsd:annotation> <xsd:simpleContent> <xsd:extension base="xsd:string"/> </xsd:simpleContent> </xsd:complexType>
2005-10-25 18:10:26,781 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding] startElement {urn:jboss:bean-deployer}supply in org.jboss.xb.binding.sunday .unmarshalling.SequenceBinding@15856a5, 10: {urn:jboss:bean-deployer}annotation {urn:jboss:bean-deployer}constructor {urn:jboss:bean-deployer}property {urn:jboss:bean- deployer}create {urn:jboss:bean-deployer}start {urn:jboss:bean-deployer}stop {urn:jboss:bean-deployer}destroy {urn:jboss:bean-deployer}depends {urn:jboss:bean-deployer }demand {urn:jboss:bean-deployer}supply ] 2005-10-25 18:10:26,781 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding] found {urn:jboss:bean-deployer}supply in org.jboss.xb.binding.sunday.unmars halling.SequenceBinding@15856a5 2005-10-25 18:10:26,781 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$ 1@1fd5e2 2005-10-25 18:10:26,783 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed {urn:jboss:bean-deployer}supply=org.jboss.test.xml.pojoserver.met adata.AbstractSupplyMetaData@106fc94, binding=org.jboss.xb.binding.sunday.unmarshalling.ElementBinding@1b06041[{urn:jboss:bean-deployer}supply] 2005-10-25 18:10:26,783 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] poped {urn:jboss:bean-deployer}supply=org.jboss.xb.binding.sunday.unmars halling.ParticleBinding@7f5580 !! This should be going into the HashSet on the AbstractBeanMetaData!! 2005-10-25 18:10:26,784 WARN [org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil] Neither getter/setter nor field were found for field supplies in class or g.jboss.test.xml.pojoserver.metadata.AbstractSupplyMetaData
I was a bit suspicous about this being the last element in a sequence,
but that was just some bad debug logging. :-)