cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1671) Add a setter to JSONProvider to set the XML Namespace to Jettison prefix map
Date Thu, 03 Jul 2008 17:13:45 GMT

    [ https://issues.apache.org/jira/browse/CXF-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610283#action_12610283
] 

Sergey Beryozkin commented on CXF-1671:
---------------------------------------

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

> Add a setter to JSONProvider to set the XML Namespace to Jettison prefix map
> ----------------------------------------------------------------------------
>
>                 Key: CXF-1671
>                 URL: https://issues.apache.org/jira/browse/CXF-1671
>             Project: CXF
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.1, 2.0.6, 2.1.1, 2.0.7
>            Reporter: Joe Sunday
>             Fix For: 2.1.2
>
>         Attachments: CXF-1671-trunk.patch
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message