You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2007/08/14 22:48:55 UTC

svn commit: r565905 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java

Author: scheu
Date: Tue Aug 14 13:48:54 2007
New Revision: 565905

URL: http://svn.apache.org/viewvc?view=rev&rev=565905
Log:
AXIS2-3121
Contributor: Dan Sedov
Upgrade the Content-ID decode utility in JAXBAttachmentUnmarshaller.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java?view=diff&rev=565905&r1=565904&r2=565905
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentUnmarshaller.java Tue Aug 14 13:48:54 2007
@@ -110,17 +110,21 @@
      * @return cid with translated characters
      */
     private String getNewCID(String cid) {
-        // TODO This method only converts : and /
-        // A more complete fix is needed.
         String cid2 = cid;
-        cid2 = JavaUtils.replace(cid2, "%3A", ":");
-        cid2 = JavaUtils.replace(cid2, "%2F", "/");
+
+        try {
+            cid2 = java.net.URLDecoder.decode(cid, "UTF-8");
+        } catch (Exception e) {
+            if (log.isDebugEnabled()) {
+                log.debug("getNewCID decoding " + cid + " as UTF-8 decoding error: " + e);
+            }
+        }
         return cid2;
     }
 
     /**
      * Read the bytes from the DataHandler
-     *
+     * 
      * @param dh
      * @return byte[]
      * @throws IOException



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org