You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/10/31 20:35:54 UTC

svn commit: r590795 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties

Author: dkulp
Date: Wed Oct 31 12:35:53 2007
New Revision: 590795

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

........
  r590664 | bimargulies | 2007-10-31 09:33:52 -0400 (Wed, 31 Oct 2007) | 4 lines
  
  After a titanous struggle, get the Javascript to generate correct serialization for the cross-namespace element case.
  This may be working around mistakes in how the XmlSchema gets built, or it may not. I don't know enought JAXB to tell.
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties

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

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=590795&r1=590794&r2=590795&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Wed Oct 31 12:35:53 2007
@@ -173,7 +173,16 @@
 
         return getService();
     }
-
+    
+    /**
+     * Code elsewhere in this function will fill in the name of the type of an element but not the reference
+     * to the type. This function fills in the type references.
+     * 
+     * This does not set the type reference for elements that are declared as refs to other elements.
+     * It is a giant pain to find them, since they are not (generally) root elements and the code would
+     * have to traverse all the types to find all of them. Users should look them up through the collection,
+     * that's what it is for.
+     */
     private void fillInSchemaCrossreferences() {
         Service service = getService();
         for (ServiceInfo serviceInfo : service.getServiceInfos()) {
@@ -203,36 +212,6 @@
                     }
                 }
                 
-            }
-            
-            // second pass. Fill in based on refs.
-            for (SchemaInfo schemaInfo : serviceInfo.getSchemas()) {
-                XmlSchemaObjectTable elementsTable = schemaInfo.getSchema().getElements();
-                Iterator elementsIterator = elementsTable.getNames();
-                while (elementsIterator.hasNext()) {
-                    QName elementName = (QName)elementsIterator.next();
-                    XmlSchemaElement element = schemaInfo.getSchema().getElementByName(elementName);
-                    if (element.getSchemaType() == null) {
-                        QName refElementName = element.getRefName();
-                        if (refElementName != null) {
-                            XmlSchemaElement refElement = 
-                                schemaCollection.getElementByQName(refElementName);
-                            if (refElement == null) {
-                                Message message = new Message("REFERENCE_TO_UNDEFINED_ELEMENT",
-                                                              LOG,
-                                                              element.getQName(),
-                                                              refElementName,
-                                                              service.getName());
-                                LOG.severe(message.toString());
-                            } else {
-                                // it is convenient for other consumers if we put the type in place.
-                                // we trust that anything generating XSD will avoid something stupid like:
-                                // <element ref='x' type='y'/> as a result.
-                                element.setSchemaType(refElement.getSchemaType());
-                            }
-                        }
-                    }
-                }
             }
         }
     }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=590795&r1=590794&r2=590795&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Wed Oct 31 12:35:53 2007
@@ -25,4 +25,3 @@
   annotations on the real instance are not available.  We suggest overriding the ServiceClass via spring config or \
   other configuration. (serviceClass/implementorClass attributes on the endpoint/server spring config entry)
 REFERENCE_TO_UNDEFINED_TYPE = Schema element {0} references undefined type {1} for service {2}.
-REFERENCE_TO_UNDEFINED_ELEMENT = Schema element {0} references undefined element {1} for service {2}.
\ No newline at end of file