cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r978914 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb
Date Sat, 24 Jul 2010 17:48:29 GMT
Author: dkulp
Date: Sat Jul 24 17:48:28 2010
New Revision: 978914

URL: http://svn.apache.org/viewvc?rev=978914&view=rev
Log:
Merged revisions 978913 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r978913 | dkulp | 2010-07-24 13:42:57 -0400 (Sat, 24 Jul 2010) | 1 line
  
  Fix test failure
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?rev=978914&r1=978913&r2=978914&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Sat Jul 24 17:48:28 2010
@@ -42,7 +42,9 @@ import java.util.logging.Logger;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
 
+import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 import org.xml.sax.EntityResolver;
@@ -73,6 +75,7 @@ import org.apache.cxf.service.Service;
 import org.apache.cxf.service.factory.ServiceConstructionException;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 /**
  * This class reads a WSDL and creates a dynamic client from it.
  * 
@@ -420,13 +423,15 @@ public class DynamicClientFactory {
             compiler.parseSchema(key, el);
             num++;
         }
-        
         if (simpleBindingEnabled) {
             String id = "/org/apache/cxf/endpoint/dynamic/simple-binding.xjb";
-            LOG.info("Loading the JAXB 2.1 simple binding for client.");
-            InputSource source = new InputSource(getClass().getResourceAsStream(id));
-            source.setSystemId(id);
-            compiler.parseSchema(source);
+            LOG.fine("Loading the JAXB 2.1 simple binding for client.");
+            try {
+                Document doc = StaxUtils.read(getClass().getResourceAsStream(id));
+                compiler.parseSchema(id, doc.getDocumentElement());
+            } catch (XMLStreamException e) {
+                LOG.log(Level.WARNING, "Could not parse simple-binding.xsd", e);
+            }
         }
     }
     

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb?rev=978914&r1=978913&r2=978914&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/org/apache/cxf/endpoint/dynamic/simple-binding.xjb
Sat Jul 24 17:48:28 2010
@@ -23,7 +23,7 @@
 -->
 <jaxb:bindings
   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
-  xmlns:xjc= "http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc">
+  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc">
   
   <jaxb:globalBindings generateElementProperty="false">
     <xjc:simple />



Mime
View raw message