On Saturday 05 February 2011 10:27:55 pm np wrote:
> Yes I am referring to schema versioning.
> 
> This article presents 3 options of achieving the same
> (http://www.xfront.com/Versioning.pdf)
> 
> Option 1: Change the (internal) schema version attribute.
> Option 2: Create a schemaVersion attribute on the root element.
> Option 3: Change the schema's targetNamespace
> 
> I am interested in option 1 or option 2 above.
> Is there a way of  configurating the schema version in a CXF generated wsdl
> to achieve any of option 1 or 2 above.
> 
> The underlying framework used for wsdl generation is jaxb.

Well, looking into the JAXB code, on line 628 of XmlSchemaGenerator.java, I 
see:
                schema.version("1.0");

Thus, it's not going to be an "easy" thing to control.  :-)

You COULD create a subclass of the JAXBDataBinding and override the method:

public XmlSchema addSchemaDocument(ServiceInfo serviceInfo, 
SchemaCollection col, Document d,
                                       String systemId)

Take the Document (which would be generated by JAXB) and change the version 
attribute on it and then call the superclass.     That's probably the easiest 
way to handle it.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to