• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
java webcoder
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!