cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: CXF and using classes in referenced jar files...
Date Tue, 26 Oct 2010 19:21:04 GMT
On Tuesday 26 October 2010 2:20:09 pm michaelloveusa wrote:
> This is the real crux of the issue:
> 
> It seems like I should be able to tell CXF to use an already existing class
> in a referenced jar file and it should recognize not to create the class in
> this project. Is this possible?
> 
> Ideas?

JAXB itself does provide SOME level of this by being able to turn off 
generation of code for a particular namespace, but that's for an entire 
namespace which may be much coarser grained than you want, and certainly 
doesn't cover the cases of the  JAX-WS definted things like the exceptions.   

For the JAX-WS things, it wouldn't be too hard to implement.   If you want to 
submit a patch, the place to look would be in 
org.apache.cxf.tools.wsdlto.core.AbstractGenerator
likely the parseOutputName method where we map the names into a Writer.  You 
could have it check a map of reg-ex patterns or something to see if it should 
skip it and just return null if so.    The trick is to get that map of 
patterns.    I think command line switch like:
-skip=pattern
would be easiest to implement.  For JAXB, the 
org.apache.cxf.tools.wsdlto.databinding.jaxb.TypesCodeWriter would be updated 
to just return some sort of "NullOutputStream" or something for the filtered 
classes to have them not written out.

Anyway, a patch would be great.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message