cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r619530 - in /incubator/cxf/trunk/rt/bindings/corba: ./ src/main/java/org/apache/yoko/bindings/corba/ src/main/java/org/apache/yoko/bindings/corba/utils/ src/test/java/org/apache/yoko/bindings/corba/ src/test/java/org/apache/yoko/bindings/c...
Date Thu, 07 Feb 2008 18:02:05 GMT
Author: dkulp
Date: Thu Feb  7 10:01:55 2008
New Revision: 619530

URL: http://svn.apache.org/viewvc?rev=619530&view=rev
Log:
Updates to get the corba binding unit tests working (I svn rm'd a bunch of things that need to be system tests, will restore them to systests soon)

Removed:
    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/AbstractTypeTestClient.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient1.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/Buffer.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/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/CorbaSystemExceptionTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTestServer.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/IdlToWsdlTypeTestImpl.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/OutputStream.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/ServerLauncher.java
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/idl/type_test/
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/logging.properties
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/AnyTest.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/Bank.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/Nested.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/NestedObjRef.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/ObjectRef.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/ObjectRefLogical.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/ObjectRefTestService.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/OpNames.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/ParamModes.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/StaxTest.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/SystemEx.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/type_test/
    incubator/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl/ws-addr.xsd
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/CorbaServerConduit.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/OrbConfig.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/CorbaServerConduitTest.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/CorbaStreamableTest.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=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/pom.xml (original)
+++ incubator/cxf/trunk/rt/bindings/corba/pom.xml Thu Feb  7 10:01:55 2008
@@ -33,7 +33,6 @@
     </parent>
 
     <properties>
-        <file.url.prefix/>
         <checkstyle.extension>-corba</checkstyle.extension>
     </properties>
 
@@ -104,340 +103,6 @@
                     </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>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-test-sources</id>
-                        <phase>generate-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <tasks>
-                                <property name="generated.target" value="${basedir}/target/generated" />
-                                <property name="generated.src.test" value="${generated.target}/src/test/java" />
-                                <property name="generated.resources.test" value="${generated.target}/src/test/resources" />
-                                <property name="generated.wsdl.test" value="${generated.resources.test}/" />
-                                <property name="test.resources.dir" location="${basedir}/src/test/resources" />
-
-                                <mkdir dir="${generated.resources.test}/wsdl/type_test" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
-                                    <param name="groupID" expression="1" />
-                                </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
-                                    <param name="groupID" expression="2" />
-                                </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
-                                    <param name="groupID" expression="3" />
-                                </xslt>
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.resources.test}/wsdl/type_test/type_test_corba_inc.wsdl">
-                                    <param name="inc_xsd_path" expression="." />
-                                    <param name="use_style" expression="document" />
-                                    <param name="tns_suffix" expression="corba" />
-                                </xslt>
-                                <mkdir dir="${generated.src.test}/org/apache/type_test/corba" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/type_test/corba/TypeTestImpl.java" />
-                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl" in="${test.resources.dir}/wsdl/type_test/type_test.xsd" out="${generated.src.test}/org/apache/type_test/corba/TypeTestTester.java" />
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.yoko</groupId>
-                <artifactId>yoko-maven-plugins</artifactId>
-                <version>${version}</version>
-                <dependencies>
-                    <dependency>
-                        <groupId>wsdl4j</groupId>
-                        <artifactId>wsdl4j</artifactId>
-                        <version>1.6.1</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.apache.cxf</groupId>
-                        <artifactId>cxf-tools-common</artifactId>
-                        <version>${cxf.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.apache.cxf</groupId>
-                        <artifactId>cxf-api</artifactId>
-                        <version>${cxf.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.apache.yoko</groupId>
-                        <artifactId>yoko-api</artifactId>
-                        <version>${version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.codehaus.woodstox</groupId>
-                        <artifactId>wstx-asl</artifactId>
-                        <version>${stax.version}</version>
-                    </dependency>
-                </dependencies>
-                <executions>
-                    <execution>
-                        <id>generate-type-test-corba-binding</id>
-                        <phase>process-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <outputDir>${basedir}/target/generated/src/test/resources/wsdl/type_test</outputDir>
-                            <wsdltoidlOptions>
-                                <wsdltoidlOption>
-                                    <wsdl>${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_corba_inc.wsdl</wsdl>
-                                    <corbabinding>true</corbabinding>
-                                    <extraargs>
-                                        <extraarg>-w</extraarg>
-                                        <extraarg>type_test_corba.wsdl</extraarg>
-                                        <extraarg>-b</extraarg>
-                                        <extraarg>TypeTestCORBABinding</extraarg>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdltoidlOption>
-                            </wsdltoidlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdltoidl</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>idltowsdl-generate-type-test-corba-binding</id>
-                        <phase>process-test-sources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <outputDir>${basedir}/target/generated/src/test/resources/wsdl/type_test</outputDir>
-                            <idltowsdlOptions>
-                                <idltowsdlOption>
-                                    <idl>${basedir}/src/test/resources/idl/type_test/idltowsdl_type_test.idl</idl>
-                                    <extraargs>
-                                        <extraarg>-a</extraarg>
-                                        <extraarg>corbaloc::localhost:40010/idltowsdl_type_test</extraarg>
-                                    </extraargs>
-                                </idltowsdlOption>
-                            </idltowsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>idltowsdl</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.cxf</groupId>
-                <artifactId>cxf-codegen-plugin</artifactId>
-                <version>${cxf.version}</version>
-                <executions>
-                    <execution>
-                        <id>generate-type-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_corba.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                        <extraarg>-quiet</extraarg>
-                                    </extraargs>
-                                    <dependencies>
-                                        <dependency>
-                                            ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_corba_inc.wsdl
-                                        </dependency>
-                                        <dependency>
-                                            ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_1.xsd
-                                        </dependency>
-                                        <dependency>
-                                            ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_2.xsd
-                                        </dependency>
-                                        <dependency>
-                                            ${basedir}/target/generated/src/test/resources/wsdl/type_test/type_test_3.xsd
-                                        </dependency>
-                                    </dependencies>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-corba-type-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/target/generated/src/test/resources/wsdl/type_test/idltowsdl_type_test.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-corba-object-reference-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/ObjectRef.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/ObjectRefLogical.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/ObjectRefTestService.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/NestedObjRef.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/PolyNestedObjRef.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-corba-exception-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/SystemEx.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/exceptions.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-corba-any-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/AnyTest.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>generate-duplicate-operation-name-test-java-sources</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
-                            <wsdlOptions>
-                                <wsdlOption>
-                                    <wsdl>
-                                        ${basedir}/src/test/resources/wsdl/OpNames.wsdl
-                                    </wsdl>
-                                    <extraargs>
-                                        <extraarg>-verbose</extraarg>
-                                    </extraargs>
-                                </wsdlOption>
-                            </wsdlOptions>
-                        </configuration>
-                        <goals>
-                            <goal>wsdl2java</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin-->
         </plugins>
     </build>
-
-    <profiles>
-        <profile>
-            <id>default</id>
-            <activation>
-                <os>
-                    <family>windows</family>
-                </os>
-            </activation>
-            <properties>
-                <file.url.prefix>file:///</file.url.prefix>
-            </properties>
-        </profile>
-    </profiles>
 </project>

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=619530&r1=619529&r2=619530&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 Thu Feb  7 10:01:55 2008
@@ -66,7 +66,7 @@
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.UnknownUserException;
 
-public final class CorbaConduit implements Conduit {
+public class CorbaConduit implements Conduit {
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaConduit.class);
 
 
@@ -151,7 +151,7 @@
         incomingObserver = observer;
     }
 
-    public EndpointReferenceType getTargetReference(EndpointReferenceType t) {
+    public final EndpointReferenceType getTargetReference(EndpointReferenceType t) {
         EndpointReferenceType ref = null;
         if (null == t) {
             ref = new EndpointReferenceType();
@@ -164,7 +164,7 @@
         return ref;
     }
 
-    protected String getAddress() {
+    public final String getAddress() {
         return endpointInfo.getAddress();
     }
         
@@ -274,7 +274,12 @@
         throws Exception {
         Request request = null;
         ContextList ctxList = orb.create_context_list();
-        Context ctx = orb.get_default_context();            
+        Context ctx = null;
+        try {
+            ctx = orb.get_default_context();            
+        } catch (Exception ex) {
+            //ignore?
+        }
 
         org.omg.CORBA.Object targetObj =
             (org.omg.CORBA.Object)message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT);

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaServerConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaServerConduit.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaServerConduit.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/CorbaServerConduit.java Thu Feb  7 10:01:55 2008
@@ -46,7 +46,7 @@
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.ServerRequest;
 
-public final class CorbaServerConduit implements Conduit {
+public class CorbaServerConduit implements Conduit {
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaServerConduit.class);
 
     private EndpointInfo endpointInfo;
@@ -108,7 +108,7 @@
         //NOTHING
     }
 
-    public EndpointReferenceType getTargetReference(EndpointReferenceType t) {
+    public final EndpointReferenceType getTargetReference(EndpointReferenceType t) {
         EndpointReferenceType ref = null;
         if (null == t) {
             ref = new EndpointReferenceType();
@@ -121,7 +121,7 @@
         return ref;
     }
 
-    protected String getAddress() {
+    public final String getAddress() {
         return endpointInfo.getAddress();
     }
     

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=619530&r1=619529&r2=619530&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 Thu Feb  7 10:01:55 2008
@@ -45,8 +45,12 @@
     public static ORB getDefaultORB(OrbConfig config) {        
         if (defaultORB == null) {
             Properties props = System.getProperties();
-            props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
-            props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
+            if (config.getOrbClass() != null) {
+                props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
+            }
+            if (config.getOrbSingletonClass() != null) {
+                props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
+            }
             props.put("yoko.orb.id", "Yoko-Binding");
             List<String> orbArgs = config.getOrbArgs();
             defaultORB = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
@@ -69,8 +73,12 @@
         }
 
         Properties props = System.getProperties();
-        props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
-        props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
+        if (config.getOrbClass() != null) {
+            props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
+        }
+        if (config.getOrbSingletonClass() != null) {
+            props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
+        }
         props.put("yoko.orb.id", "Yoko-Binding-" + address);
         List<String> orbArgs = config.getOrbArgs();
         

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/OrbConfig.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/OrbConfig.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/OrbConfig.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/utils/OrbConfig.java Thu Feb  7 10:01:55 2008
@@ -24,8 +24,8 @@
 
 public class OrbConfig {
 
-    String orbClass = "org.apache.yoko.orb.CORBA.ORB";
-    String orbSingletonClass = "org.apache.yoko.orb.CORBA.ORBSingleton";
+    String orbClass;
+    String orbSingletonClass;
     List<String> orbArgs = new ArrayList<String>();
 
     public void setOrbClass(String cls) {

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=619530&r1=619529&r2=619530&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 Thu Feb  7 10:01:55 2008
@@ -74,7 +74,6 @@
     protected MessageObserver observer;
     Message inMessage;
     CorbaBindingFactory factory;
-    TestUtils testUtils;
     OrbConfig orbConfig;
 
     @Before
@@ -303,10 +302,11 @@
     }
     
     @Test
-    public void testBuildExceptionListWithExceptions() throws Exception {        
+    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 endpointInfo2 = destination.getEndPointInfo();
         QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
@@ -353,7 +353,7 @@
         NamedValue ret = control.createMock(NamedValue.class);
         ExceptionList exList = control.createMock(ExceptionList.class);        
         
-        EasyMock.expect(obj._create_request(EasyMock.isA(Context.class), 
+        EasyMock.expect(obj._create_request((Context)EasyMock.anyObject(), 
                             EasyMock.eq("greetMe"),
                             EasyMock.isA(NVList.class),
                             EasyMock.isA(NamedValue.class),

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=619530&r1=619529&r2=619530&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 Thu Feb  7 10:01:55 2008
@@ -43,8 +43,6 @@
     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");
     }
     
     @Test

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaServerConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaServerConduitTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaServerConduitTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/CorbaServerConduitTest.java Thu Feb  7 10:01:55 2008
@@ -52,13 +52,13 @@
 import org.omg.CORBA.TypeCode;
 
 public class CorbaServerConduitTest extends Assert {
+    protected EndpointInfo endpointInfo;
+    protected EndpointReferenceType target;    
+    protected MessageObserver observer;
         
     IMocksControl control;
     ORB orb;
     Bus bus;
-    protected EndpointInfo endpointInfo;
-    protected EndpointReferenceType target;    
-    protected MessageObserver observer;
     Message inMessage;
     CorbaBindingFactory factory;
     TestUtils testUtils;
@@ -78,8 +78,6 @@
         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
@@ -118,8 +116,8 @@
         }
         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);
         destination.shutdown();
@@ -288,7 +286,7 @@
     protected CorbaServerConduit setupCorbaServerConduit(boolean send) {
         target = EasyMock.createMock(EndpointReferenceType.class);                   
         endpointInfo = EasyMock.createMock(EndpointInfo.class);
-        CorbaServerConduit CorbaServerConduit = 
+        CorbaServerConduit corbaServerConduit = 
             new CorbaServerConduit(endpointInfo, target, orbConfig, corbaTypeMap);
         
         if (send) {
@@ -298,10 +296,10 @@
                     inMessage = m;
                 }
             };
-            CorbaServerConduit.setMessageObserver(observer);
+            corbaServerConduit.setMessageObserver(observer);
         }
         
-        return CorbaServerConduit;        
+        return corbaServerConduit;        
     }
     
     protected void setupServiceInfo(String ns, String wsdl, String serviceName, String portName) {        

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServantTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServantTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServantTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServantTest.java Thu Feb  7 10:01:55 2008
@@ -127,7 +127,7 @@
         }            
         
         public void onMessage(Message msg) {            
-            System.out.println("Test OnMessage in TestObserver");            
+            //System.out.println("Test OnMessage in TestObserver");            
         }
     }
 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReaderTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReaderTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReaderTest.java Thu Feb  7 10:01:55 2008
@@ -18,24 +18,14 @@
  */
 package org.apache.yoko.bindings.corba.runtime;
 
+import java.io.IOException;
 import java.math.BigInteger;
 import java.net.URL;
 import java.util.List;
 
 import javax.xml.namespace.QName;
 
-
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.omg.CORBA.ORB;
-import org.omg.CORBA.StructMember;
-import org.omg.CORBA.TCKind;
-import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.portable.InputStream;
-
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.schemas.yoko.bindings.corba.Array;
 import org.apache.schemas.yoko.bindings.corba.Enum;
 import org.apache.schemas.yoko.bindings.corba.Enumerator;
@@ -53,11 +43,21 @@
 import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
 import org.apache.yoko.bindings.corba.types.CorbaSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaStructHandler;
-import org.apache.yoko.orb.CORBA.OutputStream;
-import org.apache.yoko.orb.OCI.Buffer;
 
 import org.apache.yoko.wsdl.CorbaConstants;
 
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
 public class CorbaObjectReaderTest extends Assert {
 
     private static ORB orb;
@@ -84,8 +84,7 @@
 
     @Test
     public void testReadBoolean() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_boolean(true);
         
         InputStream iStream = oStream.create_input_stream();
@@ -97,8 +96,7 @@
     
     @Test
     public void testReadChar() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_char('c');
         
         InputStream iStream = oStream.create_input_stream();
@@ -110,8 +108,7 @@
     
     @Test
     public void testReadWChar() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_wchar('w');
         
         InputStream iStream = oStream.create_input_stream();
@@ -123,8 +120,7 @@
     
     @Test
     public void testReadOctet() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_octet((byte)27);
         
         InputStream iStream = oStream.create_input_stream();
@@ -136,8 +132,7 @@
     
     @Test
     public void testReadShort() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_short((short)-100);
         
         InputStream iStream = oStream.create_input_stream();
@@ -149,8 +144,7 @@
     
     @Test
     public void testReadUShort() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_ushort((short)100);
         
         InputStream iStream = oStream.create_input_stream();
@@ -162,8 +156,7 @@
     
     @Test
     public void testReadLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_long(-100000);
         
         InputStream iStream = oStream.create_input_stream();
@@ -175,8 +168,7 @@
     
     @Test
     public void testReadULong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_ulong(100000);
         
         InputStream iStream = oStream.create_input_stream();
@@ -188,8 +180,7 @@
     
     @Test
     public void testReadLongLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_longlong(1000000000);
         
         InputStream iStream = oStream.create_input_stream();
@@ -201,8 +192,7 @@
     
     @Test
     public void testReadULongLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_ulonglong(-1000000000);
         
         InputStream iStream = oStream.create_input_stream();
@@ -214,8 +204,7 @@
     
     @Test
     public void testReadFloat() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_float((float)1234.56);
         
         InputStream iStream = oStream.create_input_stream();
@@ -227,8 +216,7 @@
     
     @Test
     public void testReadDouble() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_double(6543.21);
         
         InputStream iStream = oStream.create_input_stream();
@@ -240,28 +228,26 @@
     
     @Test
     public void testReadString() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_string("String");
         
         InputStream iStream = oStream.create_input_stream();
         CorbaObjectReader reader = new CorbaObjectReader(iStream);
         
         String stringValue = reader.readString();
-        assertTrue(stringValue.equals("String"));
+        assertTrue("String".equals(stringValue));
     }
     
     @Test
     public void testReadWString() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_wstring("WString");
         
         InputStream iStream = oStream.create_input_stream();
         CorbaObjectReader reader = new CorbaObjectReader(iStream);
         
         String wstringValue = reader.readWString();
-        assertTrue(wstringValue.equals("WString"));
+        assertTrue("WString".equals(wstringValue));
     }
     
     // need to add tests for arrays, sequences, struct, exceptions
@@ -270,8 +256,7 @@
         
         int data[] = {1, 1, 2, 3, 5, 8, 13, 21};
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_long_array(data, 0, data.length);
 
         InputStream iStream = oStream.create_input_stream();
@@ -307,8 +292,7 @@
     public void testReadSequence() {
         String data[] = {"one", "one", "two", "three", "five", "eight", "thirteen", "twenty-one"};
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_long(data.length);
         for (int i = 0; i < data.length; ++i) {
             oStream.write_string(data[i]);
@@ -345,8 +329,7 @@
     
     @Test
     public void testReadStruct() {        
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
 
         // create the following struct
         // struct TestStruct {
@@ -407,14 +390,14 @@
         assertTrue(new Integer(((CorbaPrimitiveHandler)nestedObjs.get(0)).getDataFromValue()).intValue() 
                    == member1);
         assertTrue(((CorbaPrimitiveHandler)nestedObjs.get(1)).getDataFromValue().equals(member2));
-        assertTrue(new Boolean(((CorbaPrimitiveHandler)nestedObjs.get(2)).getDataFromValue()).booleanValue()
+        assertTrue(Boolean.valueOf(((CorbaPrimitiveHandler)nestedObjs.get(2))
+                                   .getDataFromValue()).booleanValue()
                    == member3);
     }
   
     @Test
     public void testReadException() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
 
         // create the following exception
         // exception TestExcept {
@@ -431,9 +414,12 @@
         InputStream iStream = oStream.create_input_stream();
         CorbaObjectReader reader = new CorbaObjectReader(iStream);
         
-        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception", CorbaConstants.NP_WSDL_CORBA);
-        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
-        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
+        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception",
+                                        CorbaConstants.NP_WSDL_CORBA);
+        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", 
+                                       CorbaConstants.NP_WSDL_CORBA);
+        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", 
+                                        CorbaConstants.NP_WSDL_CORBA);
         
         Exception exceptType = new Exception();
         exceptType.setName("TestException");
@@ -462,14 +448,14 @@
         reader.readException(obj);
         
         List<CorbaObjectHandler> nestedObjs = obj.getMembers();
-        assertTrue(new Short(((CorbaPrimitiveHandler)nestedObjs.get(0)).getDataFromValue()).shortValue() == code);
+        assertTrue(new Short(((CorbaPrimitiveHandler)nestedObjs.get(0))
+                                 .getDataFromValue()).shortValue() == code);
         assertTrue(((CorbaPrimitiveHandler)nestedObjs.get(1)).getDataFromValue().equals(message));
     } 
     
     @Test
     public void testReadEnum() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         // create the following enum
         // enum { RED, GREEN, BLUE };
@@ -501,8 +487,7 @@
     
     @Test
     public void testReadFixed() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         // create the following fixed
         // fixed<5,2>
@@ -526,20 +511,19 @@
     }
     
     @Test
-    public void testReadObjectReference() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+    public void testReadObjectReference() throws IOException {
+        OutputStream oStream = orb.create_output_stream();
         
         URL refUrl = getClass().getResource("/references/account.ref");
-        org.omg.CORBA.Object objRef = orb.string_to_object("file://" + refUrl.getPath());
+        String oRef = IOUtils.toString(refUrl.openStream()).trim();
+        org.omg.CORBA.Object objRef = 
+            orb.string_to_object(oRef);
+        
         assertNotNull(objRef);
         oStream.write_Object(objRef);
         // we need an ORBinstance to handle reading objects so use the Yoko input stream and
         // ORB_impl
-        org.apache.yoko.orb.CORBA.InputStream iStream = 
-            (org.apache.yoko.orb.CORBA.InputStream)oStream.create_input_stream();
-        org.apache.yoko.orb.OBCORBA.ORB_impl o = (org.apache.yoko.orb.OBCORBA.ORB_impl)orb;
-        iStream._OB_ORBInstance(o._OB_ORBInstance());
+        InputStream iStream = oStream.create_input_stream();
         
         CorbaObjectReader reader = new CorbaObjectReader(iStream);
         

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriterTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriterTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriterTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriterTest.java Thu Feb  7 10:01:55 2008
@@ -18,22 +18,13 @@
  */
 package org.apache.yoko.bindings.corba.runtime;
 
+import java.io.IOException;
 import java.math.BigInteger;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
 
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.omg.CORBA.ORB;
-import org.omg.CORBA.StructMember;
-import org.omg.CORBA.TCKind;
-import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.portable.InputStream;
-
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.schemas.yoko.bindings.corba.Array;
 import org.apache.schemas.yoko.bindings.corba.Exception;
 import org.apache.schemas.yoko.bindings.corba.MemberType;
@@ -46,10 +37,20 @@
 import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
 import org.apache.yoko.bindings.corba.types.CorbaSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaStructHandler;
-import org.apache.yoko.orb.CORBA.OutputStream;
-import org.apache.yoko.orb.OCI.Buffer;
 import org.apache.yoko.wsdl.CorbaConstants;
 
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+
 public class CorbaObjectWriterTest extends Assert {
 
     private static ORB orb;
@@ -76,11 +77,10 @@
 
     @Test
     public void testWriteBoolean() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
-        Boolean boolValue = new Boolean(true);
+        Boolean boolValue = Boolean.TRUE;
         writer.writeBoolean(boolValue);
         
         InputStream iStream = oStream.create_input_stream();
@@ -90,8 +90,7 @@
     
     @Test
     public void testWriteChar() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Character charValue = new Character('c');
@@ -104,8 +103,7 @@
 
     @Test
     public void testWriteWChar() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Character wcharValue = new Character('w');
@@ -118,8 +116,7 @@
     
     @Test
     public void testWriteShort() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Short shortValue = new Short((short)-123);
@@ -132,8 +129,7 @@
     
     @Test
     public void testWriteUShort() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Integer ushortValue = new Integer(123);
@@ -146,8 +142,7 @@
     
     @Test
     public void testWriteLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Integer longValue = new Integer(-1234567);
@@ -160,8 +155,7 @@
     
     @Test
     public void testWriteULong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         BigInteger ulongValue = new BigInteger("1234567");
@@ -174,8 +168,7 @@
     
     @Test
     public void testWriteLongLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Long longlongValue = new Long("-12345678900");
@@ -188,8 +181,7 @@
     
     @Test
     public void testWriteULongLong() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         BigInteger ulonglongValue = new BigInteger("12345678900");
@@ -202,8 +194,7 @@
     
     @Test
     public void testWriteFloat() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Float floatValue = new Float((float)123456.78);
@@ -216,8 +207,7 @@
     
     @Test
     public void testWriteDouble() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         Double doubleValue = new Double(987654.321);
@@ -230,8 +220,7 @@
     
     @Test
     public void testWriteString() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         String stringValue = new String("String");
@@ -244,8 +233,7 @@
 
     @Test
     public void testWriteWString() {
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         String wstringValue = new String("String");
@@ -279,8 +267,7 @@
             obj.addElement(nestedObj);
         }
 
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         writer.writeArray(obj);
         
@@ -315,8 +302,7 @@
             obj.addElement(nestedObj);
         }
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         CorbaObjectWriter writer =  new CorbaObjectWriter(oStream);
         writer.writeSequence(obj);
         
@@ -384,8 +370,7 @@
         obj.addMember(memberObj2);
         obj.addMember(memberObj3);
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         writer.writeStruct(obj);
         
@@ -409,9 +394,12 @@
         String message = "54321";
         String reposID = "IDL:org.apache.yoko.TestException/1.0";
         
-        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception", CorbaConstants.NP_WSDL_CORBA);
-        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
-        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
+        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
+                                        "exception", CorbaConstants.NP_WSDL_CORBA);
+        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
+                                       "short", CorbaConstants.NP_WSDL_CORBA);
+        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA,
+                                        "string", CorbaConstants.NP_WSDL_CORBA);
         
         Exception exceptType = new Exception();
         exceptType.setName("TestException");
@@ -442,8 +430,7 @@
         obj.addMember(member1);
         obj.addMember(member2);
 
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         writer.writeException(obj);
 
@@ -458,10 +445,11 @@
     }
     
     @Test
-    public void testWriteObject() {
+    public void testWriteObject() throws IOException {
         URL refUrl = getClass().getResource("/references/account.ref");
+        String oRef = IOUtils.toString(refUrl.openStream()).trim();
         org.omg.CORBA.Object objRef = 
-            orb.string_to_object("file://" + refUrl.getPath());
+            orb.string_to_object(oRef);
         assertNotNull(objRef);
         
         // create a test object
@@ -478,20 +466,12 @@
                                                                           objectTC, objectType);
         obj.setReference(objRef);        
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
         writer.writeObjectReference(obj);
 
-        // we need an ORBinstance to handle reading objects so use the Yoko input stream and
-        // ORB_impl
-        org.apache.yoko.orb.CORBA.InputStream iStream = 
-            (org.apache.yoko.orb.CORBA.InputStream)oStream.create_input_stream();
-        org.apache.yoko.orb.OBCORBA.ORB_impl o = (org.apache.yoko.orb.OBCORBA.ORB_impl)orb;
-        iStream._OB_ORBInstance(o._OB_ORBInstance());
+        InputStream iStream = oStream.create_input_stream();
 
-        //InputStream iStream = oStream.create_input_stream();
-        
         org.omg.CORBA.Object resultObj = iStream.read_Object();
         assertTrue(resultObj._is_equivalent(obj.getReference()));
     }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReaderTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReaderTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReaderTest.java Thu Feb  7 10:01:55 2008
@@ -20,14 +20,12 @@
 
 import javax.xml.namespace.QName;
 
-
 import org.apache.yoko.bindings.corba.types.CorbaTypeEventProducer;
 import org.easymock.classextension.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-
 public class CorbaStreamReaderTest extends Assert {
     
     private CorbaStreamReader reader;
@@ -73,6 +71,7 @@
         EasyMock.expect(mock.getText()).andReturn("abcdef");
         EasyMock.replay(mock);
         assertEquals("checking getTextCharacters", 
-                    "abcdef".toCharArray(), reader.getTextCharacters());
+                    "abcdef",
+                    new String(reader.getTextCharacters()));
     }    
 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableTest.java?rev=619530&r1=619529&r2=619530&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableTest.java Thu Feb  7 10:01:55 2008
@@ -38,10 +38,6 @@
 import org.omg.CORBA.portable.OutputStream;
 
 
-
-
-
-
 public class CorbaStreamableTest extends Assert {
 
     private static ORB orb;
@@ -51,7 +47,6 @@
     public void setUp() throws Exception {
         java.util.Properties props = System.getProperties();
         
-        
         props.put("yoko.orb.id", "Yoko-Binding");
         orb = ORB.init(new String[0], props);
     }
@@ -120,8 +115,7 @@
         CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
         CorbaStreamable streamable = new CorbaStreamableImpl(obj, objName); 
         
-        Buffer buf = new Buffer();
-        OutputStream oStream = new OutputStream(buf);
+        OutputStream oStream = orb.create_output_stream();
         oStream.write_char('c');
         
         InputStream iStream = oStream.create_input_stream();
@@ -143,7 +137,7 @@
         obj.setValueFromData("TestWString");
         CorbaStreamable streamable = new CorbaStreamableImpl(obj, objName);
         
-        OutputStream oStream = new OutputStream();
+        OutputStream oStream = orb.create_output_stream();
         streamable._write(oStream);
         
         InputStream iStream = oStream.create_input_stream();



Mime
View raw message