[jboss-user] [JBoss Web Services] - Re: Is polymorphic JAX-WS operation parameter possible to implement?

Guillermo L do-not-reply at jboss.com
Fri May 17 16:06:37 EDT 2013

Guillermo L [https://community.jboss.org/people/gmlopezdev] created the discussion

"Re: Is polymorphic JAX-WS operation parameter possible to implement?"

To view the discussion, visit: https://community.jboss.org/message/818299#818299

I finally got this resolved. It is absolutely possible to implement this behavior. If I were developing a single EAR I wouldn´t have experienced a problem like this.

Since I'm developing several enterprise applications (EAR modules) over JBoss AS 7 which need to communicate through their local interfaces, I need to publish them as modules (including DTOs). Even I was getting no other symptom of errors or problems but the one I described, the issue was caused because my module must declare the dependency over jaxb api. Otherwise the annotations have no effect. Once I added this dependency to the module, everything started to work normally as expected :-).

Important things to remember here:

Declare your sub classes as the following within your parent class:

    @XmlSeeAlso({Pojo1.class, Pojo2.class, ...})

If your classes are published as a JBoss module, do not forget to *declare* the jaxb dependency.

I hope this may help others like me in the future :-).

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130517/6303369f/attachment.html 

More information about the jboss-user mailing list