Marshalling with JAX-WS escapes carriage return with entity reference

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 8u162
    • Component/s: xml

      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)

            Assignee:
            Aleksej Efimov
            Reporter:
            Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: