• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to transform Restriction elements in the schema when we do wsimport for the artifects

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All ,
I have an existing schema which has an elments like :<xsd:element name="AcctNo" type="AcctNoT" />, 'The Name attribute information 'AcctNoT' in this case it is defined in Commons.xsd (another schema).This has got an rectrictions child elements like shown below.

<xsd:simpleType name="AcctNoT">
<xsd:restriction base="char14"/>

</xsd:simpleType>

My question is when we do a wsimport and when the Java artifacts get generateds.Can we also get the restriction related value in Java file.'Char14' in this case.


Thnks in Advance

Java_80
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Sorry, I have never seen JAXB generate code that implements restrictions, like the one in your question.
You could probably use BeanValidation annotations (JSR-303), but you would have to add them by hand.
Best wishes!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic