cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r610221 [1/4] - in /incubator/cxf/trunk/rt/bindings/corba: ./ src/main/java/org/apache/yoko/bindings/corba/ src/main/java/org/apache/yoko/bindings/corba/runtime/ src/main/java/org/apache/yoko/bindings/corba/types/ src/main/java/org/apache/y...
Date Tue, 08 Jan 2008 23:23:41 GMT
Author: dkulp
Date: Tue Jan  8 15:23:36 2008
New Revision: 610221

URL: http://svn.apache.org/viewvc?rev=610221&view=rev
Log:
More updates to get closer to having the corba binding working

Added:
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java   (with props)
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/OutputStream.java   (with props)
Removed:
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/schemas/
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/simple/
Modified:
    incubator/cxf/trunk/rt/bindings/corba/pom.xml
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaMessage.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandler.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaUnionEventProducer.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/ContextUtils.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaAnyHelper.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaObjectReferenceHelper.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/wsdl/CorbaTypeImpl.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingFactoryTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaDestinationTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaExceptionTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaMessageTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedObjReferenceTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaObjectReferenceTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaOperationNameManglingTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaPolyNestedObjReferenceTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaServerConduitTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaSystemExceptionTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeMapTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestServer.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServantTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReaderTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriterTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReaderTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriterTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaAnyHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaArrayHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaEnumHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtilsTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaObjectHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaSequenceHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/types/CorbaStructHandlerTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/utils/ContextUtilsTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/utils/CorbaUtilsTest.java

Modified: incubator/cxf/trunk/rt/bindings/corba/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/pom.xml?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/pom.xml (original)
+++ incubator/cxf/trunk/rt/bindings/corba/pom.xml Tue Jan  8 15:23:36 2008
@@ -104,6 +104,23 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-test-stuff</id>
+                        <phase>generate-test-sources</phase>
+                        <configuration>
+                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
 
             <!--plugin>
                 <groupId>org.apache.maven.plugins</groupId>

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java Tue Jan  8 15:23:36 2008
@@ -66,7 +66,7 @@
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.UnknownUserException;
 
-public class CorbaConduit implements Conduit {
+public final class CorbaConduit implements Conduit {
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaConduit.class);
 
 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaMessage.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaMessage.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaMessage.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaMessage.java Tue Jan  8 15:23:36 2008
@@ -20,9 +20,7 @@
 package org.apache.yoko.bindings.corba;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import javax.xml.namespace.QName;
 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java Tue Jan  8 15:23:36 2008
@@ -19,35 +19,33 @@
 package org.apache.yoko.bindings.corba;
 
 import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
 
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
 import org.apache.yoko.bindings.corba.utils.CorbaUtils;
 
-public class TypeMapCache {
+public final class TypeMapCache {
 
-    private static Map<ServiceInfo, CorbaTypeMap> cache =
-        new WeakHashMap<ServiceInfo, CorbaTypeMap>();
+    private static final String KEY = CorbaTypeMap.class.getName();
 
+    private TypeMapCache() {
+        //utility class
+    }
+    
     public static CorbaTypeMap get(ServiceInfo service) {
         if (service != null) {
-            synchronized (cache) {
-                if (!cache.containsKey(service)) {
+            synchronized (service) {
+                CorbaTypeMap map = service.getProperty(KEY, CorbaTypeMap.class);
+                if (map == null) {
                     List<TypeMappingType> corbaTypes = service.getDescription()
                             .getExtensors(TypeMappingType.class);
-                    if (corbaTypes != null) {                    
-                        cache.put(service, CorbaUtils.createCorbaTypeMap(corbaTypes));
-                    }   
+                    if (corbaTypes != null) {
+                        service.setProperty(KEY, CorbaUtils.createCorbaTypeMap(corbaTypes));
+                    }                   
                 }
+                return map; 
             }
-            return cache.get(service);
         }
         return null;
-    }
-
-    public static void clear() {
-        cache.clear();
     }
 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java Tue Jan  8 15:23:36 2008
@@ -19,12 +19,10 @@
 
 package org.apache.yoko.bindings.corba.runtime;
 
-import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 
-import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.schemas.yoko.bindings.corba.RaisesType;
 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java Tue Jan  8 15:23:36 2008
@@ -29,11 +29,9 @@
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.schemas.yoko.bindings.corba.Anonsequence;
 import org.apache.schemas.yoko.bindings.corba.CaseType;
 import org.apache.schemas.yoko.bindings.corba.Enum;
 import org.apache.schemas.yoko.bindings.corba.Enumerator;
-import org.apache.schemas.yoko.bindings.corba.Sequence;
 import org.apache.schemas.yoko.bindings.corba.Union;
 import org.apache.schemas.yoko.bindings.corba.Unionbranch;
 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java Tue Jan  8 15:23:36 2008
@@ -21,7 +21,6 @@
 
 import java.util.List;
 import java.util.Stack;
-import java.util.logging.Logger;
 
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
@@ -29,7 +28,6 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.schemas.yoko.bindings.corba.ArgType;
 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java Tue Jan  8 15:23:36 2008
@@ -27,7 +27,7 @@
 
 import org.omg.CORBA.TypeCode;
 
-public class CorbaFixedHandler extends CorbaObjectHandler {
+public final class CorbaFixedHandler extends CorbaObjectHandler {
 
     private final long digits;
     private final long scale;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java Tue Jan  8 15:23:36 2008
@@ -57,7 +57,10 @@
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
-public class CorbaHandlerUtils {
+public final class CorbaHandlerUtils {
+    private CorbaHandlerUtils() {
+        //utility class
+    }
 
     public static CorbaObjectHandler createTypeHandler(ORB orb,
                                                        QName name, 

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java Tue Jan  8 15:23:36 2008
@@ -46,7 +46,7 @@
 
 import org.omg.CORBA.ORB;
 
-public class CorbaObjectReferenceEventProducer extends AbstractStartEndEventProducer {
+public final class CorbaObjectReferenceEventProducer extends AbstractStartEndEventProducer {
 
     static final String WSDLI_NAMESPACE_URI = "http://www.w3.org/2006/01/wsdl-instance";
     static final String XSI_NAMESPACE_URI = "http://www.w3.org/2001/XMLSchema-instance";

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandler.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaPrimitiveHandler.java Tue Jan  8 15:23:36 2008
@@ -96,7 +96,7 @@
     public void setValueFromData(String data) {
         switch (typeCode.kind().value()) {
         case TCKind._tk_boolean:
-            value = new Boolean(data);
+            value = Boolean.valueOf(data);
             break;
         case TCKind._tk_char:
             // A char is mapped to a byte, we need it as a character

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaUnionEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaUnionEventProducer.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaUnionEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaUnionEventProducer.java Tue Jan  8 15:23:36 2008
@@ -27,7 +27,6 @@
 
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.schemas.yoko.bindings.corba.Union;
-import org.apache.schemas.yoko.bindings.corba.Unionbranch;
 import org.omg.CORBA.ORB;
 
 public class CorbaUnionEventProducer extends AbstractStartEndEventProducer {

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/ContextUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/ContextUtils.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/ContextUtils.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/ContextUtils.java Tue Jan  8 15:23:36 2008
@@ -37,6 +37,9 @@
  * Holder for utility methods relating to contexts.
  */
 public final class ContextUtils {
+    private ContextUtils() {
+        //utility class
+    }
     
     public static boolean isRequestor(Message message) {
         return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaAnyHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaAnyHelper.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaAnyHelper.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaAnyHelper.java Tue Jan  8 15:23:36 2008
@@ -34,10 +34,14 @@
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
-public class CorbaAnyHelper {
+public final class CorbaAnyHelper {
    
-    private static Map<QName, QName> SCHEMA_TO_IDL_TYPES = new HashMap<QName, QName>();
-    private static Map<QName, QName> IDL_TO_SCHEMA_TYPES = new HashMap<QName, QName>();
+    private static final Map<QName, QName> SCHEMA_TO_IDL_TYPES = new HashMap<QName, QName>();
+    private static final Map<QName, QName> IDL_TO_SCHEMA_TYPES = new HashMap<QName, QName>();
+    
+    private CorbaAnyHelper() {
+        //utility class
+    }
 
     public static boolean isPrimitiveSchemaType(QName schemaType) {
         return SCHEMA_TO_IDL_TYPES.get(schemaType) != null;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java Tue Jan  8 15:23:36 2008
@@ -31,13 +31,17 @@
 import org.apache.yoko.bindings.corba.CorbaBindingException;
 import org.omg.CORBA.ORB;
 
-public class CorbaBindingHelper {
+public final class CorbaBindingHelper {
 
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaBindingHelper.class);
     private static Map<String, ORB> orbList = new HashMap<String, ORB>();
     private static Map<String, Integer> orbUseCount = new HashMap<String, Integer>();
     private static ORB defaultORB;
     
+    private CorbaBindingHelper() {
+        //utility class
+    }
+    
     public static ORB getDefaultORB(OrbConfig config) {        
         if (defaultORB == null) {
             Properties props = System.getProperties();
@@ -74,7 +78,7 @@
         // A corbaloc address gives us host and port information to use when setting up the
         // endpoint for the ORB.  Other types of references will just create ORBs on the 
         // host and port used when no preference has been specified.
-        if (scheme.equals("corbaloc")) {
+        if ("corbalob".equals(scheme)) {
             String schemeSpecificPart = addressURI.getSchemeSpecificPart();
             int keyIndex = schemeSpecificPart.indexOf('/');
             String corbaAddr = schemeSpecificPart.substring(0, keyIndex);
@@ -94,8 +98,10 @@
             orb = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
             
             orbList.put(getORBNameFromAddress(address), orb);
-        } else if (scheme.equals("file") || scheme.equals("relfile") 
-                   || scheme.equals("IOR") || scheme.equals("ior")) {
+        } else if ("file".equals(scheme)
+            || "relfile".equals(scheme)
+            || "IOR".equals(scheme)
+            || "ior".equals(scheme)) {
             orb = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
             
             orbList.put(getORBNameFromAddress(address), orb);
@@ -125,13 +131,13 @@
         }
         
         String scheme = addressURI.getScheme();
-        if (scheme.equals("corbaloc") || scheme.equals("corbaname")) {
+        if ("corbaloc".equals(scheme) || "corbaname".equals(scheme)) {
             String schemeSpecificPart = addressURI.getSchemeSpecificPart();
             int keyIndex = schemeSpecificPart.indexOf('/');
             name = schemeSpecificPart.substring(0, keyIndex);        
-        } else if (scheme.equals("IOR") || scheme.equals("ior")) {        
+        } else if ("IOR".equals(scheme) || "ior".equals(scheme)) {        
             name = addressURI.toString();
-        } else if (scheme.equals("file") || scheme.equals("relfile")) {
+        } else if ("file".equals(scheme) || "relfile".equals(scheme)) {
             name = addressURI.getPath();
             if (name == null) {
                 name = addressURI.getSchemeSpecificPart();

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaObjectReferenceHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaObjectReferenceHelper.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaObjectReferenceHelper.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaObjectReferenceHelper.java Tue Jan  8 15:23:36 2008
@@ -38,7 +38,7 @@
 import org.apache.schemas.yoko.bindings.corba.BindingType;
 import org.omg.CORBA.Object;
 
-public class CorbaObjectReferenceHelper {
+public final class CorbaObjectReferenceHelper {
 
     public static final String WSDLI_NAMESPACE_URI = "http://www.w3.org/2006/01/wsdl-instance";
     public static final String ADDRESSING_NAMESPACE_URI = "http://www.w3.org/2005/08/addressing";
@@ -51,6 +51,10 @@
     public static final int YOKO_SERVICE_NAME_ID = 1004;
     
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaObjectReferenceHelper.class);
+    
+    private CorbaObjectReferenceHelper() {
+        //utility class
+    }
 
     public static String getWSDLLocation(Definition wsdlDef) {
         return wsdlDef.getDocumentBaseURI();
@@ -185,7 +189,7 @@
         return new String(arr);
     }
 
-    public static final int readIntFromAlignedCDREncaps(byte[] data, int index, boolean bigEndian) {
+    public static int readIntFromAlignedCDREncaps(byte[] data, int index, boolean bigEndian) {
         if (bigEndian) {
             int partial = ((((int)data[index]) << 24) & 0xff000000)
                 | ((((int)data[index + 1]) << 16) & 0x00ff0000);

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java Tue Jan  8 15:23:36 2008
@@ -74,12 +74,17 @@
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.UnionMember;
 
-public class CorbaUtils {
+public final class CorbaUtils {
 
-    static QName EMPTY_QNAME = new QName("", "");
-    static Map<QName, TCKind> PRIMITIVE_TYPECODES = new HashMap<QName, TCKind>();
+    static final QName EMPTY_QNAME = new QName("", "");
+    static final Map<QName, TCKind> PRIMITIVE_TYPECODES = new HashMap<QName, TCKind>();
 
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaUtils.class);
+    
+    private CorbaUtils() {
+        //utility class
+    }
+
     
     public static QName getEmptyQName() {
         return EMPTY_QNAME;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/wsdl/CorbaTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/wsdl/CorbaTypeImpl.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/wsdl/CorbaTypeImpl.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/wsdl/CorbaTypeImpl.java Tue Jan  8 15:23:36 2008
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java Tue Jan  8 15:23:36 2008
@@ -602,18 +602,25 @@
         
         for (int i = 0; i < valueSets.length; i++) {
             IdltowsdlTypeTestStruct1 in = valueSets[i][0];
-            Holder<IdltowsdlTypeTestStruct1> inoutOrig = new Holder<IdltowsdlTypeTestStruct1>(valueSets[i][1]);
+            Holder<IdltowsdlTypeTestStruct1> inoutOrig = 
+                new Holder<IdltowsdlTypeTestStruct1>(valueSets[i][1]);
             Holder<IdltowsdlTypeTestStruct1> inout = new Holder<IdltowsdlTypeTestStruct1>(valueSets[i][1]);
             Holder<IdltowsdlTypeTestStruct1> out = new Holder<IdltowsdlTypeTestStruct1>();
 
             IdltowsdlTypeTestStruct1 ret = client.testStruct(in, inout, out);
 
-            assertEquals("testStruct(): Incorrect value for out param", inoutOrig.value.getStruct1Long(), out.value.getStruct1Long());
-            assertEquals("testStruct(): Incorrect value for out param", inoutOrig.value.getStruct1Short(), out.value.getStruct1Short());
-            assertEquals("testStruct(): Incorrect value for inout param", in.getStruct1Long() ,inout.value.getStruct1Long());
-            assertEquals("testStruct(): Incorrect value for inout param", in.getStruct1Short() ,inout.value.getStruct1Short());
-            assertEquals("testStruct(): Incorrect return value", in.getStruct1Long(), ret.getStruct1Long());
-            assertEquals("testStruct(): Incorrect return value", in.getStruct1Short(), ret.getStruct1Short());
+            assertEquals("testStruct(): Incorrect value for out param", 
+                         inoutOrig.value.getStruct1Long(), out.value.getStruct1Long());
+            assertEquals("testStruct(): Incorrect value for out param", 
+                         inoutOrig.value.getStruct1Short(), out.value.getStruct1Short());
+            assertEquals("testStruct(): Incorrect value for inout param", 
+                         in.getStruct1Long(), inout.value.getStruct1Long());
+            assertEquals("testStruct(): Incorrect value for inout param", 
+                         in.getStruct1Short(), inout.value.getStruct1Short());
+            assertEquals("testStruct(): Incorrect return value", 
+                         in.getStruct1Long(), ret.getStruct1Long());
+            assertEquals("testStruct(): Incorrect return value", 
+                         in.getStruct1Short(), ret.getStruct1Short());
         }                        
     }
 
@@ -643,7 +650,7 @@
             IdltowsdlTypeTestUnion1 ret = client.testUnion(in, inout, out);
 
             assertTrue("testUnion(): Incorrect value for out param", compareUnion(inoutOrig.value, out.value));
-            assertTrue("testUnion(): Incorrect value for inout param", compareUnion(in,inout.value));
+            assertTrue("testUnion(): Incorrect value for inout param", compareUnion(in, inout.value));
             assertTrue("testUnion(): Incorrect return value", compareUnion(in, ret));
         }                        
     }
@@ -677,7 +684,7 @@
             IdltowsdlTypeTestEnum1 ret = client.testEnum(in, inout, out);
 
             assertEquals("testEnum(): Incorrect value for out param", inoutOrig.value, out.value);
-            assertEquals("testEnum(): Incorrect value for inout param", in,inout.value);
+            assertEquals("testEnum(): Incorrect value for inout param", in, inout.value);
             assertEquals("testEnum(): Incorrect return value", in, ret);
         }
     }
@@ -785,8 +792,10 @@
             Holder<IdltowsdlTypeTestUnion2> out = new Holder<IdltowsdlTypeTestUnion2>();
 
             IdltowsdlTypeTestUnion2 ret = client.testUnionVariants(in, inout, out);
-            assertTrue("testUnionVariants(): Incorrect value for out param", compareUnionVariants(inoutOrig.value, out.value));
-            assertTrue("testUnionVariants(): Incorrect value for inout param", compareUnionVariants(in,inout.value));
+            assertTrue("testUnionVariants(): Incorrect value for out param", 
+                       compareUnionVariants(inoutOrig.value, out.value));
+            assertTrue("testUnionVariants(): Incorrect value for inout param", 
+                       compareUnionVariants(in, inout.value));
             assertTrue("testUnionVariants(): Incorrect return value", compareUnionVariants(in, ret));
         }                        
     }
@@ -1094,14 +1103,14 @@
         
         // bounded octed seq
         byte[] bytes = new byte[5];
-        for (int i=0; i<5; i++) {
+        for (int i = 0; i < 5; i++) {
             bytes[i] = Byte.valueOf(Integer.toString(i));
         }
         in.setBoundedOctetSeq(bytes);
         
         // array of strings
     	in.setBldAddr(new IdltowsdlTypeTestBuildingAddress6T());
-    	for (int i=0; i<6; i++) {
+    	for (int i = 0; i < 6; i++) {
     		in.getBldAddr().getItem().add(String.valueOf(i));
     	}
         
@@ -1109,7 +1118,7 @@
         inOutOrig.setBoundedOctetSeq(bytes);
         inOutOrig.setContents(contents);
     	inOutOrig.setBldAddr(new IdltowsdlTypeTestBuildingAddress6T());
-    	for (int i=6; i<12; i++) {
+    	for (int i = 6; i < 12; i++) {
     		inOutOrig.getBldAddr().getItem().add(String.valueOf(i));
     	}    	
     	

Added: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java?rev=610221&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java (added)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java Tue Jan  8 15:23:36 2008
@@ -0,0 +1,124 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yoko.bindings.corba;
+
+public final class Buffer {
+    int max_; // The maximum size of the buffer
+
+    byte[] data_; // The octet buffer
+
+    int len_; // The requested size of the buffer
+
+    int pos_; // The position counter
+
+    public Buffer() {
+    }
+
+    public Buffer(byte[] data, int len) {
+        data_ = data;
+        len_ = len;
+        max_ = len;
+        pos_ = 0;
+    }
+
+    public Buffer(int len) {
+        alloc(len);
+    }
+    
+    
+    // ------------------------------------------------------------------
+    // Standard IDL to Java Mapping
+    // ------------------------------------------------------------------
+
+    public byte[] data() {
+        return data_;
+    }
+
+    public int length() {
+        return len_;
+    }
+
+    public int rest_length() {
+        return len_ - pos_;
+    }
+
+    public int pos() {
+        return pos_;
+    }
+
+    public void pos(int pos) {
+        pos_ = pos;
+    }
+
+    public void advance(int delta) {
+        pos_ += delta;
+    }
+
+    public boolean is_full() {
+        return pos_ >= len_;
+    }
+
+    // ------------------------------------------------------------------
+    // Additional Yoko specific functions
+    // ------------------------------------------------------------------
+
+    public void alloc(int len) {
+        max_ = len;
+        len_ = len;
+        data_ = new byte[max_];
+        pos_ = 0;
+    }
+
+    public void realloc(int len) {
+        if (data_ == null) {
+            alloc(len);
+        } else {
+            assert len >= len_;
+            if (len <= max_) {
+                len_ = len;
+            } else {
+                int newMax = len > 2 * max_ ? len : 2 * max_;
+                byte[] newData = new byte[newMax];
+                System.arraycopy(data_, 0, newData, 0, len_);
+                data_ = newData;
+                len_ = len;
+                max_ = newMax;
+            }
+        }
+    }
+
+    public void data(byte[] data, int len) {
+        data_ = data;
+        len_ = len;
+        max_ = len;
+        pos_ = 0;
+    }
+
+    public void consume(Buffer buf) {
+        data_ = buf.data_;
+        len_ = buf.len_;
+        max_ = buf.max_;
+        pos_ = buf.pos_;
+        buf.data_ = null;
+        buf.len_ = 0;
+        buf.max_ = 0;
+        buf.pos_ = 0;
+    }
+
+}

Propchange: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingFactoryTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingFactoryTest.java Tue Jan  8 15:23:36 2008
@@ -26,13 +26,11 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
+
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.binding.BindingFactory;
 import org.apache.cxf.binding.BindingFactoryManager;
-import org.apache.cxf.binding.BindingFactoryManagerImpl;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
@@ -43,12 +41,16 @@
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
+import org.apache.yoko.wsdl.CorbaConstants;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import org.apache.yoko.wsdl.CorbaConstants;
 
-public class CorbaBindingFactoryTest extends TestCase {
+public class CorbaBindingFactoryTest extends Assert {
     
     protected Bus bus;
     protected EndpointInfo endpointInfo;
@@ -57,16 +59,8 @@
     protected Message inMessage;
     CorbaBindingFactory factory;
     
-    public CorbaBindingFactoryTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaBindingFactoryTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         System.setProperty("cxf.config.file", "cxf-extension-corba.xml");
         bus = BusFactory.getDefaultBus();       
         BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);        
@@ -74,6 +68,7 @@
         bfm.registerBindingFactory(CorbaConstants.NU_WSDL_CORBA, factory);               
     }
     
+    @After
     public void tearDown() {
         bus.shutdown(true);     
     }
@@ -81,13 +76,14 @@
     protected void setupServiceInfo(String ns, String wsdl, String serviceName, String portName) {        
         URL wsdlUrl = getClass().getResource(wsdl);
         assertNotNull(wsdlUrl);
-        WSDLServiceFactory factory = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
+        WSDLServiceFactory f = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
 
-        Service service = factory.create();        
+        Service service = f.create();        
         endpointInfo = service.getEndpointInfo(new QName(ns, portName));
    
     }
     
+    @Test
     public void testCreateBinding() throws Exception {
         IMocksControl control = EasyMock.createNiceControl();
         BindingInfo bindingInfo = control.createMock(BindingInfo.class);
@@ -103,6 +99,7 @@
         assertEquals(2, outInterceptors.size());        
     }
 
+    @Test
     public void testGetCorbaConduit() throws Exception {
         setupServiceInfo("http://yoko.apache.org/simple", 
                          "/wsdl/simpleIdl.wsdl", 
@@ -116,6 +113,7 @@
         assertNotNull(conduit);
     }
             
+    @Test
     public void testGetDestination() throws Exception {                
         setupServiceInfo("http://yoko.apache.org/simple", 
                          "/wsdl/simpleIdl.wsdl", 
@@ -128,6 +126,7 @@
         assertNotNull(target);
     }
     
+    @Test
     public void testTransportIds() throws Exception {
         setupServiceInfo("http://yoko.apache.org/simple", 
                          "/wsdl/simpleIdl.wsdl", 
@@ -146,28 +145,23 @@
         assertEquals("two", str.toString());
     }
     
+    @Test
     public void testGetUriPrefixes() throws Exception {
         Set<String> prefixes = factory.getUriPrefixes();
         assertNotNull("Prefixes should not be null", prefixes != null);
     }
     
     // check this
+    @Test
     public void testSetBus() throws Exception {
         factory.setBus(bus);    
     }
 
     // check this
+    @Test
     public void testSetActivationNamespaces() throws Exception {
         Collection<String> strs = new ArrayList<String>();
         strs.add("http://schemas.apache.org/yoko/bindings/corba");
     }
-    
-    public void testRegisterSelf() throws Exception {
-        
-    }
-    
-    public void testRegisterWithBindingManager() throws Exception {
-    
-    }
-    
+
 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingTest.java Tue Jan  8 15:23:36 2008
@@ -18,56 +18,28 @@
  */
 package org.apache.yoko.bindings.corba;
 
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
-import javax.xml.namespace.QName;
-import javax.xml.ws.Binding;
 
-import junit.framework.TestCase;
 
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.binding.BindingFactory;
-import org.apache.cxf.binding.BindingFactoryManager;
-import org.apache.cxf.binding.BindingFactoryManagerImpl;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.BindingInfo;
-import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.Destination;
-import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.cxf.wsdl11.WSDLServiceFactory;
-import org.easymock.classextension.EasyMock;
-import org.easymock.classextension.IMocksControl;
-import org.apache.cxf.wsdl.EndpointReferenceUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 import org.omg.CORBA.ORB;
 
-import org.apache.yoko.wsdl.CorbaConstants;
 
-public class CorbaBindingTest extends TestCase {
+public class CorbaBindingTest extends Assert {
     
     private ORB orb;
     
-    public CorbaBindingTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaBindingFactoryTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();                   
+    @Before
+    public void setUp() throws Exception {
         java.util.Properties props = System.getProperties();
-        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
-        props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
+        
+        
         props.put("yoko.orb.id", "Yoko-Server-Binding");
         orb = ORB.init(new String[0], props);
     }
@@ -82,6 +54,7 @@
         } 
     }
            
+    @Test
     public void testCorbaBinding() {
         CorbaBinding binding = new CorbaBinding();
         List<Interceptor> in = binding.getInInterceptors();

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java Tue Jan  8 15:23:36 2008
@@ -22,52 +22,49 @@
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.DescriptionInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
+import org.apache.schemas.yoko.bindings.corba.OperationType;
+import org.apache.schemas.yoko.bindings.corba.RaisesType;
+import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
+import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
+import org.apache.yoko.bindings.corba.utils.CorbaUtils;
+import org.apache.yoko.bindings.corba.utils.OrbConfig;
+import org.apache.yoko.wsdl.CorbaConstants;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
-import org.omg.CORBA.Any;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 import org.omg.CORBA.Context;
 import org.omg.CORBA.ContextList;
 import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NVList;
 import org.omg.CORBA.NamedValue;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.Request;
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
-import org.apache.schemas.yoko.bindings.corba.OperationType;
-import org.apache.schemas.yoko.bindings.corba.RaisesType;
-import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
-import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
-import org.apache.yoko.bindings.corba.utils.CorbaUtils;
-import org.apache.yoko.bindings.corba.utils.OrbConfig;
-import org.apache.yoko.orb.CORBA.NVList;
-import org.apache.yoko.wsdl.CorbaConstants;
 
-public class CorbaConduitTest extends TestCase {
+public class CorbaConduitTest extends Assert {
     
     private static IMocksControl control;
     private static ORB orb;
@@ -80,29 +77,21 @@
     TestUtils testUtils;
     OrbConfig orbConfig;
 
-    public CorbaConduitTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaBindingFactoryTest.class);
-    }
-    
+    @Before
     public void setUp() throws Exception {
         control = EasyMock.createNiceControl();
      
         bus = BusFactory.getDefaultBus(); 
      
         java.util.Properties props = System.getProperties();
-        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
-        props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
+        
+        
         props.put("yoko.orb.id", "Yoko-Server-Binding");
         orb = ORB.init(new String[0], props);
         orbConfig = new OrbConfig();
-        orbConfig.setOrbClass("org.apache.yoko.orb.CORBA.ORB");
-        orbConfig.setOrbSingletonClass("org.apache.yoko.orb.CORBA.ORBSingleton");
     }
-    
+
+    @After
     public void tearDown() {
         if (orb != null) {
             try {
@@ -113,11 +102,13 @@
         } 
     }
     
+    @Test
     public void testCorbaConduit() throws Exception {
         CorbaConduit conduit = setupCorbaConduit(false);        
         assertTrue("conduit should not be null", conduit != null);
     }
     
+    @Test
     public void testPrepare() throws Exception {       
         setupServiceInfo("http://yoko.apache.org/simple",
                          "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
@@ -133,13 +124,14 @@
         }
         OutputStream os = message.getContent(OutputStream.class);
         assertTrue("OutputStream should not be null", os != null);        
-        ORB orb = (ORB)message.get("orb");
-        assertTrue("Orb should not be null", orb != null);
+        ORB orb2 = (ORB)message.get("orb");
+        assertTrue("Orb should not be null", orb2 != null);
         Object obj = message.get("endpoint");
         assertTrue("EndpointReferenceType should not be null", obj != null);  
     }
        
     
+    @Test
     public void testGetTargetReference() throws Exception {
         setupServiceInfo("http://yoko.apache.org/simple",
                          "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
@@ -153,6 +145,7 @@
         assertTrue("ref should not be null", ref != null);
     }
     
+    @Test
     public void testGetAddress() throws Exception  {
         setupServiceInfo("http://yoko.apache.org/simple",
                          "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
@@ -166,6 +159,7 @@
         assertEquals(address, "corbaloc::localhost:40000/Simple");                
     }
     
+    @Test
     public void testClose() throws Exception {       
         Method m = CorbaConduit.class.getDeclaredMethod("buildRequest", 
             new Class[] {CorbaMessage.class, OperationType.class});
@@ -183,7 +177,7 @@
         EasyMock.expectLastCall().andReturn(opType);
         conduit.buildRequest(msg, opType);
         EasyMock.expectLastCall();
-        OutputStream os =control.createMock(OutputStream.class);
+        OutputStream os = control.createMock(OutputStream.class);
         EasyMock.expect(msg.getContent(OutputStream.class)).andReturn(os);
         os.close();
         EasyMock.expectLastCall();
@@ -193,12 +187,14 @@
         control.verify();
     }
     
+    @Test
     public void testGetTarget() throws Exception {
         CorbaConduit conduit = setupCorbaConduit(false);
         EndpointReferenceType endpoint = conduit.getTarget();
         assertTrue("EndpointReferenceType should not be null", endpoint != null);
     }
     
+    @Test
     public void testGetOperationExceptions() {    
         CorbaConduit conduit = control.createMock(CorbaConduit.class);    
         OperationType opType = control.createMock(OperationType.class);
@@ -214,9 +210,10 @@
         
         control.replay();
         conduit.getOperationExceptions(opType, typeMap);
-        assertEquals(exlist.size(),0);        
+        assertEquals(exlist.size(), 0);        
     }
     
+    @Test
     public void testBuildRequest() throws Exception {
         CorbaConduit conduit = setupCorbaConduit(false);            
         CorbaMessage message = control.createMock(CorbaMessage.class);
@@ -243,6 +240,7 @@
         EasyMock.expectLastCall();
     }
     
+    @Test
     public void testBuildArguments() throws Exception {
         Message msg = new MessageImpl();
         CorbaMessage message = new CorbaMessage(msg);
@@ -256,7 +254,7 @@
         arguments[0].setMode(org.omg.CORBA.ARG_OUT.value);
         
         CorbaConduit conduit = setupCorbaConduit(false);
-        NVList list = (NVList)conduit.getArguments(message);
+        NVList list = conduit.getArguments(message);
         assertNotNull("list should not be null", list != null);
         
         message.setStreamableArguments(arguments);
@@ -268,6 +266,7 @@
         assertNotNull("Any Value should not be null", listArgs.item(0).value() != null);        
     }
     
+    @Test
     public void testBuildReturn() throws Exception {
         Message msg = new MessageImpl();
         CorbaMessage message = new CorbaMessage(msg);
@@ -289,6 +288,7 @@
         assertEquals("name should be equal", ret2.name(), "returnName");               
     }
     
+    @Test
     public void testBuildExceptionListEmpty() throws Exception {
         CorbaConduit conduit = setupCorbaConduit(false);
         Message msg = new MessageImpl();
@@ -302,19 +302,19 @@
         assertEquals("The list should be empty", exList.count(), 0);        
     }
     
+    @Test
     public void testBuildExceptionListWithExceptions() throws Exception {        
         CorbaConduit conduit = setupCorbaConduit(false);
         Message msg = new MessageImpl();
         CorbaMessage message = new CorbaMessage(msg);
-        TestUtils testUtils = new TestUtils();
         CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
-        EndpointInfo endpointInfo = destination.getEndPointInfo();
+        EndpointInfo endpointInfo2 = destination.getEndPointInfo();
         QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
         BindingOperationInfo bInfo = destination.getBindingInfo().getOperation(name);
         OperationType opType = bInfo.getExtensor(OperationType.class);
         CorbaTypeMap typeMap = null;
         List<TypeMappingType> corbaTypes =
-            endpointInfo.getService().getDescription().getExtensors(TypeMappingType.class);        
+            endpointInfo2.getService().getDescription().getExtensors(TypeMappingType.class);        
         if (corbaTypes != null) {
             typeMap = CorbaUtils.createCorbaTypeMap(corbaTypes);
         }
@@ -332,10 +332,11 @@
         assertNotNull("Member type is not null", exList.item(0).member_type(0) != null);                
     }
             
+    @Test
     public void testInvoke() throws Exception {
         CorbaConduit conduit = setupCorbaConduit(false);
         //CorbaMessage message = new CorbaMessage(msg);
-        CorbaMessage message= control.createMock(CorbaMessage.class);
+        CorbaMessage message = control.createMock(CorbaMessage.class);
         /*String opName = "GreetMe";
         NVList nvlist = (NVList)orb.create_list(0);
         
@@ -401,9 +402,9 @@
     protected void setupServiceInfo(String ns, String wsdl, String serviceName, String portName) {        
         URL wsdlUrl = getClass().getResource(wsdl);
         assertNotNull(wsdlUrl);
-        WSDLServiceFactory factory = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
+        WSDLServiceFactory f = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
 
-        Service service = factory.create();        
+        Service service = f.create();        
         endpointInfo = service.getEndpointInfo(new QName(ns, portName));
    
     }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaDestinationTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaDestinationTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaDestinationTest.java Tue Jan  8 15:23:36 2008
@@ -18,70 +18,57 @@
  */
 package org.apache.yoko.bindings.corba;
 
-import java.io.File;
 
-import junit.framework.TestCase;
 
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.endpoint.EndpointImpl;
+
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.ServiceImpl;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.ChainInitiationObserver;
-import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 
 import org.apache.yoko.bindings.corba.utils.OrbConfig;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class CorbaDestinationTest extends TestCase {    
+public class CorbaDestinationTest extends Assert {    
     
     protected static TestUtils testUtils;
     EndpointInfo endpointInfo;
     OrbConfig orbConfig;
     
-    public CorbaDestinationTest() {
-        super();
-    }
     
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaDestinationTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();     
+    @Before
+    public void setUp() throws Exception {
         testUtils = new TestUtils();
         orbConfig = new OrbConfig();
         orbConfig.setOrbClass("org.apache.yoko.orb.CORBA.ORB");
         orbConfig.setOrbSingletonClass("org.apache.yoko.orb.CORBA.ORBSingleton");
     }
     
-    public void tearDown() {        
-    }
-    
+    @Test
     public void testDestination() throws Exception {       
-       endpointInfo = testUtils.setupServiceInfo("http://yoko.apache.org/simple",
+        endpointInfo = testUtils.setupServiceInfo("http://yoko.apache.org/simple",
                         "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
                         "SimpleCORBAPort");
-       CorbaDestination destination = new CorbaDestination(endpointInfo, orbConfig);
-       
-       EndpointReferenceType  rtype = destination.getAddress();
-       assertTrue("EndpointReferenceType should not be null", rtype != null);       
-       BindingInfo bindingInfo = destination.getBindingInfo();
-       assertTrue("BindingInfo should not be null", bindingInfo != null);       
-       EndpointInfo endpointInfo = destination.getEndPointInfo();
-       assertTrue("EndpointInfo should not be null", endpointInfo != null);
-       
-       Message m = new MessageImpl();
-       CorbaServerConduit serverConduit = (CorbaServerConduit)destination.getBackChannel(m, m, rtype);
-       assertTrue("CorbaServerConduit should not be null", serverConduit != null);             
-   }
+        CorbaDestination destination = new CorbaDestination(endpointInfo, orbConfig);
+   
+        EndpointReferenceType  rtype = destination.getAddress();
+        assertTrue("EndpointReferenceType should not be null", rtype != null);       
+        BindingInfo bindingInfo = destination.getBindingInfo();
+        assertTrue("BindingInfo should not be null", bindingInfo != null);       
+        EndpointInfo e2 = destination.getEndPointInfo();
+        assertTrue("EndpointInfo should not be null", e2 != null);
+   
+        Message m = new MessageImpl();
+        CorbaServerConduit serverConduit = (CorbaServerConduit)destination.getBackChannel(m, m, rtype);
+        assertNotNull("CorbaServerConduit should not be null", serverConduit);             
+    }
    
-   /*public void testSetMessageObserverActivate() throws Exception {
+   /*
+    @Test
+    public void testSetMessageObserverActivate() throws Exception {
        endpointInfo = testUtils.setupServiceInfo("http://yoko.apache.org/simple",
                         "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
                         "SimpleCORBAPort");

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaExceptionTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaExceptionTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaExceptionTest.java Tue Jan  8 15:23:36 2008
@@ -18,59 +18,45 @@
  */
 package org.apache.yoko.bindings.corba;
 
-import java.io.File;
-import java.util.HashMap;
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Map;
-import java.util.Properties;
 
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Endpoint;
-import javax.xml.ws.Service;
-
-import org.apache.cxf.jaxb.JAXBUtils;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.cxf.wsdl.EndpointReferenceUtils;
-import org.apache.cxf.wsdl.WSDLManager;
-import org.apache.cxf.wsdl11.WSDLManagerImpl;
 
 import org.apache.schemas.idl.except.ExceptionTest;
 import org.apache.schemas.idl.except.ExceptionTestCORBAService;
 import org.apache.schemas.idltypes.except.ExceptionTestReviewData;
 import org.apache.schemas.idltypes.except.ExceptionTestReviewDataResult;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import junit.framework.TestCase;
 
-public class CorbaExceptionTest extends TestCase {
 
-    private final QName PORT_NAME = 
+public class CorbaExceptionTest extends Assert {
+
+    private static final QName PORT_NAME = 
         new QName("http://schemas.apache.org/idl/except", "ExceptionTestCORBAPort"); 
     
-    private final QName SERVICE_NAME = 
+    private static final QName SERVICE_NAME = 
         new QName("http://schemas.apache.org/idl/except", "ExceptionTestCORBAService"); 
         
 
-    private final static String WSDL_LOCATION = "/wsdl/exceptions.wsdl";
-    private final static int MAX_WAIT_COUNT = 15;
+    private static final String WSDL_LOCATION = "/wsdl/exceptions.wsdl";
+    private static final int MAX_WAIT_COUNT = 15;
     
     private static TestServer server;
     private static boolean testServerReady;
     private ExceptionTest client;
     private URL wsdlUrl;
 
-    public CorbaExceptionTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaExceptionTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
-       
+
+    @Before
+    public void setUp() throws Exception {
         if (server == null) {
             server = new TestServer();
             server.start();
@@ -107,9 +93,8 @@
         }
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
+    @After
+    public void tearDown() throws Exception {
         server.interrupt();
 
         try {
@@ -124,6 +109,7 @@
         }
     }
 
+    @Test
     public void testBadRecordException() throws Exception {
         try {
             ExceptionTestReviewData data = new ExceptionTestReviewData();
@@ -150,6 +136,7 @@
         fail("Expected BadRecord Exception not found");
     }
 
+    @Test
     public void testPingMeFault() throws Exception {
         try {
             client.pingMe();
@@ -197,7 +184,8 @@
     public class ExceptionTestImpl implements ExceptionTest {
         public ExceptionTestReviewDataResult reviewData(ExceptionTestReviewData exId)
             throws org.apache.schemas.idl.except.BadRecord {
-            org.apache.schemas.idltypes.except.BadRecord rec = new org.apache.schemas.idltypes.except.BadRecord();
+            org.apache.schemas.idltypes.except.BadRecord rec
+                = new org.apache.schemas.idltypes.except.BadRecord();
             rec.setReason("testReason");
             rec.setCode((short)10);
             throw new org.apache.schemas.idl.except.BadRecord("test", rec);                                                              

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaMessageTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaMessageTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaMessageTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaMessageTest.java Tue Jan  8 15:23:36 2008
@@ -20,14 +20,16 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
+
 
 import org.apache.cxf.message.Message;
-import org.apache.cxf.service.model.BindingInfo;
 import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
 import org.apache.yoko.wsdl.CorbaConstants;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import org.omg.CORBA.Any;
 import org.omg.CORBA.NVList;
@@ -35,49 +37,42 @@
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
-public class CorbaMessageTest extends TestCase {
+public class CorbaMessageTest extends Assert {
 
     private static ORB orb;
     private Message message;
     
-    public CorbaMessageTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaMessageTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
-        
+    @Before
+    public void setUp() throws Exception {
         java.util.Properties props = System.getProperties();
-        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
-        props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
+        
+        
         props.put("yoko.orb.id", "Yoko-Server-Binding");
         orb = ORB.init(new String[0], props);
         IMocksControl control = EasyMock.createNiceControl();
         message = control.createMock(Message.class);
     }
     
-    public void testCreateCorbaMessage(Message message) {
-        CorbaMessage msg = new CorbaMessage(message);
-        assertNotNull(msg);
-    }
-    
+    @Test
     public void testGetCorbaMessageAttributes() {
         CorbaMessage msg = new CorbaMessage(message);
                         
         QName param1Name = new QName("param1");
         QName param1IdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
         TypeCode param1TypeCode = orb.get_primitive_tc(TCKind.tk_long);
-        CorbaPrimitiveHandler param1 = new CorbaPrimitiveHandler(param1Name, param1IdlType, param1TypeCode, null);
+        CorbaPrimitiveHandler param1 = new CorbaPrimitiveHandler(param1Name,
+                                                                 param1IdlType,
+                                                                 param1TypeCode,
+                                                                 null);
         CorbaStreamable p1 = msg.createStreamableObject(param1, param1Name);
         
         QName param2Name = new QName("param2");
         QName param2IdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
         TypeCode param2TypeCode = orb.get_primitive_tc(TCKind.tk_string);
-        CorbaPrimitiveHandler param2 = new CorbaPrimitiveHandler(param2Name, param2IdlType, param2TypeCode, null);
+        CorbaPrimitiveHandler param2 = new CorbaPrimitiveHandler(param2Name,
+                                                                 param2IdlType,
+                                                                 param2TypeCode,
+                                                                 null);
         CorbaStreamable p2 = msg.createStreamableObject(param2, param2Name);
         
         msg.addStreamableArgument(p1);
@@ -91,13 +86,19 @@
         QName param3Name = new QName("param3");
         QName param3IdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
         TypeCode param3TypeCode = orb.get_primitive_tc(TCKind.tk_short);
-        CorbaPrimitiveHandler param3 = new CorbaPrimitiveHandler(param3Name, param3IdlType, param3TypeCode, null);
+        CorbaPrimitiveHandler param3 = new CorbaPrimitiveHandler(param3Name,
+                                                                 param3IdlType,
+                                                                 param3TypeCode,
+                                                                 null);
         CorbaStreamable p3 = msg.createStreamableObject(param3, param3Name);
         
         QName param4Name = new QName("param4");
         QName param4IdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "float", CorbaConstants.NP_WSDL_CORBA);
         TypeCode param4TypeCode = orb.get_primitive_tc(TCKind.tk_float);
-        CorbaPrimitiveHandler param4 = new CorbaPrimitiveHandler(param4Name, param4IdlType, param4TypeCode, null);
+        CorbaPrimitiveHandler param4 = new CorbaPrimitiveHandler(param4Name,
+                                                                 param4IdlType,
+                                                                 param4TypeCode,
+                                                                 null);
         CorbaStreamable p4 = msg.createStreamableObject(param4, param4Name);
         
         CorbaStreamable[] args = new CorbaStreamable[2];
@@ -124,9 +125,12 @@
         assertTrue(resultList.count() == 2);        
         
         QName returnName = new QName("param2");
-        QName returnIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "boolean", CorbaConstants.NP_WSDL_CORBA);
+        QName returnIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "boolean",
+                                        CorbaConstants.NP_WSDL_CORBA);
         TypeCode returnTypeCode = orb.get_primitive_tc(TCKind.tk_boolean);
-        CorbaPrimitiveHandler returnValue = new CorbaPrimitiveHandler(returnName, returnIdlType, returnTypeCode, null);
+        CorbaPrimitiveHandler returnValue = new CorbaPrimitiveHandler(returnName,
+                                                                      returnIdlType,
+                                                                      returnTypeCode, null);
         CorbaStreamable ret = msg.createStreamableObject(returnValue, returnName);
         
         msg.setStreamableReturn(ret);

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedObjReferenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedObjReferenceTest.java?rev=610221&r1=610220&r2=610221&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedObjReferenceTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedObjReferenceTest.java Tue Jan  8 15:23:36 2008
@@ -18,16 +18,13 @@
  */
 package org.apache.yoko.bindings.corba;
 
-import java.io.File;
-import java.util.HashMap;
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Map;
-import java.util.Properties;
 
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
-import javax.xml.ws.BindingType;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Service;
 
@@ -39,50 +36,44 @@
 import org.apache.cxf.wsdl11.WSDLManagerImpl;
 
 import org.apache.schemas.yoko.idl.nestedobjref.Foo;
-import org.apache.schemas.yoko.idl.nestedobjref.FooCORBAService;
 import org.apache.schemas.yoko.idl.nestedobjref.FooFactory;
 import org.apache.schemas.yoko.idl.nestedobjref.FooFactoryCORBAService;
 import org.apache.schemas.yoko.idl.nestedobjref.FooRefStruct;
 import org.apache.schemas.yoko.idl.nestedobjref.FooRefUnion;
-import org.apache.yoko.bindings.corba.CorbaObjectReferenceTest.TestObjectImpl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-import junit.framework.TestCase;
 
-public class CorbaNestedObjReferenceTest extends TestCase {
 
-    private final QName OBJECT_PORT_NAME = 
+public class CorbaNestedObjReferenceTest extends Assert {
+
+    private static final QName OBJECT_PORT_NAME = 
         new QName("http://schemas.apache.org/yoko/idl/NestedObjRef", "FooCORBAPort"); 
     
-    private final QName OBJECT_PORT_TYPE = 
+    private static final QName OBJECT_PORT_TYPE = 
         new QName("http://schemas.apache.org/yoko/idl/NestedObjRef", "Foo"); 
     
-    private final QName OBJECT_SERVICE_NAME = 
+    private static final QName OBJECT_SERVICE_NAME = 
         new QName("http://schemas.apache.org/yoko/idl/NestedObjRef", "FooCORBAService"); 
     
-    private final QName INTERFACE_PORT_NAME = 
+    private static final QName INTERFACE_PORT_NAME = 
         new QName("http://schemas.apache.org/yoko/idl/NestedObjRef", "FooFactoryCORBAPort"); 
     
-    private final QName INTERFACE_SERVICE_NAME = 
+    private static final QName INTERFACE_SERVICE_NAME = 
         new QName("http://schemas.apache.org/yoko/idl/NestedObjRef", "FooFactoryCORBAService"); 
     
-    private final static String WSDL_LOCATION = "/wsdl/NestedObjRef.wsdl";
-    private final static int MAX_WAIT_COUNT = 15;
+    private static final String WSDL_LOCATION = "/wsdl/NestedObjRef.wsdl";
+    private static final int MAX_WAIT_COUNT = 15;
     
     private static TestServer server;
     private static boolean testServerReady;
     private FooFactory client;
     private URL wsdlUrl;
 
-    public CorbaNestedObjReferenceTest(String arg0) {
-        super(arg0);
-    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CorbaNestedObjReferenceTest.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
        
         if (server == null) {
             server = new TestServer();
@@ -122,9 +113,8 @@
         }
     }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
+    @After
+    public void tearDown() throws Exception {
         server.interrupt();
 
         try {
@@ -139,6 +129,7 @@
         }
     }
 
+    @Test
     public void testCreateFooRefInStruct() {
         FooRefStruct ref = client.createFooRefInStruct("FooRefInStruct");
         //EndpointReferenceType epr = createObjectFromEndpointReferenceType(ref.getRef());
@@ -163,6 +154,7 @@
         assertNull("Null EPR expected", ref.getRef());
     }
 
+    @Test
     public void testCreateFooRefInUnion() {
         FooRefUnion ref = client.createFooRefInUnion();
         EndpointReferenceType epr = ref.getU12();
@@ -181,6 +173,7 @@
         assertTrue(portName.equals(OBJECT_PORT_NAME.getLocalPart()));
     }
     
+    @Test
     public void testInferredObjectReturn() {
         
         EndpointReferenceType ref = client.testInferredObjectReturn();
@@ -239,31 +232,32 @@
     }
     
     public Foo createObjectFromEndpointReferenceType(EndpointReferenceType epr) throws Exception {
-            WSDLManager manager = null;
-            manager = new WSDLManagerImpl();
+        WSDLManager manager = null;
+        manager = new WSDLManagerImpl();
 
-            QName interfaceName = EndpointReferenceUtils.getInterfaceName(epr);
-            String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(epr);
-            QName serviceName = EndpointReferenceUtils.getServiceName(epr);
-            String portName = EndpointReferenceUtils.getPortName(epr);
+        QName interfaceName = EndpointReferenceUtils.getInterfaceName(epr);
+        String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(epr);
+        assertNotNull(wsdlLocation);
+        QName serviceName = EndpointReferenceUtils.getServiceName(epr);
+        String portName = EndpointReferenceUtils.getPortName(epr);
 
-            QName port = new QName(serviceName.getNamespaceURI(), portName);
+        QName port = new QName(serviceName.getNamespaceURI(), portName);
 
-            StringBuffer seiName = new StringBuffer();
-            seiName.append("org.apache.schemas.yoko.idl.nestedobjref.");
-            seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(),
-                           JAXBUtils.IdentifierType.INTERFACE));
+        StringBuffer seiName = new StringBuffer();
+        seiName.append("org.apache.schemas.yoko.idl.nestedobjref.");
+        seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(),
+                       JAXBUtils.IdentifierType.INTERFACE));
 
-            Class<?> sei = null;
-            sei = Class.forName(seiName.toString(), true, manager.getClass().getClassLoader());
+        Class<?> sei = null;
+        sei = Class.forName(seiName.toString(), true, manager.getClass().getClassLoader());
 
-            Service service = Service.create(wsdlUrl, serviceName);
-            Foo testObj = (Foo)service.getPort(port, sei);
+        Service service = Service.create(wsdlUrl, serviceName);
+        Foo testObj = (Foo)service.getPort(port, sei);
 
-            Map<String, Object> requestContext = ((BindingProvider)testObj).getRequestContext();
-            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, epr.getAddress().getValue());
+        Map<String, Object> requestContext = ((BindingProvider)testObj).getRequestContext();
+        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, epr.getAddress().getValue());
 
-            return testObj;
+        return testObj;
     }
     
     
@@ -328,7 +322,7 @@
         
         public EndpointReferenceType testInferredObjectReturn() {
             return createEndpointReferenceType("InferredObjectReturn", true);
-         }
+        }
     }
     
     // A minimal Foo implementation to test object references



Mime
View raw message