cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r702187 - in /cxf/trunk: api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Mon, 06 Oct 2008 16:13:44 GMT
Author: sergeyb
Date: Mon Oct  6 09:13:44 2008
New Revision: 702187

URL: http://svn.apache.org/viewvc?rev=702187&view=rev
Log:
Minor fix to AbstractDataBinding so that no schema conflicts occur 

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java?rev=702187&r1=702186&r2=702187&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java Mon Oct
 6 09:13:44 2008
@@ -69,6 +69,7 @@
     public XmlSchema addSchemaDocument(ServiceInfo serviceInfo, SchemaCollection col, Document
d,
                                           String systemId) {
         String ns = d.getDocumentElement().getAttribute("targetNamespace");
+        
         if (StringUtils.isEmpty(ns)) {
             if (DOMUtils.getFirstElement(d.getDocumentElement()) == null) {
                 hackAroundEmptyNamespaceIssue = true;
@@ -80,6 +81,11 @@
             ns = serviceInfo.getInterface().getName().getNamespaceURI();
             d.getDocumentElement().setAttribute("targetNamespace", ns);
         }
+        
+        if (col.getSchemaByTargetNamespace(ns) != null) {
+            return col.getSchemaByTargetNamespace(ns);
+        }
+        
         if (hackAroundEmptyNamespaceIssue) {
             d = doEmptyNamespaceHack(d);            
         }
@@ -95,6 +101,7 @@
             }
             n = n.getNextSibling();
         }
+        
         SchemaInfo schema = new SchemaInfo(ns);
         schema.setSystemId(systemId);
         XmlSchema xmlSchema;

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=702187&r1=702186&r2=702187&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Mon Oct  6 09:13:44 2008
@@ -999,7 +999,7 @@
 
             if (mpi.isElement()) {
                 XmlSchemaElement oldEl = (XmlSchemaElement)mpi.getXmlSchema();
-                if (!oldEl.getQName().equals(qname)) {
+                if (null != oldEl && !oldEl.getQName().equals(qname)) {
                     el.setSchemaTypeName(oldEl.getSchemaTypeName());
                     el.setSchemaType(oldEl.getSchemaType());
                     if (oldEl.getSchemaTypeName() != null) {



Mime
View raw message