Exposing a JAXB Annotated POJO as JSON via CXF-RS

Solution Verified - Updated -


  • Have a JAXB annotated POJO request / response that is used in a CXF WS and try to expose this as a JSON REST service;
  • When sending a JSON request, get the following error response:

JSON request:

    "xxxRequest": {
        "header": {
        "data": {


JAXBException occurred : unexpected element (uri:"", local:"xxxRequest"). Expected elements are 


  • Red Hat JBoss Fuse 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content