Hi, I tried in the user's axis mailing list. Nobody seemed to know anything about this, so I am now trying the dev list and see if someone can dissipate the problems I am having with the axis2 generator!
I have a problem with the wsdl2java code generation in axis2 for optional attributes In short, how can I make it generate Objects intead of primitives for OPTIONAL ATTRIBUTES? Axis1 would generate them as Objects, which was great since I could look for nulls as a sign that the client had not include them in the message. However, with Axis2, the class end up with primitives, instead of objects (e.g. int instead of Integer). . Take the following extract from my WSDL schema: ... <xsd:attributeGroup name="ccAttributes"> <xsd:attribute name="ccCGMS_A" type="xsd:int" use="optional"/> <xsd:attribute name="ccACP" type="xsd:int" use="optional"/> <xsd:attribute name="ccDwightCavendish" type="xsd:boolean" use="optional"/> <xsd:attribute name="ccHDCP" type="xsd:boolean" use="optional"/> </xsd:attributeGroup> <xsd:attributeGroup name="osdAttributes"> <xsd:attribute name="osdActive" type="xsd:boolean" use="optional"/> <xsd:attribute name="osdDuration" type="xsd:int" use="optional"/> <xsd:attribute name="osdType" type="xsd:int" use="optional"/> <xsd:attribute name="osdLocation" type="xsd:int" use="optional"/> </xsd:attributeGroup> <xsd:complexType name="streamAttributes"> <xsd:attribute name="channelNumber" type="xsd:int" use="required"/> <xsd:attribute name="sourcePort" type="xsd:int" use="required"/> <xsd:attribute name="sourceAddress" type="xsd:string" use="required"/> <xsd:attribute name="targetPort" type="xsd:int" use="required"/> <xsd:attribute name="targetAddress" type="xsd:string" use="required"/> <xsd:attribute name="level" type="xsd:byte" use="required"/> <xsd:attribute name="mutationInterval" type="xsd:long" use="required"/> <xsd:attribute name="insertionInterval" type="xsd:long" use="required"/> <xsd:attribute name="type" type="xsd:byte" use="required"/> <xsd:attribute name="description" type="xsd:string" use="required"/> <xsd:attribute name="ID" type="xsd:string" use="required"/> <xsd:attributeGroup ref="ns:ccAttributes" /> <xsd:attributeGroup ref="ns:osdAttributes" /> </xsd:complexType> ... So, how could I coerce the axis2 generator to behave like axis1 in this particular issue? Thanks in advance, --Luis R.