Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-402

JAXB xml : add prefix "DAV:" on every sub tag does not run -> Pacth

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.3, 1.4
    • 1.3, 1.5
    • WebDAV
    • None
    • Windows Seven and XP

    • Patch Available

    Description

      Hy
      I would post a patch to solve a problem with namespace "DAV:" to be included in the XML messages. Under Windows XP and Seven the problem occurs because the Windows WebClient service assumes wrongly that all XML tags from WebDAV servers contains the namespace prefix "DAV:". But apache wink doesn't generate exactly the message in a good format as windows would. If you want to resolve this bug you need to apply a patch from Microsoft, but it is impossible for a large company. So I modified the source code of the class generated by JAXB "org.apache.wink.webdav.model.package-infos.java" to include the prefix "DAV:" in all classes. it just enough to replace the following code:

      @ javax.xml.bind.annotation.XmlSchema (namespace = "DAV:" elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
      org.apache.wink.webdav.model package;

      by:

      @ javax.xml.bind.annotation.XmlSchema (namespace = "DAV:" elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED, xmlns =

      {@ xmlns (prefix = "d", namespaceURI = "DAV:" )}

      )
      org.apache.wink.webdav.model package;
      . javax.xml.bind.annotation import *;

      This has the effect of adding the prefix "d" on all the tags below:

      <?xml version= "1.0" encoding="UTF-8" standalone="yes"?>
      <d:multistatus xmlns:d= "DAV:">
      <d:response>
      <d:href>containers/musique</d:href>
      <d:propstat>
      <d:prop>
      <d:creationdate>Sun De c 07 01:00:00 CE T 2014</d:creationdate>
      <d:displayname>musique</d :displayname>
      <d:getcontenttype>application/octet-stream</d:getcontenttype>
      <d:lockdiscovery/>
      <d:resourcetype>
      <d:collection/>
      </d:resourcetype>
      <d:supportedlock/>
      </d :prop>
      <d:status> HTTP/1.1 200 OK< /d:status>
      </d:propstat>
      </d:response>
      </d:multistatus>

      I wanted to post a pacth but when I click on the Issue Tracker link on official web site, it returns me a 404 error.

      Plz can you apply the patch?

      Best regards.

      Attachments

        Activity

          People

            Unassigned Unassigned
            misis Danini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified