开发者

jaxb - generate classes from single schema in different packages depending on namespace

开发者 https://www.devze.com 2023-01-15 11:14 出处:网络
My requirement is that I have a very big schema and it has many different tags with different namespaces. I want to generate classes from that schema into different packages and I want th开发者_如何转

My requirement is that I have a very big schema and it has many different tags with different namespaces. I want to generate classes from that schema into different packages and I want th开发者_如何转开发is thing to be bases on namespace i.e. I want classes corresponding to tags in one namespace to be in one package and classes corresponding to tags in other namespace to be present in different name space. I want an ant task to perform the above functionality


Actually, this is normal JAXB behaviour: XJC derives packages from namespace URIs (http://www.acme.com/foo -> com.acme.foo).

Here's a sample Ant "Purchase Order" project:

http://confluence.highsource.org/display/J2B/Downloads

0

精彩评论

暂无评论...
验证码 换一张
取 消