You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Luciano Resende (JIRA)" <ji...@apache.org> on 2013/11/03 22:41:18 UTC

[jira] [Updated] (WINK-402) JAXB xml : add prefix "DAV:" on every sub tag does not run -> Pacth

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

Luciano Resende updated WINK-402:
---------------------------------

    Fix Version/s:     (was: 1.4)
                   1.5

> JAXB xml : add prefix "DAV:" on every sub tag does not run -> Pacth 
> --------------------------------------------------------------------
>
>                 Key: WINK-402
>                 URL: https://issues.apache.org/jira/browse/WINK-402
>             Project: Wink
>          Issue Type: Bug
>          Components: WebDAV
>    Affects Versions: 1.3, 1.4
>         Environment: Windows Seven and XP
>            Reporter: Danini
>            Priority: Minor
>             Fix For: 1.3, 1.5
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.1#6144)