JDK-8196755 : Marshalling with JAX-WS escapes carriage return with entity reference
  • Type: Bug
  • Component: xml
  • Sub-Component: jax-ws
  • Affected Version: 8u162
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-02-05
  • Updated: 2018-05-18
  • Resolved: 2018-04-23
Related Reports
Duplicate :  
Relates :  
Description
JDK-8172297 caused issues with ApacheCXF JAX-WS deployements. The fix makes use of the XMLStreamWriter.writeEntityRef method, while this is not allowed when using SOAP based web services.
StackTrace :
    Caused by: java.lang.UnsupportedOperationException: Entity References are not
    allowed in SOAP documents
       at
    com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl.createEntityReference(SOAPDocumentImpl.java:148)
       at
    com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.createEntityReference(SOAPPartImpl.java:437)
       at
    org.apache.cxf.staxutils.W3CDOMStreamWriter.writeEntityRef(W3CDOMStreamWriter.java:278)
       at
    com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput$XmlStreamOutWriterAdapter.writeEntityRef(XMLStreamWriterOutput.java:277)
       at
    com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput$NewLineEscapeHandler.escape(XMLStreamWriterOutput.java:242)
       at
    com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.text(XMLStreamWriterOutput.java:150)