[
https://issues.apache.org/jira/browse/CXF-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028148#comment-13028148
]
Pat Turner commented on CXF-3483:
---------------------------------
Update on this:
When I set the attributesAsElements on
org.apache.cxf.jaxrs.provider.JAXBElementProvider, nothing but the root element
is rendered.
When I set the attributesAsElements on
org.apache.cxf.jaxrs.provider.JSONProvider, I get the following stacktrace:
11:32:28,200 INFO [STDOUT] 11:32:28,200 WARN [AbstractJAXBProvider]
javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: Missing some closing tags.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:332)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:172)
at
org.apache.cxf.jaxrs.provider.JSONProvider.marshal(JSONProvider.java:344)
at
org.apache.cxf.jaxrs.provider.JSONProvider.marshalCollection(JSONProvider.java:331)
at
org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:281)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:256)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:144)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:83)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
Caused by: javax.xml.stream.XMLStreamException: Missing some closing tags.
at
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeEndDocument(MappedXMLStreamWriter.java:242)
at
org.apache.cxf.staxutils.DelegatingXMLStreamWriter.writeEndDocument(DelegatingXMLStreamWriter.java:119)
at
org.apache.cxf.staxutils.DelegatingXMLStreamWriter.writeEndDocument(DelegatingXMLStreamWriter.java:119)
at
com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.endDocument(XMLStreamWriterOutput.java:106)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.endDocument(XMLSerializer.java:837)
> JSONProvider: Don't force attributes to have @ if users doesn't want them too
> -----------------------------------------------------------------------------
>
> Key: CXF-3483
> URL: https://issues.apache.org/jira/browse/CXF-3483
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 2.3.4
> Reporter: Pat Turner
>
> Jettison provides a configuration option to omit the '@' from attributes:
> org.codehaus.jettison.mapped.Configuration.setSupressAtAttributes(boolean)
> see Jettison Jira:
> http://jira.codehaus.org/browse/JETTISON-2
> org.apache.cxf.jaxrs.provider.JSONProvider should also expose this property.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira