Hi Joerg, This is maybe not a solution, but I think it is a nice way to get things working:
I had problems like yours, and was very confused as well. I ended up using the option (I don't remember the exact name of the option, but I think it was "-f") in wsdl2java to make the generated source be in a DIFFERENT package than the original java source. Example: My class no.geomatikk.soap.poi.PoiUtility defined my interface. After running java2wsdl and then wsdl2java, it ended up as no.geomatikk.soap.axis.poi.PoiUtility. Doing this ensured absolutely no confusion about what was the generated source and not, and it also made the classpath settings much simpler. Hope this helps. Regards, Eirik > -----Original Message----- > From: Joerg Buchberger [mailto:[EMAIL PROTECTED]] > Sent: 4. februar 2003 11:34 > To: [EMAIL PROTECTED] > Subject: Java2WSDL2Java overwrites pre-existing class > > > Hi all. > > What am I doing wrong here ? > What am I missing ? > > 1. Did define a simple Java interface (see description of > interface and two > utility-classes below). > 2. Used Java2WSDL on it. > 3. Then used WSDL2Java on the resulting wsdd-file. > > After that one (not none, not both, but one) of my utility-classes got > overwritten by WSDL2Java. The same is true for the initial > interface. (No > original code, e.g. methods etc. is preserved at all.) > > Then I separated my source dir from the axis-generated-source-dir. > That just helped me to preserve my sources, of course. > When it comes to compiling I either can't use the > axis-generated-classes or my > utility-classes depending on which get compiled first and subsequently > overwrite the other. (As a consequence the whole thing doesn't compile > completely.) > > Note: This example is a simplification of the real code; for > ease of reading > and discussing. > If you need additional informations in order to help, please > let me know which > wsdl, wsdd file or whatever else I should additionally post > (didn't want to > include more, because the mail is already quite big). > > Thanks a lot. > Cheers, > Joerg > > > p.s. here the descriptions of initial interface and the > utility classes (Item > is part of the interface, i.e. it is the services return > value; Key in turn is > part of the Item class.) > > > <INTERFACE-SNIP> > package com.project.services; > import com.util.Item; > > public interface Foobar > { > public Item getFoo(); > > } > </INTERFACE-SNIP> > > > > <ITEM-TYPE-SNIP> > package com.util; > > import java.util.List; > > public class Item extends Object > { > public Item() > { > } > > public Item(Key itemID, String itemName, List childrenList) > { > this.itemID = itemID; > this.itemName = itemName; > this.childrenList = childrenList; > > } // END constructor > > private Key itemID; > private String itemName; > private List childrenList; > > (... public getter / setter methods for above attributes ...) > > } > </ITEM-TYPE-SNIP> > > > <KEY-TYPE-SNIP> > package com.util; > > public class Key extends Object > { > public Key() > { > } > > public Key(int itemPos, int repositoryID) > { > this.itemPos = itemPos; > this.repositoryID = repositoryID; > > } // END constructor > > private int itemPos; > private int repositoryID; > > (... public getter / setter methods for above attributes ...) > > } > </KEY-TYPE-SNIP> > >
