cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r687815 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
Date Thu, 21 Aug 2008 18:07:12 GMT
Author: dkulp
Date: Thu Aug 21 11:07:11 2008
New Revision: 687815

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

........
  r687814 | dkulp | 2008-08-21 14:04:42 -0400 (Thu, 21 Aug 2008) | 2 lines
  
  [CXF-1735] More for cxf-1735 to get the information it needs from the factory (and thus
the configurations)
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 21 11:07:11 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687363,687387,687463,687543,687722,687798
+/cxf/trunk:686333-686363,686764,686820,687096,687363,687387,687463,687543,687722,687798,687814

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 21 11:07:11 2008
@@ -1 +1 @@
-/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687363,687387,687463,687543,687722,687798
+/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687363,687387,687463,687543,687722,687798,687814

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=687815&r1=687814&r2=687815&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Thu Aug 21 11:07:11 2008
@@ -47,6 +47,7 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.JavaUtils;
 import org.apache.cxf.jaxb.JAXBUtils;
+import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.MessageInfo;
@@ -66,8 +67,10 @@
     private Set<Class<?>> wrapperBeans = new LinkedHashSet<Class<?>>();
     private InterfaceInfo interfaceInfo;
     private boolean qualified;
+    private JaxWsServiceFactoryBean factory;
     
-    public WrapperClassGenerator(InterfaceInfo inf, boolean q) {
+    public WrapperClassGenerator(JaxWsServiceFactoryBean fact, InterfaceInfo inf, boolean
q) {
+        factory = fact;
         interfaceInfo = inf;
         qualified = q;
     }
@@ -295,21 +298,14 @@
         
         AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;",
true);
         av0.visit("name", name);
-        
-        
-        Annotation[] a = (Annotation[])mpi.getProperty(ReflectionServiceFactoryBean.PARAM_ANNOTATION);
-        if (a != null) {
-            for (Annotation an : a) {
-                String tns = null;
-                if (an instanceof WebParam) {
-                    tns = ((WebParam)an).targetNamespace();
-                } else if (an instanceof WebResult) {
-                    tns = ((WebResult)an).targetNamespace();                    
-                }
-                if (tns != null && !StringUtils.isEmpty(tns)) {
-                    av0.visit("namespace", tns);
-                }
-            }
+        if (factory.isWrapperPartQualified(mpi)) {
+            av0.visit("namespace", mpi.getConcreteName().getNamespaceURI());            
+        }
+        if (factory.isWrapperPartNillable(mpi)) {
+            av0.visit("nillable", "true");
+        }
+        if (factory.getWrapperPartMinOccurs(mpi) == 1) {
+            av0.visit("required", "true");
         }
         av0.visitEnd();
 

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=687815&r1=687814&r2=687815&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Thu Aug 21 11:07:11 2008
@@ -502,7 +502,8 @@
     private Set<Class<?>> generatedWrapperBeanClass() {
         if (getDataBinding() instanceof JAXBDataBinding) {
             ServiceInfo serviceInfo = getService().getServiceInfos().get(0);
-            WrapperClassGenerator wrapperGen = new WrapperClassGenerator(serviceInfo.getInterface(),
+            WrapperClassGenerator wrapperGen = new WrapperClassGenerator(this,
+                                                                         serviceInfo.getInterface(),
                                                                          getQualifyWrapperSchema());
             return wrapperGen.generate();            
         }

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=687815&r1=687814&r2=687815&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
Thu Aug 21 11:07:11 2008
@@ -1981,7 +1981,7 @@
         return null;
     }
     
-    public Boolean isWrapperPartQualified(MessagePartInfo mpi) {
+    public boolean isWrapperPartQualified(MessagePartInfo mpi) {
         for (AbstractServiceConfiguration c : serviceConfigurations) {
             Boolean b = c.isWrapperPartQualified(mpi);
             if (b != null) {



Mime
View raw message