On Oct 2, 2012, at 7:54 AM, Lenden <[email protected]> wrote: > Hello everybody, > > i've a small problem, i'm using CXF's tool "WSDL2JAVA" to creata an API > which will consume some web services.. > > Everything works great, but the only thing that bothers me is that in the > generated code, i'm getting something like this: > > public java.lang.String > someMethod(*com.dir1.dir2.dir3.client.api.*PARAMCLASS parameters){ > > ......... > > } > > the bold part is bothering me, is it possible to not have all the package > tree before "PARAMCLASS", and have it in import section?? Maybe i'm missing > some WSDL2JAVA's option?
There isn't anything like that right now, no. If it's something you'd like to pursue, I can certainly provide pointers. Most likely, the various generators in org.apache.cxf.tools.wsdlto.frontend.jaxws.generators would need to be updated to walk the class they are generating prior to calling generate to build up the import list. That's likely not that hard to do. Then the Velocity templates would probably need to call into a function of some sort to see if the class is in the imports and if so, strip it down. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
