cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r611848 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
Date Mon, 14 Jan 2008 16:31:07 GMT
Author: dkulp
Date: Mon Jan 14 08:31:02 2008
New Revision: 611848

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

........
  r610665 | mmao | 2008-01-09 23:04:21 -0500 (Wed, 09 Jan 2008) | 5 lines
  
  CXF-1364 
     Frontend pass the quolified attribute to the Jaxb Databinding 
        thus in case of jaxws, the unqualified been used
........

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

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

Modified: incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=611848&r1=611847&r2=611848&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Mon Jan 14 08:31:02 2008
@@ -102,9 +102,15 @@
     private Map<String, Object> contextProperties = Collections.emptyMap();
     private Map<String, Object> marshallerProperties = Collections.emptyMap();
 
+    private boolean qualifiedSchemas;
+
     
     public JAXBDataBinding() {
     }
+
+    public JAXBDataBinding(boolean q) {
+        this.qualifiedSchemas = q;
+    }
     
     public JAXBDataBinding(Class<?>...classes) throws JAXBException {
         contextClasses = new HashSet<Class<?>>();
@@ -278,7 +284,10 @@
                 }
             }
             
-            JAXBSchemaInitializer schemaInit = new JAXBSchemaInitializer(serviceInfo, col,
riContext);
+            JAXBSchemaInitializer schemaInit = new JAXBSchemaInitializer(serviceInfo, 
+                                                                         col, 
+                                                                         riContext, 
+                                                                         this.qualifiedSchemas);
             schemaInit.walk();
         }
     }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=611848&r1=611847&r2=611848&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Mon Jan 14 08:31:02 2008
@@ -58,11 +58,16 @@
 
     private SchemaCollection schemas;
     private JAXBContextImpl context;
+    private final boolean qualifiedSchemas;
     
-    public JAXBSchemaInitializer(ServiceInfo serviceInfo, SchemaCollection col, JAXBContextImpl
context) {
+    public JAXBSchemaInitializer(ServiceInfo serviceInfo, 
+                                 SchemaCollection col, 
+                                 JAXBContextImpl context, 
+                                 boolean q) {
         super(serviceInfo);
         schemas = col;
         this.context = context;
+        this.qualifiedSchemas = q;
     }
 
     @Override
@@ -307,7 +312,10 @@
         XmlSchema schema;
         if (schemaInfo == null) {
             schema = schemas.newXmlSchemaInCollection(part.getElementQName().getNamespaceURI());
-            schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
+
+            if (qualifiedSchemas) {
+                schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
+            }
 
             NamespaceMap nsMap = new NamespaceMap();
             nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, schema.getTargetNamespace());

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=611848&r1=611847&r2=611848&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
Mon Jan 14 08:31:02 2008
@@ -139,7 +139,7 @@
     public ReflectionServiceFactoryBean() {
         getServiceConfigurations().add(0, new DefaultServiceConfiguration());
 
-        setDataBinding(new JAXBDataBinding());
+        setDataBinding(new JAXBDataBinding(getQualifyWrapperSchema()));
 
         ignoredClasses.add("java.lang.Object");
         ignoredClasses.add("java.lang.Throwable");
@@ -830,7 +830,7 @@
         anonymousWrappers = b;
     }
     
-    public boolean getQualifyWrapperSchema() {
+    public final boolean getQualifyWrapperSchema() {
         return qualifiedSchemas;
     }
     public boolean isQualifyWrapperSchema() {
@@ -1116,6 +1116,7 @@
         if (qualified) {
             schema.setElementFormDefault(new XmlSchemaForm(XmlSchemaForm.QUALIFIED));
         }
+
         schemaInfo.setSchema(schema);
 
         Map<String, String> explicitNamespaceMappings = this.getDataBinding().getDeclaredNamespaceMappings();



Mime
View raw message