| Author |
How to make Axis2 bottom-up webservice make minOccurs="1" nillable="false"
|
Xolani Nkosi
Ranch Hand
Joined: Apr 29, 2009
Posts: 32
|
|
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"
|
 |
Arun Kumar
Ranch Hand
Joined: Oct 10, 2007
Posts: 30
|
|
|
Xolan, did you get this to work? I have same issue with Axis2.
|
 |
Xolani Nkosi
Ranch Hand
Joined: Apr 29, 2009
Posts: 32
|
|
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.
|
 |
Hikari Shidou
Ranch Hand
Joined: Jan 22, 2013
Posts: 79
|
|
Anybody had more luck about it? That's exactally what I was gonna ask
|
 |
 |
|
|
subject: How to make Axis2 bottom-up webservice make minOccurs="1" nillable="false"
|
|
|