On Sunday, April 01, 2012 02:23:47 AM arikgold wrote:
> Hi,
> 
> I generate wsdl&xsd from java using the java2ws.
> 
> I have WebMethod that returns List<com.myOrg.pkg1.Employee>
> I have a derived class SpecialEmployee extends Employee that is defined in
> other package.
> I want to add SpecialEmployee to the xsd file.
> I can't add the XmlSeeAlso to the Employee class because it doesnt know
> SpecialEmployee (and shouldnt know all its derived classes)

Ideally, you could stick the XmlSeeAlso annotation on the SEI or even the 
service impl.   Since the service itself SHOULD know about the subclasses 
that it can accept, sticking it there would normally be acceptable, right?   
That's definitely the preferred way to go.

> JAXB allows solving it using the jaxb.additionalContextClasses setting.
> 
> Does java2ws supports it as well?
> If yes, how should I define it?

There is a "-beans file" flag that you can pass to java2ws to handle this.   
You obviously would need to have spring jars and such.  

Dan




> 
> Thanks
> Arik
> 
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/does-java2ws-support-jaxb-additionalConte
> xtClasses-tp5610097p5610097.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to