[ 
https://issues.apache.org/jira/browse/JCR-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jukka Zitting updated JCR-1767:
-------------------------------

      Component/s:     (was: jackrabbit-webdav)
                   jackrabbit-jcr-commons
    Fix Version/s: 1.5.0
         Assignee: Jukka Zitting
          Summary: XML serialization in JDK 1.4 broken (mostly for WebDAV)  
(was: WebDAV XML serialization in JDK 1.4 broken)

Updated the title and other settings to indicate that the root cause should be 
fixed in jackrabbit-jcr-commons. We only hit this issue in WebDAV since that's 
the only place where we serialize from DOM instead of directly calling the SAX 
methods.

I'd like to get this fixed for 1.5 as this issue breaks the webdav build in 
Java 1.4.

> XML serialization in JDK 1.4 broken (mostly for WebDAV)
> -------------------------------------------------------
>
>                 Key: JCR-1767
>                 URL: https://issues.apache.org/jira/browse/JCR-1767
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-jcr-commons
>            Reporter: Julian Reschke
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> WebDAV uses XmlRequestEntity for serializing XML, which in turn uses 
> org.apache.jackrabbit.commons.xml.SerializingContentHandler to work around 
> the JDK 1.4 problem (serializing in absence of explicit namespace 
> declarations).
> The following test fails under JDK 1.4, but passed with newer JDKs:
>     public void testXmlSerialization() throws ParserConfigurationException, 
> IOException, SAXException {
>         
>         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
>         dbf.setNamespaceAware(true);
>         DocumentBuilder db = dbf.newDocumentBuilder();
>         
>         Document doc = db.newDocument();
>         doc.appendChild(doc.createElementNS("DAV:", "propfind"));
>         
>         XmlRequestEntity xmlent = new XmlRequestEntity(doc);
>         ByteArrayOutputStream bos = new ByteArrayOutputStream();
>         xmlent.writeRequest(bos);
>         
>         Document doc2 = db.parse(new ByteArrayInputStream(bos.toByteArray()));
>         Element docelem = doc2.getDocumentElement();
>         assertEquals("DAV:", docelem.getNamespaceURI());
>     }

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

Reply via email to