JAXB2.1 defines a mapping from a Java classes to an XML Schema structure. jax-ws2.2 uses this mapping to generate XML schema-named types and global element (this element is referenced by the WSDL message generated for each method)
jax-ws2.2 supports only 3 WSDL mappings: Document wrapped, document bare and RPC.
The javax.jws.SOAPBinding annotation allows the user to set the binding style themselves:
1) Document wrapped:
@SOAPBinding (style=soapbinding.style.document,use=soapbinding.use.literal,parameterstyle= SOAPBinding.ParameterStyle.WRAPPED)
2) Document Bare:
@SOAPBinding (style=soapbinding.style.document,use=soapbinding.use.literal,parameterstyle= SOAPBinding.ParameterStyle.BARE)
3) RPC:
@SOAPBinding (style=soapbinding.style.rpc,use=soapbinding.use.literal,parameterstyle= SOAPBinding.ParameterStyle.WRAPPED)
If you use a different kind of combination, you will get an error.