CXF
  1. CXF
  2. CXF-1671

Add a setter to JSONProvider to set the XML Namespace to Jettison prefix map

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.0.6, 2.1.1, 2.0.7
    • Fix Version/s: 2.1.2
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      There is currently no way to configure a REST service to pass an XML namespace to jettison prefix mapping using the default JSONProvider.

      • Move nstojns to a field instead of creating an empty map on each request
      • Add a property setter to set nstojns

      This will allow you to do this in Spring:
      <util:map id="jsonNamespaceMap" map-class="java.util.Hashtable">
      <entry key="http://www.example.com/shakedown" value="e"/>
      <entry key="http://cxf.apache.org/bindings/xformat" value="cxf"/>
      </util:map>

      <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider">
      <property name="namespaceMap" ref="jsonNamespaceMap"/>
      </bean>

      <jaxrs:server id="jsonRestEndpoint" address="/system">
      <jaxrs:serviceBeans>
      <ref bean="restImpl"/>
      </jaxrs:serviceBeans>
      <jaxrs:entityProviders>
      <ref bean="jsonProvider"/>
      </jaxrs:entityProviders>
      </jaxrs:server>

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        6d 19h 56m 1 Sergey Beryozkin 03/Jul/08 18:13
        Resolved Resolved Closed Closed
        46d 1h 13m 1 Daniel Kulp 18/Aug/08 19:26
        Mark Thomas made changes -
        Workflow jira [ 12434151 ] Default workflow, editable Closed status [ 12605837 ]
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Sergey Beryozkin made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 2.1.2 [ 12313268 ]
        Assignee Sergey Beryozkin [ sergey_beryozkin ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Sergey Beryozkin added a comment -

        This is applied to the latest trunk...Please reopen this issue if you do expect 2.1.1 and 2.1 updated too

        Show
        Sergey Beryozkin added a comment - This is applied to the latest trunk...Please reopen this issue if you do expect 2.1.1 and 2.1 updated too
        Hide
        Sergey Beryozkin added a comment -

        many thanks. Will apply it shortly

        Show
        Sergey Beryozkin added a comment - many thanks. Will apply it shortly
        Joe Sunday made changes -
        Attachment CXF-1671-trunk.patch [ 12384806 ]
        Hide
        Joe Sunday added a comment -

        Patch against trunk.

        Show
        Joe Sunday added a comment - Patch against trunk.
        Joe Sunday made changes -
        Attachment CXF-1671.patch [ 12384804 ]
        Joe Sunday made changes -
        Field Original Value New Value
        Attachment CXF-1671.patch [ 12384804 ]
        Hide
        Joe Sunday added a comment -

        Patch against 2.1.

        Show
        Joe Sunday added a comment - Patch against 2.1.
        Joe Sunday created issue -

          People

          • Assignee:
            Sergey Beryozkin
            Reporter:
            Joe Sunday
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development