cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r645676 - in /incubator/cxf/trunk: rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/ rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ tools/javato/ws/sr...
Date Mon, 07 Apr 2008 20:45:42 GMT
Author: dkulp
Date: Mon Apr  7 13:45:40 2008
New Revision: 645676

URL: http://svn.apache.org/viewvc?rev=645676&view=rev
Log:
[CXF-1464] Fix issues with wrapped xml binding not wrapping
remove some dead code in CorbaDestination
clear the jaxb caches for some tests

Modified:
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptor.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
    incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
(original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
Mon Apr  7 13:45:40 2008
@@ -22,8 +22,6 @@
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URI;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -32,11 +30,9 @@
 import org.apache.cxf.binding.corba.utils.CorbaUtils;
 import org.apache.cxf.binding.corba.utils.OrbConfig;
 import org.apache.cxf.binding.corba.wsdl.AddressType;
-import org.apache.cxf.binding.corba.wsdl.OperationType;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
@@ -55,25 +51,6 @@
 
 public class CorbaDestination implements Destination {
     
-    public static final class OpInfoEntry {
-
-        private BindingOperationInfo boInfo;
-        private OperationType opType;
-
-        public OpInfoEntry(BindingOperationInfo bopInfo, OperationType extensor) {
-            this.boInfo = bopInfo;
-            this.opType = extensor;
-        }
-
-        public BindingOperationInfo getBoInfo() {
-            return boInfo;
-        }
-
-        public OperationType getOpType() {
-            return opType;
-        }
-
-    }
 
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaDestination.class);
     private AddressType address;
@@ -87,7 +64,6 @@
     private byte[] objectId;
     private POA bindingPOA;
     private org.omg.CORBA.Object obj;
-    private Map<String, OpInfoEntry> opInfoCache = new ConcurrentHashMap<String,
OpInfoEntry>();
 
     public CorbaDestination(EndpointInfo ei, OrbConfig config) {
         this(ei, config, null);    
@@ -320,16 +296,4 @@
         }
     }
 
-    public OpInfoEntry getBindingOpInfo(String opName) {
-        if (!opInfoCache .containsKey(opName)) {
-            for (BindingOperationInfo bopInfo : binding.getOperations()) {
-                if (bopInfo.getName().getLocalPart().equals(opName)) {
-                    opInfoCache.put(opName, new OpInfoEntry(bopInfo,
-                            bopInfo.getExtensor(OperationType.class)));
-                    break;
-                }
-            }
-        }
-        return opInfoCache.get(opName);
-    }
 }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptor.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptor.java
Mon Apr  7 13:45:40 2008
@@ -66,8 +66,8 @@
         if (xmf != null) {
             rootInModel = xmf.getRootNode();
         }
-        if (mi.getMessageParts().size() == 1) {
-            // bare-one-param & wrap
+        if (!boi.isUnwrapped() && mi.getMessageParts().size() == 1) {
+            // bare-one-param
             new BareOutInterceptor().handleMessage(message);
         } else {
             if (rootInModel == null) {

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
Mon Apr  7 13:45:40 2008
@@ -619,4 +619,14 @@
     public void setMarshallerProperties(Map<String, Object> marshallerProperties) {
         this.marshallerProperties = marshallerProperties;
     }
+    
+    
+    public static void clearCaches() {
+        synchronized (JAXBCONTEXT_CACHE) {
+            JAXBCONTEXT_CACHE.clear();
+        }
+        synchronized (OBJECT_FACTORY_CACHE) {
+            OBJECT_FACTORY_CACHE.clear();
+        }
+    }
 }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
Mon Apr  7 13:45:40 2008
@@ -22,6 +22,7 @@
 import java.io.File;
 
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ProcessorTestBase;
@@ -37,6 +38,7 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
+        JAXBDataBinding.clearCaches();
         builder.setBus(BusFactory.getDefaultBus());
         generator.setBus(builder.getBus());
     }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
Mon Apr  7 13:45:40 2008
@@ -22,6 +22,7 @@
 import java.io.File;
 
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ProcessorTestBase;
@@ -36,6 +37,7 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
+        JAXBDataBinding.clearCaches();
         builder.setBus(BusFactory.getDefaultBus());
         generator.setBus(builder.getBus());
     }

Modified: incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?rev=645676&r1=645675&r2=645676&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Mon Apr  7 13:45:40 2008
@@ -27,6 +27,7 @@
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -48,6 +49,7 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
+        JAXBDataBinding.clearCaches();
         builder = new JaxwsServiceBuilder();
         builder.setBus(BusFactory.getDefaultBus());
         generator.setBus(builder.getBus());



Mime
View raw message