简体   繁体   中英

JAX-WS specification and the need for JAXB annotations

I always thought that to bind beans to SOAP messages in JAX-WS we need to use JAXB bindings.

Recently I was able to send and receive complex beans without the need of any JAXB annotations using Metro implementation.

Is this a new feature introduced in the latest specification or was it like this from the start?

There are default behaviours that JAXB will use to map classes that aren't annotated. You only need annotations if the mapping you want to define doesn't follow these defaults (eg if you want to map anything to attributes rather than elements, or override the element names, add wrapper elements round collections, etc.).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM