Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6174

MoxyJaxbContextResolved example is outdated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • Documentation
    • None
    • Unknown

    Description

      http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-JAXBandMoxy
      MoxyJaxbContextResolved example is outdated

      this is working :

      MoxyJaxbContextResolver java
      public class MoxyJaxbContextResolver implements ContextResolver<JAXBContext> {
      
      
        @Override
        public JAXBContext getContext(Class<?> cls) {
            try {
                return JAXBContextFactory.createContext(new Class[] {cls},null);
            } catch (JAXBException ex) {
                throw new RuntimeException(ex);
            }
        }
      
      }
      

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            slavb18 Vjacheslav Borisov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: