I'm generating a bottom-up Axis2 webservice in Eclipse. However, once deployed, every element in my WSDL looks like:
for the corresponding javabean:
I thought applying an @XmlElement annotation was the way to go to change this in the emitted xsd, but evidently not.
So how to make Axis2 generate an XSD with anything other than minOccurs="0" nillable="true"? Please don't suggest I change the Integer to an int, as this is obviously not going to work for Strings, which I also need to mark as minOccurs="1" nillable="false"
Xolan, did you get this to work? I have same issue with Axis2.
Joined: Apr 29, 2009
cat MyService.wsdl | sed 's/minOccurs="0"/minOccurs="1"/g' | sed 's/nillable="true"/nillable="false"/g' >MyServiceFixed.wsdl
In other words, no, as it was wasting more time trying to work out why Axis2 doesn't work that it was to just fix the wsdl with a find/replace. I did notice that Eclipse only offers ADB or XMLBEANS databindings, whereas @XmlElement is a JAXB annotation, but then the (virtually nonexistant and unhelpful) documentation on ADB says it's supposed to support JSR222 annotations, which it clearly doesn't, at which point I lost the will to keep digging. Why nothing in Java enterprise is ever simple or easy god only knows.