cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r786598 - in /cxf/branches/2.1.x-fixes: ./ api/src/main/java/org/apache/cxf/databinding/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/test/java/org/apache...
Date Fri, 19 Jun 2009 17:40:08 GMT
Author: dkulp
Date: Fri Jun 19 17:40:07 2009
New Revision: 786598

URL: http://svn.apache.org/viewvc?rev=786598&view=rev
Log:
Merged revisions 786591 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r786591 | dkulp | 2009-06-19 13:22:11 -0400 (Fri, 19 Jun 2009) | 9 lines
  
  Merged revisions 786582 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r786582 | dkulp | 2009-06-19 13:06:18 -0400 (Fri, 19 Jun 2009) | 1 line
    
    [CXF-1822] If schema DOM is passed in, set the element so it's reused.
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
    cxf/branches/2.1.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SchemaFirstXmlConfigTest.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Foo.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd
    cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/branches/2.1.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 19 17:40:07 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589
-/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591
+/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582

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

Modified: cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
(original)
+++ cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/databinding/AbstractDataBinding.java
Fri Jun 19 17:40:07 2009
@@ -111,6 +111,7 @@
         synchronized (d) {
             xmlSchema = col.read(d, systemId, null);
             schema.setSchema(xmlSchema);
+            schema.setElement(d.getDocumentElement());
         }
         serviceInfo.addSchema(schema);
         return xmlSchema;

Modified: cxf/branches/2.1.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Fri Jun 19 17:40:07 2009
@@ -331,6 +331,7 @@
         el.setNillable(true);
         el.setSchemaTypeName(typeName);
         part.setXmlSchema(el);
+        schemaInfo.setElement(null);
         return el;
     }
     
@@ -348,13 +349,14 @@
             SchemaInfo schemaInfo = serviceInfo.getSchema(part.getElementQName().getNamespaceURI());
             if (schemaInfo != null
                 && !isExistSchemaElement(schemaInfo.getSchema(), part.getElementQName()))
{
-                    
+                
                 XmlSchemaElement el = new XmlSchemaElement();
                 XmlSchemaUtils.setElementQName(el, part.getElementQName());
                 el.setNillable(true);
                 
                 schemaInfo.getSchema().getItems().add(el);
                 schemaInfo.getSchema().getElements().add(el.getQName(), el);
+                schemaInfo.setElement(null);
 
                 Iterator<QName> itr = beanInfo.getTypeNames().iterator();
                 if (!itr.hasNext()) {
@@ -387,6 +389,7 @@
             
             schemaInfo.getSchema().getItems().add(el);
             schemaInfo.getSchema().getElements().add(el.getQName(), el);
+            schemaInfo.setElement(null);
 
             part.setXmlSchema(el);
 
@@ -478,6 +481,7 @@
         
         schema.getItems().add(ct);
         schema.addType(ct);
+        schemaInfo.setElement(null);
         el.setSchemaTypeName(part.getElementQName());
         
         XmlSchemaSequence seq = new XmlSchemaSequence();

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SchemaFirstXmlConfigTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SchemaFirstXmlConfigTest.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SchemaFirstXmlConfigTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SchemaFirstXmlConfigTest.java
Fri Jun 19 17:40:07 2009
@@ -23,6 +23,8 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
+import org.apache.cxf.helpers.XMLUtils;
+
 import org.junit.Test;
 
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -48,6 +50,8 @@
 
         Document d = getWSDLDocument(serverFB.getServer());
 
+        XMLUtils.printDOM(d);
+        
         // XmlSchema still isn't preserving all the extra info...
         assertValid("//xsd:complexType[@name='foo']/xsd:sequence", d);
         

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Foo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Foo.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Foo.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/Foo.java
Fri Jun 19 17:40:07 2009
@@ -18,6 +18,9 @@
  */
 package org.apache.cxf.jaxws.service;
 
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "foo", namespace = "http://service.jaxws.cxf.apache.org/fooStuff")
 public class Foo {
 
 }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/echoFoo.xsd
Fri Jun 19 17:40:07 2009
@@ -1,7 +1,7 @@
 <xs:schema xmlns="http://service.jaxws.cxf.apache.org/"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   attributeFormDefault="unqualified" elementFormDefault="unqualified"
-  targetNamespace="http://service.jaxws.cxf.apache.org/">
+  targetNamespace="http://service.jaxws.cxf.apache.org/fooStuff">
   <xs:complexType name="foo">
     <xs:annotation>
       bibbity bob

Modified: cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Fri Jun 19 17:40:07 2009
@@ -909,6 +909,7 @@
         SchemaInfo si = getOrCreateSchema(serviceInfo, mpi.getElementQName().getNamespaceURI(),
                                           getQualifyWrapperSchema());
         XmlSchema schema = si.getSchema();
+        si.setElement(null); //cached element is now invalid
 
         XmlSchemaElement el = new XmlSchemaElement();
         XmlSchemaUtils.setElementQName(el, mpi.getElementQName());
@@ -957,7 +958,7 @@
         SchemaInfo schemaInfo = getOrCreateSchema(serviceInfo, wrapperBeanName.getNamespaceURI(),
                                                   getQualifyWrapperSchema());
 
-        createWrappedMessageSchema(serviceInfo, wrappedMessage, unwrappedMessage, schemaInfo.getSchema(),
+        createWrappedMessageSchema(serviceInfo, wrappedMessage, unwrappedMessage, schemaInfo,
                                    wrapperBeanName);
     }
 
@@ -1017,6 +1018,7 @@
                 }
             }
 
+            schemaInfo.setElement(null); //cached element is now invalid
             XmlSchemaElement el = new XmlSchemaElement();
             XmlSchemaUtils.setElementQName(el, qname);
             el.setNillable(true);
@@ -1108,9 +1110,11 @@
     }
 
     private void createWrappedMessageSchema(ServiceInfo serviceInfo, AbstractMessageContainer
wrappedMessage,
-                                            AbstractMessageContainer unwrappedMessage, XmlSchema
schema,
+                                            AbstractMessageContainer unwrappedMessage, SchemaInfo
info,
                                             QName wrapperName) {
 
+        XmlSchema schema = info.getSchema();
+        info.setElement(null); // the cached schema will be no good
         XmlSchemaElement el = new XmlSchemaElement();
         XmlSchemaUtils.setElementQName(el, wrapperName);
         SchemaCollection.addGlobalElementToSchema(schema, el);

Modified: cxf/branches/2.1.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java?rev=786598&r1=786597&r2=786598&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
Fri Jun 19 17:40:07 2009
@@ -52,7 +52,8 @@
 
     public static final List<String> DEFAULT_IGNORE_ATTR = Arrays.asList(new String[]{"attributeFormDefault",
                                                                                       "elementFormDefault",

-                                                                                      "form"});
+                                                                                      "form",
+                                                                                      "version"});
     public static final List<String> DEFAULT_IGNORE_TAG = Arrays.asList(new String[]{"sequence"});
 
     protected ToolContext env = new ToolContext();



Mime
View raw message