Add an @XmlSeeAlso annotation to point to all the subclasses. You can stick
that on the SEI interface or onto the "ParentResult" class or similar.
Basically, that allows JAXB to find all the usable subclasses.
Dan
On Tue June 23 2009 4:46:48 pm Rahul Joshi wrote:
> Hi all,
>
> I've just started with CXF to integrate & deploy my existing pojo
> application as a webservice. I am using JAX-WS annotation style to
> accomplish this.
> All is running well, the service gets published and I can call it
> sucessfully using the stubs I generate from wsdl. The problem is that one
> of my essential (return) class is not getting discovered.
> The struct is like this:
>
> *...@webservice(endpointInterface = "com.abcd.handler.Login", serviceName =
> "LoginService")*
> Class LoginImpl implements Login
> {
> public *ParentResult* execute(int request)
> {
> ....
> ....
>
> return new *SomeChildResult*(String response);
> }
> }
>
> In the wsdl for above, as expected, SomeChildResult class (*it extends
> ParentResult*) is not being discovered and when I used WSDL2Java parser
> this is missed out. Which of course leads to a client side exception when
> it tries to convert child object to ParentResult.
> Is there some extra notation or any other way to use this case?
>
> Thanks!
>
> PS: Its a requirement that all my methods be returning objects derived from
> ParentResult.
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog