cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r648006 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/common/xmlschema/ rt/core/src/main/java/org/apache/cxf/service/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ rt/databinding/aegis/src/mai...
Date Mon, 14 Apr 2008 21:28:09 GMT
Author: dkulp
Date: Mon Apr 14 14:28:08 2008
New Revision: 648006

URL: http://svn.apache.org/viewvc?rev=648006&view=rev
Log:
[CXF-1523]Fix more empty namespace issues with Aegis
Make the ServiceModelSchemaValidator stuff level FINE instead of INFO and only run if it really
would log something.

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfo.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java?rev=648006&r1=648005&r2=648006&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
Mon Apr 14 14:28:08 2008
@@ -240,7 +240,7 @@
         XmlSchemaElement element = schemaCollection.getElementByQName(elementQName);
         if (element == null) {
             throw new InvalidXmlSchemaReferenceException(referrer 
-                                                         + " references element "
+                                                         + " references non-existent element
"
                                                          + elementQName);
         }
     }
@@ -249,7 +249,7 @@
         XmlSchemaType type = schemaCollection.getTypeByQName(typeQName);
         if (type == null) {
             throw new InvalidXmlSchemaReferenceException(referrer 
-                                                         + " references type "
+                                                         + " references non-existent type
"
                                                          + typeQName);
         }
     }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java?rev=648006&r1=648005&r2=648006&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/ServiceModelSchemaValidator.java
Mon Apr 14 14:28:08 2008
@@ -51,9 +51,11 @@
             } catch (InvalidXmlSchemaReferenceException ixsre) {
                 complaints.append(part.getName() + " part element name " + ixsre.getMessage()
+ "\n");
             }
-        } else {
+        } else if (!part.getMessageInfo().getOperation().isUnwrapped()) {
             if (part.getTypeQName() == null) {
-                complaints.append(part.getName() + " part type QName null.\n");
+                complaints.append(part.getName() + " of message " 
+                                  + part.getMessageInfo().getName() 
+                                  + " part type QName null.\n");
             } else {
                 try {
                     schemaCollection.validateTypeName(part.getName(), part.getTypeQName());

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfo.java?rev=648006&r1=648005&r2=648006&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfo.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/ArrayTypeInfo.java
Mon Apr 14 14:28:08 2008
@@ -33,6 +33,7 @@
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 
 import static org.apache.cxf.aegis.type.encoded.SoapEncodingUtil.readAttributeValue;
@@ -59,7 +60,7 @@
 
         // if type is xsd:ur-type replace it with xsd:anyType
         String namespace = reader.getNamespaceForPrefix(typeName.getPrefix());
-        if (namespace != null) {
+        if (!StringUtils.isEmpty(namespace)) {
             if (SOAPConstants.XSD.equals(namespace) && "ur-type".equals(typeName.getLocalPart()))
{
                 typeName = new QName(namespace, "anyType", typeName.getPrefix());
             } else {

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java?rev=648006&r1=648005&r2=648006&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
Mon Apr 14 14:28:08 2008
@@ -94,7 +94,7 @@
     }
 
     private void writeStartElement() throws XMLStreamException {
-        if (namespace != null) {
+        if (!StringUtils.isEmpty(namespace)) {
             boolean declare = false;
 
             String decPrefix = writer.getNamespaceContext().getPrefix(namespace);

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=648006&r1=648005&r2=648006&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Mon Apr 14 14:28:08 2008
@@ -371,11 +371,13 @@
                 }
             }
         }
-        ServiceModelSchemaValidator validator = new ServiceModelSchemaValidator(serviceInfo);
-        validator.walk();
-        String validationComplaints = validator.getComplaints();
-        if (!"".equals(validationComplaints)) {
-            LOG.info(validationComplaints);
+        if (LOG.isLoggable(Level.FINE)) {
+            ServiceModelSchemaValidator validator = new ServiceModelSchemaValidator(serviceInfo);
+            validator.walk();
+            String validationComplaints = validator.getComplaints();
+            if (!"".equals(validationComplaints)) {
+                LOG.fine(validationComplaints);
+            }
         }
     }
 



Mime
View raw message