geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r541351 - /geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Date Thu, 24 May 2007 16:31:29 GMT
Author: gawor
Date: Thu May 24 09:31:23 2007
New Revision: 541351

URL: http://svn.apache.org/viewvc?view=rev&rev=541351
Log:
fixed serialization of handler chains to string

Modified:
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java?view=diff&rev=541351&r1=541350&r2=541351
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Thu May 24 09:31:23 2007
@@ -61,6 +61,7 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
+import org.apache.xmlbeans.XmlOptions;
 
 public class CXFBuilder extends JAXWSServiceBuilder {
     private static final Log LOG = LogFactory.getLog(CXFBuilder.class);
@@ -197,7 +198,7 @@
 
         String handlerChainsXML = null;
         try {
-            handlerChainsXML = getHanderChainAsString(handlerChains);
+            handlerChainsXML = getHandlerChainAsString(handlerChains);
         } catch (IOException e) {
             // this should not happen
             LOG.warn("Failed to serialize handler chains", e);
@@ -209,14 +210,14 @@
                 serviceQName, module.getModuleName(), handlerChainsXML, seiInfoMap);
     }
     
-    private static String getHanderChainAsString(ServiceRefHandlerChainsType handlerChains)
+    private static String getHandlerChainAsString(ServiceRefHandlerChainsType handlerChains)
             throws IOException {
         String xml = null;
         if (handlerChains != null) {
             StringWriter w = new StringWriter();
-            w.write("<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
-            handlerChains.save(w);
-            w.write("</handler-chains>");
+            XmlOptions options = new XmlOptions();
+            options.setSaveSyntheticDocumentElement(new QName("http://java.sun.com/xml/ns/javaee",
"handler-chains")); 
+            handlerChains.save(w, options);
             xml = w.toString();
         }
         return xml;



Mime
View raw message