Welcome to CXF. Yes, in contrast to Axis (IIRC) the -impl option is highly optional in CXF, it's meant to be used *just once* to create a skeleton class that you then move into your basic (non-generated) source structure, then implement its methods there, then you remove that -impl option so the next wsdl2java run won't create that impl class. The impl class is not meant to be auto-generated over and over.

Further, in the Mavenized structure (I highly recommend using Maven), your classes that you implement will be in a different folder (under "src") than the ones generated by wsdl2java (which go under target/generated-sources), so overwriting would not be a concern (although class duplication would be if you forgot to remove the -impl option.) See here for more info: http://www.jroller.com/gmazza/entry/web_service_tutorial , http://www.jroller.com/gmazza/entry/junit_for_soap_clients (latter just to show how to use the -impl option with Maven.)

HTH,
Glen


On 06/20/2012 08:05 AM, nicola.tu wrote:
Hi hackers,

I've created a ws server stub (-server -impl) and added my code in the
generated *Impl class, that implements my server reply to the ws call.
Now, if I rerun wsdl2java (because the wsdl changes, ...) that class is
overwritten and my code is lost. With axis' wsdl2java this did not happened,
but rather I got "....Impl.java already exists, WSDL2Java will not overwrite
it"

I don't want to use -keep because it keeps too many classes, included the
interface, I just want to have my Impl class untouched. Is it possible? Am I
missing something?


--
View this message in context: 
http://cxf.547215.n5.nabble.com/Wsdl2java-overwrites-my-implementation-class-tp5710048.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Glen Mazza
Talend Community Coders
coders.talend.com
blog: www.jroller.com/gmazza

Reply via email to