One option would be to use a JAXB customization to make it not generate a BasicSO and instead use a pre-written class. Check section 7.7 in the jaxb spec.
<jaxb:class implClass="com.foo.common.BasicSO"/> Dan On Friday 31 August 2007, Kasper Nielsen wrote: > Hi James, > > The problem is that I don't have much control over the wsdl, it is > generated automatically by a client of ours using weblogic. It is > basicly just some EJB's that are exposed as services. > > Any help would be appreciated > - Kasper > > James Mao wrote: > > Hi, > > > > If you put the BasicSo in the same namespace, then it'll generate > > just one class > > You can abstract the common stuff in a wsdl, then use <wsdl:import > > .../> to include the common wsdl in your multiple wsdls > > > > Will it solve your problem? > > > > James > > > >> Hi, > >> > >> I'm currently generating 10 Java clients from multiple WSDL's using > >> the maven wsdl2java plugin. > >> The clients generated are put into the following packages: > >> com.foo.p1 > >> com.foo.p2 > >> ... > >> com.foo.p10 > >> > >> Almost all objects returned from any of the 10 services extend the > >> same basic class, let's call it BasicSO. > >> So what I end up > >> com.foo.p1.BasicSO > >> com.foo.p2.BasicSO > >> ... > >> com.foo.p10.BasicSO > >> > >> I have a lot of methods that need to operate on BasicSO, and I'd > >> rather not > >> have to make a method for each of the 10 BasicSO. Is there any way > >> I can generate clients that share objects between multiple > >> services? > >> > >> I could generate all the clients into the same package. But I would > >> rather > >> not since I end up with around 2000 objects in the same package > >> which make > >> it rather difficult to navigate. > >> > >> Anybody got some ideas? > >> Cheers > >> Kasper -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
