Title: Usage of optional attributes

Hi,

I'm not sure, if this has been discussed before (I searched for 'optional attributes'). If so, please sent me a hint for that thread.

My question is: How can I make usage of optional attributes with Axis and WSDL2Java, if the type of the attribute is mapped to a simple type? For example an attribute of type long cannot be optional as it always has the default value 0. So it will always be present in a serialized SOAP request whether it's optinal or not.

I found out that attributes are mapped to Objects (Long, Integer, ...) if the attribute is marked as "nillable" in the wsdl file. But the XSD spec says that "nillable" is not allowed for attributes. So this is not really a good solution.

Any clues?

Thanks,
 Matthias.

Reply via email to