Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196755

Marshalling with JAX-WS escapes carriage return with entity reference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8u162
    • 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)

            aefimov Aleksej Efimov
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: