cxf-commits mailing list archives

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

URL: http://svn.apache.org/r1502889
Log:
Actually, don't even bother with the old namespacecontext way, the transformer works better.

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=1502889&r1=1502888&r2=1502889&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:43 2013
@@ -74,7 +74,6 @@ import org.apache.cxf.common.util.ASMHel
 import org.apache.cxf.common.util.ASMHelper.Opcodes;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.staxutils.PrettyPrintXMLStreamWriter;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.transform.OutTransformWriter;
@@ -301,34 +300,7 @@ public class JAXBExtensionHelper impleme
             javax.xml.stream.XMLOutputFactory fact = javax.xml.stream.XMLOutputFactory.newInstance();
             XMLStreamWriter writer =
                 new PrettyPrintXMLStreamWriter(fact.createXMLStreamWriter(pw), 2, getIndentLevel(parent));
-            writer.setNamespaceContext(new javax.xml.namespace.NamespaceContext() {
-                
-                public String getNamespaceURI(String arg) {
-                    return wsdl.getNamespace(arg);
-                }
-                                
-                public String getPrefix(String arg) {
-                    if (arg.equals(jaxbNamespace)) {
-                        arg = namespace;
-                    }
-                    
-                    for (Object ent : wsdl.getNamespaces().entrySet()) {
-                        Map.Entry<?, ?> entry = (Map.Entry<?, ?>)ent;
-                        if (arg.equals(entry.getValue())) {
-                            return (String)entry.getKey();
-                        }
-                    }
-                    return null;
-                }
-                
-                public Iterator<String> getPrefixes(String arg) {
-                    if (arg.equals(jaxbNamespace)) {
-                        arg = namespace;
-                    }
-                    Iterator<String> ret = CastUtils.cast(wsdl.getNamespaces().keySet().iterator());
-                    return ret;
-                }
-            });
+            
             if (namespace != null && !namespace.equals(jaxbNamespace)) {
                 Map<String, String> outMap = new HashMap<String, String>();
                 outMap.put("{" + jaxbNamespace + "}*", "{" + namespace + "}*");



Mime
View raw message