This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How to make Axis2 bottom-up webservice make minOccurs="1" nillable="false"  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Xolan, did you get this to work? I have same issue with Axis2.
 
Xolani Nkosi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody had more luck about it? That's exactally what I was gonna ask
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same issue in JAX-WS and apache cxf bottom-up web service . Any suggestions will be a big help.
 
Men call me Jim. Women look past me to this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!