Hi Jochen. Thanks a lot for your help. A few more questions:

> > * Arrays
> > I'm defining Array like structures using unbounded elements. Two 
> > issues here: The first is that i get a java.util.List, instead of a 
> > proper strong-typed array of the object type. The second is 
> that the interface only exposes a get method, no set. I've 
> looked and played a bit with the way i'm generating the 
> objects and can't seem to find any way to actual set these values.
> 
> Again, I agree that I'd prefer to have things the way you 
> want it. But the JAXB specification states, that arrays must 
> be explicitly enabled, for example by setting 
> jaxb:globalBindings/@collectionType="indexed".

This seems to work fine for Java primitive types (i could find an
example in the source package), but i cannot get it to work if the
mapping object is a Java Object. I get an error while generating the
source using the xjc ant target:
"Null token detected."

So, this works:
<xsd:element name="ArrayElement" minOccurs="0" maxOccurs="unbounded"
type="xsd:int">
        <xsd:annotation>
                <xsd:appinfo>
                        <jaxb:property collectionType="indexed"/>
                </xsd:appinfo>
        </xsd:annotation>
</xsd:element>

But this doesn't:
<xsd:element name="ArrayElement" minOccurs="0" maxOccurs="unbounded"
type="xsd:string">
        <xsd:annotation>
                <xsd:appinfo>
                        <jaxb:property collectionType="indexed"/>
                </xsd:appinfo>
        </xsd:annotation>
</xsd:element>

Same if i use a complexType defined in the targetNamespace. Is there
another magic attribute that i can set? I also don't understand why only
the getXXX() method is generated in the source for the case of a List
instead of an indexed array. Why don't i get a
setArrayElement(java.util.List) in the following:
<xsd:element name="ArrayElement" minOccurs="0" maxOccurs="unbounded"
type="xsd:string">
        <xsd:annotation>
                <xsd:appinfo>
                        <jaxb:property
collectionType="java.util.ArrayList"/>
                </xsd:appinfo>
        </xsd:annotation>
</xsd:element>

The java.util.List getArrayElement() is there...


Other issues:
- JaxMe defines its own QName class within the same package as the one
that comes with J2EE (i've seen that in JDK 1.5 it is already there).
Unfortunately Axis also does the same, with one constructor missing. As
i have both in my classpath this is a problem. The solution i came up
with was to "fix" the autogenerated code - don't kill me - so that it
uses the construtor QName(String, String) - and just ignore the third
parameter... i've not yet seen if this will break something somewhere
else :).

- is support for definition of the JAXB binding information in an
external binding file coming up? I've seen in the docs that it is not
currently available.

Thanks in advance,
  Ricardo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to