0

I have an element in XSD schema:

<xsd:any processContents="skip"/>

Is it possible to switch processContents to strict through XJB binding? Without modifying schema file. May be set it as global property. I want to get:

@XmlAnyElement(lax = true)
protected Object any;

instead of:

@XmlAnyElement
protected Element any;
Mikhail
  • 4,175
  • 15
  • 31

1 Answers1

1

You could totally change the annotation and the attribut's type. But beware if you generate your code from the XSD your modifications would be crushed.

Could you explain a little bit more your work context, needs and goals. Why can't you touch the XSD, do you generate classes from the XSD by JaxB? Do you use the XSD for validation purposes?

sgirardin
  • 428
  • 5
  • 12
  • I have to send/receive messages in a format specified by XSD, which might change in a fututre. And I am not the owner of this XSD, that`s why changing it or generated class is highly undesirable. I`ve found annox plugin http://confluence.highsource.org/display/ANX/Home. But page is unavailable. Do you know how to use it? – Mikhail Jul 31 '13 at 13:46
  • Yes the website seems down for the moment, but you can load it from google cache (do a simple research in google and you should find the option on the right if the link). I used jaxb .xjb files to personalize bindings (http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html) but then I don't know precisely for your question. – sgirardin Jul 31 '13 at 13:54