cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1502892 - /cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
Date Sat, 13 Jul 2013 21:29:55 GMT
Author: dkulp
Date: Sat Jul 13 21:29:55 2013
New Revision: 1502892

URL: http://svn.apache.org/r1502892
Log:
Use the prefixes defined in the wsdl

Modified:
    cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java

Modified: cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=1502892&r1=1502891&r2=1502892&view=diff
==============================================================================
--- cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java (original)
+++ cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java Sat Jul 13
21:29:55 2013
@@ -64,6 +64,7 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.jaxb.JAXBContextCache;
 import org.apache.cxf.common.jaxb.JAXBContextCache.CachedContextAndSchemas;
+import org.apache.cxf.common.jaxb.JAXBUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ASMHelper;
 import org.apache.cxf.common.util.ASMHelper.AnnotationVisitor;
@@ -311,7 +312,12 @@ public class JAXBExtensionHelper impleme
                                                 false,
                                                 "");
             }
-            
+            Map<String, String> nspref = new HashMap<String, String>();
+            for (Object ent : wsdl.getNamespaces().entrySet()) {
+                Map.Entry<?, ?> entry = (Map.Entry<?, ?>)ent;
+                nspref.put((String)entry.getValue(), (String)entry.getKey());
+            }
+            JAXBUtils.setNamespaceWrapper(nspref, u);
             u.marshal(mObj, writer);
             writer.flush();            
         } catch (Exception ex) {



Mime
View raw message