I have a situation that can be represented by this scenario:
* I have two wsdls.  One contains a webservice interface for ordering Bikes. 
It references an XSD that describes my Bike object.  The other contains a
webservice interface for ordering Cars.  It references an XSD that describes
my Car object. 
* Both of my two xsds (Bike.xsd and Car.xsd) reference a third xsd that
describes a Vehicle.  
* Bike and Car both extend Vehicle.

When I use wsdl2java to generate my web service for the Bike WS, I get a
nice object hierarchy where Bike subclasses Vehicle.  The Vehicle class has
a JAXB annotation like this:
@XMLSeeALso({Bike.class})

Similarly when I use wsdl2java on the carws.wsdl, My car object extends
Vehicle and Vehicle has a JAXB annotation pointing to Car.class.

My problem is that I want the Vehicle class to be shared between both Car
and Bike.  I know I could hand edit the file after I generate it, but I'd
like to avoid that if possible.  Is there a solution for this?  I was
originally looking for a solution where I could pass in both wsdls at the
same time, but it didn't look like that was possible.  I appreciate any
help.
-- 
View this message in context: 
http://www.nabble.com/Can-wsdl2java-generate-common-classes-from-an-xsd-shared-between-several-wsdls--tp21715213p21715213.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to