cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r636160 - in /incubator/cxf/trunk: distribution/ distribution/src/main/release/samples/corba/ distribution/src/main/release/samples/corba/hello_world/ distribution/src/main/release/samples/corba/hello_world/src/corba/client/ distribution/sr...
Date Wed, 12 Mar 2008 00:34:11 GMT
Author: dkulp
Date: Tue Mar 11 17:34:08 2008
New Revision: 636160

URL: http://svn.apache.org/viewvc?rev=636160&view=rev
Log:
Copy Yoko hello_world demo and update to use Sun ORB
Workaround a bunch of bugs in the Sun ORB

Added:
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/
      - copied from r636094, incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/
      - copied from r636099, incubator/yoko/trunk/distribution/src/main/samples/ws/resources/
Modified:
    incubator/cxf/trunk/distribution/pom.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/client/Client.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/HelloWorldImpl.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/Server.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/client/Client.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/HelloWorldImpl.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/Server.java
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/HelloWorld.wsdl
    incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/bank.wsdl
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectHandler.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
    incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaBindingHelper.java

Modified: incubator/cxf/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/pom.xml?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Tue Mar 11 17:34:08 2008
@@ -35,6 +35,7 @@
     <properties>
         <maven.test.skip>true</maven.test.skip>
         <cxf.version>${pom.version}</cxf.version>
+        <checkstyle.extension>-corba</checkstyle.extension>
     </properties>
 
     <modules>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/README.txt?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/README.txt Tue Mar 11 17:34:08 2008
@@ -1,203 +1,66 @@
-Hello World Demo
+Hello World CORBA Demo
 ================
 
-Prerequisites
-=============
+This demo illustrates the use of the JAX-WS APIs to run a simple
+"hello world" application using CORBA/IIOP instead of SOAP/XML.  It
+also contains standard CORBA client/server applications using 
+pure CORBA code so you can can see the JAX-WS client hit a pure
+CORBA server and a pure CORBA client hit the JAX-WS server.
 
-If your environment already includes yoko-${current-yoko-version}.jar on the
-CLASSPATH, and the JDK and ant bin directories on the PATH
-it is not necessary to run the environment script described in
-the samples directory README.  If your environment is not
-properly configured, or if you are planning on using wsdl2idl/idl2wsdl,
-javac, and java to build and run the demos, you must include the 
-yoko-${current-yoko-version}.jar in the CLASSPATH. Also set 
-YOKO_HOME to the installation directory.
-
-Demo Use Cases
-==============
-
-This demo allows the user to run three use cases.
-
-- Case 1: Web services client & Web services server.
-
-  In this use case, a Web services client talks to a Web services server
-through the IIOP protocol. Both the client and the server are implemented using
-the CXF Web services framework and the IIOP protocol is enabled by installing
-the Yoko CORBA binding into CXF.
-
-  Note: CXF is _not_ part of the Yoko product, but a CXF kit is bundled
-with Yoko for convenience of testing and running the Web services demos.
-
-- Case 2: Web services client & CORBA server.
-
-  In this use case, a Web services client talks to a CORBA server through the
-IIOP protocol.  The client, which is implemented using CXF, loads the
-Yoko CORBA binding to enable the IIOP protocol. The server is implemented using
-the Yoko ORB.
-
-This use case illustrates how a Web services client can be configured to access
-a CORBA server, by converting the server's OMG IDL interface into a WSDL interface
-with a CORBA binding.
-
-- Case 3: CORBA client & Web services server.
-
-  In this use case, a CORBA client talks to a Web services server through the
-IIOP protocol. The client is implemented using the Yoko ORB. The server, which is
-implemented using CXF, loads the Yoko CORBA binding to enable the IIOP protocol.
-
-This use case illustrates how a Web service can be made accessible to CORBA clients,
-by exposing the service through an OMG IDL interface that can be accessed
-using the IIOP protocol.
-
-
-Building the Demo
-=================
-
-To build the demo code, perform the following steps:
-
-1. Open a command prompt and move into the directory <YOKO_HOME>/samples/ws/hello_world
-
-2. Enter the following command (UNIX or Windows):
-
-     ant generate.corba.wsdl
-
-   This command adds a CORBA binding to the samples/ws/resources/HelloWorld.wsdl file,
-   generating an output file, HelloWorld-corba.wsdl.
-
-3. Open the HelloWorld-corba.wsdl file using your favorite text editor and add the
-   following service definition in the scope of the wsdl:definitions element:
-  
-   <wsdl:service name="HelloWorldCORBAService">
-     <wsdl:port name="HelloWorldCORBAPort" binding="tns:HelloWorldCORBABinding">
-        <corba:address location="corbaloc::localhost:40000/hw" />
-     </wsdl:port>
-   </wsdl:service>
-
-   The address specified here, localhost:40000, assumes that the client and server
-   both run on the same host. If you change this address, you should make sure it is
-   consistent with the address coded in the
-   hello_world/src/yoko/server/Server.java, hello_world/src/corba/server/Server.java and
-   hello_world/src/corba/client/Client.java files.
-
-4. From the samples/ws/hello_world directory, enter the following command (UNIX or Windows):
-
-     ant build
-
-  This command uses the CXF wsdl2java utility to generate the server & client code.
-
-
-Running the Demo - Use Case 1
-=============================
-
-To run the demo for the first use case, perform the following steps:
-
-1. Open a command prompt and move into the directory <YOKO_HOME>/samples/ws/hello_world
 
-2. Enter the following command to start the server (on a single command line):
+Prerequisite
+------------
 
-   UNIX (must use forward slashes):
-
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes yoko.server.Server &
-
-   Windows (may use either forward or back slashes):
-
-     start java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath %CLASSPATH%;build\classes yoko.server.Server
-
-  The server process starts in the background. We have to set the Xbootclasspath,
-  because the ORB classes in Yoko conflict with the JDK ORB classes.
-
-3. Enter the following command to start the client, substituting <Name> with your name:
-
-   UNIX:
-
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes yoko.client.Client <Name>
-
-   Windows:
-
-     java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar
-        -classpath %CLASSPATH%;build\classes yoko.client.Client <Name>
-
-4. After running the client, use the kill command to terminate the server process (UNIX) or
-   type Ctrl-C in the server's command window (Windows).
-
-
-Running the Demo - Use Case 2
-=============================
-
-To run the demo for the second use case, perform the following steps:
-
-1. Open a command prompt and move into the directory <YOKO_HOME>/samples/ws/hello_world
-
-2. Enter the following command to start the CORBA server (on a single command line):
-
-   UNIX (must use forward slashes):
-
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes corba.server.Server &
-
-   Windows (may use either forward or back slashes):
-
-     start java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath %CLASSPATH%;build\classes corba.server.Server
-
-  The server process starts in the background. We have to set the Xbootclasspath,
-  because the ORB classes in Yoko conflict with the JDK ORB classes.
-
-3. Enter the following command to start the Web services client, substituting <Name> with your name:
-
-   UNIX:
-
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes yoko.client.Client <Name>
-
-   Windows:
-
-     java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar
-        -classpath %CLASSPATH%;build\classes yoko.client.Client <Name>
-
-4. After running the client, use the kill command to terminate the server process (UNIX) or
-   type Ctrl-C in the server's command window (Windows).
+If your environment already includes cxf-manifest-incubator.jar on the
+CLASSPATH, and the JDK and ant bin directories on the PATH
+it is not necessary to set the environment as described in
+the samples directory README.  If your environment is not
+properly configured, or if you are planning on using wsdl2java,
+javac, and java to build and run the demos, you must set the
+environment.
 
 
-Running the Demo - Use Case 3
-=============================
 
-To run the demo for the third use case, perform the following steps:
+Building and running the demo using Ant
+---------------------------------------
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo. 
+The server and client targets automatically build the demo.
 
-1. Open a command prompt and move into the directory <YOKO_HOME>/samples/ws/hello_world
+First, if using the Sun ORB built into the JDK, you need to start the orbd
+nameing service.   From a command prompt, run:
 
-2. Enter the following command to start the Web services server (on a single command line):
+  orbd -ORBInitialPort 1050 -serverPollingTime 200
 
-   UNIX (must use forward slashes):
+Other ORB's may have different requirements.
 
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes yoko.server.Server &
 
-   Windows (may use either forward or back slashes):
+Use Case 1 - Pure CORBA Server, CXF/JAX-WS Client
+-------------------------------------------------
+Start the pure CORBA server by running
+  ant corba.server
 
-     start java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath %CLASSPATH%;build\classes yoko.server.Server
+Run the JAX-WS client by running:
+  ant cxf.client
 
-  The server process starts in the background. We have to set the Xbootclasspath,
-  because the ORB classes in Yoko conflict with the JDK ORB classes.
 
-3. Enter the following command to start the CORBA client, substituting <Name> with your name:
+Use Case 2 - CXF/JAX-WS Server, Pure CORBA Client
+-------------------------------------------------
+Start the CXF/JAX-WS server by running
+  ant cxf.server
 
-   UNIX:
+Run the pure CORBA client by running:
+  ant corba.client
 
-     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-spec-corba-1.0-incubating-SNAPSHOT.jar:$YOKO_HOME/lib/yoko-core-1.0-incubating-SNAPSHOT.jar 
-        -classpath $CLASSPATH:build/classes corba.client.Client <Name>
 
-   Windows:
+Use Case 3 - CXF/JAX-WS Server, CXF/JAX-WS Client
+-------------------------------------------------
+Start the CXF/JAX-WS server by running
+  ant cxf.server
 
-     java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-spec-corba-1.0-incubating-SNAPSHOT.jar;%YOKO_HOME%\lib\yoko-core-1.0-incubating-SNAPSHOT.jar
-        -classpath %CLASSPATH%;build\classes corba.client.Client <Name>
+Run the CXF/JAX-WS client by running:
+  ant cxf.client
 
-4. After running the client, use the kill command to terminate the server process (UNIX) or
-   type Ctrl-C in the server's command window (Windows).
 
 
 Cleanup

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/build.xml?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/build.xml Tue Mar 11 17:34:08 2008
@@ -19,105 +19,62 @@
 -->
 <project name="hello world demo" default="build" basedir=".">
 
-    <property environment="env"/>
-    <property name="build.dir" location ="${basedir}/build"/>
-    <property name="build.src.dir" location ="${basedir}/build/src"/>
-    <property name="build.classes.dir" location ="${build.dir}/classes"/>
-
-    <!-- Determine yoko.home, either from the environment variable YOKO_HOME
-       - or using ../..
-       -->
-    <condition property="yoko.home" value="${env.YOKO_HOME}">
-        <isset property="env.YOKO_HOME"/>
-    </condition>
-    <property name="yoko.home" location="../../.."/>
-
-    <path id="yoko.classpath">
-        <pathelement location="${build.classes.dir}"/>
-        <pathelement location="${yoko.home}/lib/yoko-1.0-incubating-SNAPSHOT.jar"/>
-    </path>
-
-    <target name="build" depends="generate.server.code, generate.client.code, generate.idl.server.code, generate.idl.client.code">
-        <javac destdir="${build.classes.dir}" debug="true">
-            <src path="${basedir}/src"/>
-            <src path="${build.src.dir}"/>
-            <classpath>
-                <path refid="yoko.classpath"/>
-                <pathelement path="${thirdparty.classpath}"/>
-            </classpath>
-        </javac>
-        <javac destdir="${build.classes.dir}" debug="true">
-            <src path="${basedir}/src"/>
-            <src path="${build.src.dir}"/>
-            <classpath>
-                <path path="${yoko.home}/core/target/yoko-core-1.0-incubating-SNAPSHOT.jar"/>
-            </classpath>
-        </javac>
-    </target>
+    <property name="wsdl.dir" location="${basedir}/../resources"/>
+    <import file="../../common_build.xml"/>     
+
 
-    <target name="generate.corba.wsdl">
+    <target name="generate.code">
         <echo level="info" message="Generating corba binding using wsdltoidl..."/>
-        <wsdl2corba file="../resources/HelloWorld.wsdl" />
-    </target>
+        <wsdl2corba extraArgs="-a corbaname::localhost:1050#HelloWorld" file="../resources/HelloWorld.wsdl" />
 
-    <target name="generate.server.code">
         <echo level="info" message="Generating server code using wsdl2java..."/>
-        <wsdl2java file="HelloWorld-corba.wsdl" package="yoko.server" />
-    </target>
-
-    <target name="generate.client.code">
-        <echo level="info" message="Generating client code using wsdl2java..."/>
-        <wsdl2java file="HelloWorld-corba.wsdl" package="yoko.client" />
-    </target>
+        <wsdl2java dir="build" file="HelloWorld-corba.wsdl" package="yoko.common" />
 
-    <target name="generate.idl.client.code">
         <echo level="info" message="Generating client code using idlj..."/>
         <exec executable="idlj" dir=".">
             <arg line="-fall -td ${build.src.dir} -pkgPrefix HelloWorld corba.client ../resources/HelloWorld.idl"/>
         </exec>
-    </target>
 
-    <target name="generate.idl.server.code">
         <echo level="info" message="Generating server code using idlj..."/>
         <exec executable="idlj" dir=".">
             <arg line="-fall -td ${build.src.dir} -pkgPrefix HelloWorld corba.server ../resources/HelloWorld.idl"/>
         </exec>
     </target>
 
-    <target name="clean">
-        <delete dir="${build.classes.dir}"/>
-        <delete dir="${build.src.dir}"/>
+    <target name="cxf.client">
+        <cxfrun classname="yoko.client.Client"/>
+    </target>
+    <target name="corba.client">
+        <java classname="corba.client.Client" fork="yes">
+            <classpath>
+                <pathelement path="build/classes"/>
+                <path refid="jdk.tools.classpath"/>
+            </classpath>
+        </java>
+    </target>
+
+    <target name="cxf.server">
+        <cxfrun classname="yoko.server.Server"/>
+    </target>
+
+    <target name="corba.server">
+        <java classname="corba.server.Server" fork="yes">
+            <classpath>
+                <pathelement path="build/classes"/>
+                <path refid="jdk.tools.classpath"/>
+            </classpath>
+        </java>
     </target>
 
-    <!-- move this to a common place, once we have more demos that use this -->
     <macrodef name="wsdl2corba">
         <attribute name="file"/>
         <attribute name="extraArgs" default=""/>
         <sequential>
-            <java failonerror="true" classname="org.apache.yoko.tools.WSDLToIDL" fork="yes">
-                <classpath>
-                    <path refid="yoko.classpath" />
-                </classpath>
-                <arg line="@{extraArgs} -d ${basedir} -corba @{file}"/>
-            </java>
-        </sequential>
-    </macrodef>
-
-    <macrodef name="wsdl2java">
-        <attribute name="srcdestdir" default="${build.src.dir}"/>
-        <attribute name="destdir" default="${build.classes.dir}"/>
-        <attribute name="file"/>
-        <attribute name="bindingfile" default=""/>
-        <attribute name="package" default="NOT_SPECIFIED"/>
-        <attribute name="extraArgs" default=""/>
-        <sequential>
-            <mkdir dir="@{srcdestdir}"/>
-            <mkdir dir="@{destdir}"/>
-            <java failonerror="true" classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="yes">
+            <java failonerror="true" classname="org.apache.cxf.tools.corba.WSDLToIDL" fork="yes">
                 <classpath>
-                    <path refid="yoko.classpath" />
+                    <path refid="cxf.classpath" />
                 </classpath>
-                <arg line="-p @{package} @{extraArgs} -d @{srcdestdir} @{file}"/>
+                <arg line="@{extraArgs} -d ${build.dir} -corba @{file}"/>
             </java>
         </sequential>
     </macrodef>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/client/Client.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/client/Client.java Tue Mar 11 17:34:08 2008
@@ -15,27 +15,35 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package corba.client;
 
 import java.util.Properties;
 
-import org.omg.CORBA.Object;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.UserException;
 
-public class Client {
+public final class Client {
+    private Client() {
+        //not consructed
+    }
+    
     static int run(ORB orb, String[] args) throws UserException {
 
         // Get "hello" object
-	Object obj = orb.string_to_object("corbaloc::localhost:40000/hw");
-	if(obj == null) {
-	    System.err.println("Client: Could not resolve target object");
-	    return 1;
-	}
+        // Resolve the HelloWorldImpl by using INS's corbaname url.
+        // The URL locates the NameService running on localhost
+        // and listening on 1050 and resolve 'HelloWorld'
+        // from that NameService
+        org.omg.CORBA.Object obj = orb.string_to_object("corbaname::localhost:1050#HelloWorld");
+
+        if (obj == null) {
+            System.err.println("Client: Could not resolve target object");
+            return 1;
+        }
 
-	HelloWorld hello = HelloWorldHelper.narrow(obj);
+        HelloWorld hello = HelloWorldHelper.narrow(obj);
 
         // Test our narrowed "hello" object
         System.out.println("Invoking greetMe...");
@@ -43,42 +51,35 @@
         if (args.length > 0) {
             result = hello.greetMe(args[args.length - 1]);
         } else {
-            result = hello.greetMe(new String());
+            result = hello.greetMe("World");
         }
         System.out.println("greetMe.result = " + result);
 
-	return 0;
+        return 0;
     }
 
     // Standalone program initialization
     public static void main(String args[]) {
-	int status = 0;
-	ORB orb = null;
+        int status = 0;
+        ORB orb = null;
 
-    java.util.Properties props = new Properties();
-    props.putAll(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", "HelloWorld-Client");
-
-	try {
-            orb = ORB.init(args, props);
-	    status = run(orb, args);
-	} catch(Exception ex) {
-	    ex.printStackTrace();
-	    status = 1;
-	}
-
-	if(orb != null) {
-	    try {
-		orb.destroy();
-	    } catch(Exception ex) {
-		ex.printStackTrace();
-		status = 1;
-	    }
-	}
+        try {
+            orb = ORB.init(args, new Properties());
+            status = run(orb, args);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            status = 1;
+        }
+
+        if (orb != null) {
+            try {
+                orb.destroy();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                status = 1;
+            }
+        }
 
-	System.exit(status);
+        System.exit(status);
     }
 }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/HelloWorldImpl.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/HelloWorldImpl.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/HelloWorldImpl.java Tue Mar 11 17:34:08 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package corba.server;
 
@@ -23,17 +23,18 @@
 
 public class HelloWorldImpl extends HelloWorldPOA {
     // The servants default POA
-    private POA poa_;
+    private POA poa;
 
-    HelloWorldImpl(POA poa) {
-	poa_ = poa;
+    HelloWorldImpl(POA p) {
+        poa = p;
     }
 
     public String greetMe(String inparameter) {
-        return new String("Hi " + inparameter);
+        System.out.println("In greetMe(" + inparameter + ")");
+        return "Hi " + inparameter;
     }
 
     public POA _default_POA() {
-	return poa_;
+        return poa;
     }
 }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/Server.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/Server.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/corba/server/Server.java Tue Mar 11 17:34:08 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package corba.server;
 
@@ -23,38 +23,38 @@
 
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.UserException;
-import org.omg.CORBA.ORBPackage.InvalidName;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContextExt;
+import org.omg.CosNaming.NamingContextExtHelper;
 import org.omg.PortableServer.POA;
 import org.omg.PortableServer.POAHelper;
 import org.omg.PortableServer.POAManager;
 
-import org.apache.yoko.orb.OB.BootManager;
-import org.apache.yoko.orb.OB.BootManagerHelper;
-import org.apache.yoko.orb.OB.BootManagerPackage.AlreadyExists;
+public final class Server {
+
+    private Server() {
+    }
 
-public class Server {
     static int run(ORB orb, String[] args) throws UserException {
         // Resolve Root POA
-        POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
+        POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
 
         // Get a reference to the POA manager
-        POAManager manager = rootPOA.the_POAManager();
+        POAManager manager = poa.the_POAManager();
 
         // Create implementation object
-        HelloWorldImpl hwImpl = new HelloWorldImpl(rootPOA);
-        HelloWorld hello = hwImpl._this(orb);
+        HelloWorldImpl hwImpl = new HelloWorldImpl(poa);
 
-        // Add reference to the boot manager
-        try {
-            byte[] oid = ("hw").getBytes();
-            BootManager bootManager = BootManagerHelper.narrow(
-                orb.resolve_initial_references("BootManager"));
-            bootManager.add_binding(oid, hello);
-        } catch (InvalidName ex) {
-            throw new RuntimeException();
-        } catch (AlreadyExists ex) {
-            throw new RuntimeException();
-        }
+        byte[] oid = "HelloWorld".getBytes();
+        poa.activate_object_with_id(oid, hwImpl);
+
+        org.omg.CORBA.Object ref = poa.create_reference_with_id(oid, HelloWorldHelper.id());
+
+        // Register in NameService
+        org.omg.CORBA.Object nsObj = orb.resolve_initial_references("NameService");
+        NamingContextExt rootContext = NamingContextExtHelper.narrow(nsObj);
+        NameComponent[] nc = rootContext.to_name("HelloWorld");
+        rootContext.rebind(nc, ref);
 
         // Run implementation
         manager.activate();
@@ -67,28 +67,25 @@
     public static void main(String args[]) {
         java.util.Properties props = new Properties();
         props.putAll(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", "HelloWorld-Server");
-        // for this demo, start on localhost, port 40000
-        props.put("yoko.orb.oa.endpoint", "iiop --host localhost --port 40000");
 
-        int status = 0;
+        props.put("org.omg.CORBA.ORBInitialHost", "localhost");
+        props.put("org.omg.CORBA.ORBInitialPort", "1050");
+
         ORB orb = null;
 
+        int status = 0;
         try {
             orb = ORB.init(args, props);
             status = run(orb, args);
-        } catch(Exception ex) {
+        } catch (Exception ex) {
             ex.printStackTrace();
             status = 1;
         }
 
-        if(orb != null) {
+        if (orb != null) {
             try {
                 orb.destroy();
-            } catch(Exception ex) {
+            } catch (Exception ex) {
                 ex.printStackTrace();
                 status = 1;
             }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/client/Client.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/client/Client.java Tue Mar 11 17:34:08 2008
@@ -15,34 +15,28 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package yoko.client;
 
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
 
-public final class Client {
+import yoko.common.HelloWorld;
+import yoko.common.HelloWorldCORBAService;
 
-    private static final QName SERVICE_NAME = new QName("http://schemas.apache.org/yoko/idl/HelloWorld", "HelloWorldCORBAService");
+public final class Client {
 
     private Client() {
     }
 
     public static void main(String args[]) throws Exception {
-        URL wsdlUrl = new URL("file:./HelloWorld-corba.wsdl");
-    
-        HelloWorldCORBAService ss = new HelloWorldCORBAService(wsdlUrl, SERVICE_NAME);
-        HelloWorld port = ss.getHelloWorldCORBAPort();  
-        
+
+        HelloWorldCORBAService ss = new HelloWorldCORBAService();
+        HelloWorld port = ss.getHelloWorldCORBAPort();
 
         System.out.println("Invoking greetMe... ");
-        java.lang.String _greetMe_outparameter = port.greetMe("Hello There");
-        System.out.println("greetMe.result=" + _greetMe_outparameter);
-                
-        
+        java.lang.String greetMeoutparameter = port.greetMe("Hello There");
+        System.out.println("greetMe.result=" + greetMeoutparameter);
+
         System.exit(0);
     }
 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/HelloWorldImpl.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/HelloWorldImpl.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/HelloWorldImpl.java Tue Mar 11 17:34:08 2008
@@ -15,33 +15,22 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
-
+ */
 package yoko.server;
 
-import java.util.logging.Logger;
-import javax.jws.WebMethod;
-import javax.jws.WebResult;
+import yoko.common.HelloWorld;
+
 
 @javax.jws.WebService(portName = "HelloWorldCORBAPort", serviceName = "HelloWorldCORBAService", 
                       targetNamespace = "http://schemas.apache.org/yoko/idl/HelloWorld",
-                      wsdlLocation = "file:./HelloWorld-corba.wsdl",
-                      endpointInterface = "yoko.server.HelloWorld")
+                      wsdlLocation = "file:./build/HelloWorld-corba.wsdl",
+                      endpointInterface = "yoko.common.HelloWorld")
                       
 public class HelloWorldImpl implements HelloWorld {
 
-    private static final Logger LOG = 
-        Logger.getLogger(HelloWorldImpl.class.getPackage().getName());
-
-    /* (non-Javadoc)
-     * @see yoko.server.HelloWorld#greetMe(java.lang.String  inparameter )*
-     */
-    public java.lang.String greetMe(
-        java.lang.String inparameter
-    )
-    { 
-       LOG.info("Executing operation greetMe");
-       return new java.lang.String("Hi " + inparameter);
+    public java.lang.String greetMe(java.lang.String inparameter) {
+        System.out.println("In greetMe(" + inparameter + ")");
+        return "Hi " + inparameter;
     }
 
 }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/Server.java?rev=636160&r1=636094&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/Server.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/hello_world/src/yoko/server/Server.java Tue Mar 11 17:34:08 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package yoko.server;
 
@@ -27,7 +27,7 @@
         System.out.println("Starting Server");
 
         Object implementor = new HelloWorldImpl();
-        String address = "corbaloc::localhost:40000/hw";
+        String address = "corbaname::localhost:1050#HelloWorld";
         Endpoint.publish(address, implementor);
     }
 

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/HelloWorld.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/HelloWorld.wsdl?rev=636160&r1=636099&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/HelloWorld.wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/HelloWorld.wsdl Tue Mar 11 17:34:08 2008
@@ -17,33 +17,33 @@
  * specific language governing permissions and limitations
  * under the License.
 -->
-<wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/HelloWorld" 
-  xmlns:tns="http://schemas.apache.org/yoko/idl/HelloWorld" 
-  xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" 
-  xmlns:ns1="http://schemas.apache.org/yoko/idl/HelloWorld/corba/typemap/" 
-  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
-  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+<wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/HelloWorld"
+  xmlns:tns="http://schemas.apache.org/yoko/idl/HelloWorld"
+  xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
+  xmlns:ns1="http://schemas.apache.org/yoko/idl/HelloWorld/corba/typemap/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
-  <wsdl:types>
-    <xs:schema attributeFormDefault="unqualified" 
-       elementFormDefault="unqualified" 
-       targetNamespace="http://schemas.apache.org/yoko/idl/HelloWorld" 
-       xmlns="http://schemas.apache.org/yoko/idl/HelloWorld" 
-       xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:element name="greetMeResponse" type="xs:string"/>
-      <xs:element name="greetMe" type="xs:string"/>
-    </xs:schema>
-  </wsdl:types>
-  <wsdl:message name="greetMeResponse">
-    <wsdl:part name="outparameter" element="tns:greetMeResponse"/>
-  </wsdl:message>
-  <wsdl:message name="greetMe">
-    <wsdl:part name="inparameter" element="tns:greetMe"/>
-  </wsdl:message>
-  <wsdl:portType name="HelloWorld">
-    <wsdl:operation name="greetMe">
-      <wsdl:input name="greetMeRequest" message="tns:greetMe"/>
-      <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/>
-    </wsdl:operation>
-  </wsdl:portType>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="unqualified"
+           elementFormDefault="unqualified"
+           targetNamespace="http://schemas.apache.org/yoko/idl/HelloWorld"
+           xmlns="http://schemas.apache.org/yoko/idl/HelloWorld"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <xs:element name="greetMeResponse" type="xs:string"/>
+            <xs:element name="greetMe" type="xs:string"/>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part name="outparameter" element="tns:greetMeResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMe">
+        <wsdl:part name="inparameter" element="tns:greetMe"/>
+    </wsdl:message>
+    <wsdl:portType name="HelloWorld">
+        <wsdl:operation name="greetMe">
+            <wsdl:input name="greetMeRequest" message="tns:greetMe"/>
+            <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
 </wsdl:definitions>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/bank.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/bank.wsdl?rev=636160&r1=636099&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/bank.wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/corba/resources/bank.wsdl Tue Mar 11 17:34:08 2008
@@ -17,176 +17,182 @@
  * specific language governing permissions and limitations
  * under the License.
 -->
-<wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/bank" xmlns:tns="http://schemas.apache.org/yoko/idl/bank" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
-  <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/bank/typemap">
-    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" repositoryID="IDL:Account:1.0" name="Account" type="ns4:Account">
-      <corba:member name="name" idltype="corba:string" />
-      <corba:member name="balance" idltype="corba:long" />
-    </corba:struct>
-      <corba:exception xmlns:ns4="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" repositoryID="IDL:AccountNotFoundException:1.0" name="AccountNotFoundException" type="ns4:AccountNotFoundExceptionType">
-        <corba:member name="name" idltype="corba:string" />
-      </corba:exception>
+<wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/bank" 
+    xmlns:tns="http://schemas.apache.org/yoko/idl/bank" 
+    xmlns:corba="http://cxf.apache.org/bindings/corba" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+    <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/bank/typemap">
+        <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" repositoryID="IDL:Account:1.0" name="Account" type="ns4:Account">
+            <corba:member name="name" idltype="corba:string" />
+            <corba:member name="balance" idltype="corba:long" />
+        </corba:struct>
+        <corba:exception xmlns:ns4="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" repositoryID="IDL:AccountNotFoundException:1.0" name="AccountNotFoundException" type="ns4:AccountNotFoundExceptionType">
+            <corba:member name="name" idltype="corba:string" />
+        </corba:exception>
         <corba:exception xmlns:ns4="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" repositoryID="IDL:AccountAlreadyExistsException:1.0" name="AccountAlreadyExistsException" type="ns4:AccountAlreadyExistsExceptionType">
-          <corba:member name="name" idltype="corba:string" />
+            <corba:member name="name" idltype="corba:string" />
         </corba:exception>
-        </corba:typeMapping>
-  <wsdl:types>
-    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:complexType name="Account">
-        <xs:sequence>
-          <xs:element name="name" type="xs:string">
-          </xs:element>
-          <xs:element name="balance" type="xs:int">
-          </xs:element>
-        </xs:sequence>
-      </xs:complexType>
-      <xs:element name="AccountNotFoundException" type="AccountNotFoundExceptionType">
-      </xs:element>
-      <xs:complexType name="AccountNotFoundExceptionType">
-        <xs:sequence>
-          <xs:element name="name" type="xs:string">
-          </xs:element>
-        </xs:sequence>
-      </xs:complexType>
-      <xs:element name="AccountAlreadyExistsException" type="AccountAlreadyExistsExceptionType">
-      </xs:element>
-      <xs:complexType name="AccountAlreadyExistsExceptionType">
-        <xs:sequence>
-          <xs:element name="name" type="xs:string">
-          </xs:element>
-        </xs:sequence>
-      </xs:complexType>
-      <xs:element name="getAccountResponse">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="return" type="Account">
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="getAccount">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="name" type="xs:string">
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="createAccountResponse">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="return" type="xs:boolean">
-            </xs:element>
-            <xs:element name="account" type="Account">
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="createAccount">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="name" type="xs:string">
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-    </xs:schema>
-  </wsdl:types>
-  <wsdl:message name="createAccount">
-    <wsdl:part name="inparameter" element="tns:createAccount"/>
-  </wsdl:message>
-  <wsdl:message name="createAccountResponse">
-    <wsdl:part name="outparameter" element="tns:createAccountResponse"/>
-  </wsdl:message>
-  <wsdl:message name="getAccount">
-    <wsdl:part name="inparameter" element="tns:getAccount"/>
-  </wsdl:message>
-  <wsdl:message name="AccountAlreadyExistsException">
-    <wsdl:part name="exception" element="tns:AccountAlreadyExistsException"/>
-  </wsdl:message>
-  <wsdl:message name="AccountNotFoundException">
-    <wsdl:part name="exception" element="tns:AccountNotFoundException"/>
-  </wsdl:message>
-  <wsdl:message name="getAccountResponse">
-    <wsdl:part name="outparameter" element="tns:getAccountResponse"/>
-  </wsdl:message>
-  <wsdl:portType name="Bank">
-    <wsdl:operation name="getAccount">
-      <wsdl:input name="getAccountRequest" message="tns:getAccount"/>
-      <wsdl:output name="getAccountResponse" message="tns:getAccountResponse"/>
-      <wsdl:fault name="AccountNotFoundException" message="tns:AccountNotFoundException"/>
-    </wsdl:operation>
-    <wsdl:operation name="createAccount">
-      <wsdl:input name="createAccountRequest" message="tns:createAccount"/>
-      <wsdl:output name="createAccountResponse" message="tns:createAccountResponse"/>
-      <wsdl:fault name="AccountAlreadyExistsException" message="tns:AccountAlreadyExistsException"/>
-    </wsdl:operation>
-  </wsdl:portType>
-  <wsdl:binding name="BankSOAPBinding" type="tns:Bank">
-    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
-    <wsdl:operation name="getAccount">
-      <soap:operation soapAction="" style="document" />
-      <wsdl:input name="getAccountRequest">
-          <soap:body use="literal"/>
-      </wsdl:input>
-      <wsdl:output name="getAccountResponse">
-          <soap:body use="literal"/>
-      </wsdl:output>
-      <wsdl:fault name="AccountNotFoundException">
-          <soap:fault name="AccountNotFoundException" use="literal"/>
-      </wsdl:fault>
-    </wsdl:operation>
-    <wsdl:operation name="createAccount">
-      <soap:operation name="createAccount" />
-      <wsdl:input name="createAccountRequest">
-          <soap:body use="literal"/>
-      </wsdl:input>
-      <wsdl:output name="createAccountResponse">
-          <soap:body use="literal"/>
-      </wsdl:output>
-      <wsdl:fault name="AccountAlreadyExistsException">
-          <soap:fault name="AccountAlreadyExistsException" use="literal"/>
-      </wsdl:fault>
-    </wsdl:operation>
-  </wsdl:binding>
-  <wsdl:binding name="BankCORBABinding" type="tns:Bank">
-    <corba:binding repositoryID="IDL:yoko/Bank:1.0" />
-    <wsdl:operation name="getAccount">
-      <corba:operation name="getAccount">
-        <corba:param mode="in" name="name" idltype="corba:string" />
-        <corba:return xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" name="return" idltype="Account" />
-        <corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountNotFoundException" />
-      </corba:operation>
-      <wsdl:input name="getAccountRequest">
-      </wsdl:input>
-      <wsdl:output name="getAccountResponse">
-      </wsdl:output>
-      <wsdl:fault name="AccountNotFoundException">
-      </wsdl:fault>
-    </wsdl:operation>
-    <wsdl:operation name="createAccount">
-      <corba:operation name="createAccount">
-        <corba:param mode="in" name="name" idltype="corba:string" />
-        <corba:param xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" mode="out" name="account" idltype="Account" />
-        <corba:return name="return" idltype="corba:boolean" />
-        <corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountAlreadyExistsException" />
-      </corba:operation>
-      <wsdl:input name="createAccountRequest">
-      </wsdl:input>
-      <wsdl:output name="createAccountResponse">
-      </wsdl:output>
-      <wsdl:fault name="AccountAlreadyExistsException">
-      </wsdl:fault>
-    </wsdl:operation>
-  </wsdl:binding>
-  <wsdl:service name="BankSOAPService">
-    <wsdl:port name="BankSOAPPort" binding="tns:BankSOAPBinding">
-      <soap:address location="http://localhost:10000/bank/BankSOAPService" />
-    </wsdl:port>
-  </wsdl:service>
-  <wsdl:service name="BankCORBAService">
-    <wsdl:port name="BankCORBAPort" binding="tns:BankCORBABinding">
-      <corba:address location="file:./bank.ref" />
-    </wsdl:port>
-  </wsdl:service>
+    </corba:typeMapping>
+    <wsdl:types>
+        <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/bank" xmlns="http://schemas.apache.org/yoko/idl/bank" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+            <xs:complexType name="Account">
+                <xs:sequence>
+                    <xs:element name="name" type="xs:string">
+                    </xs:element>
+                    <xs:element name="balance" type="xs:int">
+                    </xs:element>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="AccountNotFoundException" type="AccountNotFoundExceptionType">
+            </xs:element>
+            <xs:complexType name="AccountNotFoundExceptionType">
+                <xs:sequence>
+                    <xs:element name="name" type="xs:string">
+                    </xs:element>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="AccountAlreadyExistsException" type="AccountAlreadyExistsExceptionType">
+            </xs:element>
+            <xs:complexType name="AccountAlreadyExistsExceptionType">
+                <xs:sequence>
+                    <xs:element name="name" type="xs:string">
+                    </xs:element>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="getAccountResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="return" type="Account">
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getAccount">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="name" type="xs:string">
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="createAccountResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="return" type="xs:boolean">
+                        </xs:element>
+                        <xs:element name="account" type="Account">
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="createAccount">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="name" type="xs:string">
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="createAccount">
+        <wsdl:part name="inparameter" element="tns:createAccount"/>
+    </wsdl:message>
+    <wsdl:message name="createAccountResponse">
+        <wsdl:part name="outparameter" element="tns:createAccountResponse"/>
+    </wsdl:message>
+    <wsdl:message name="getAccount">
+        <wsdl:part name="inparameter" element="tns:getAccount"/>
+    </wsdl:message>
+    <wsdl:message name="AccountAlreadyExistsException">
+        <wsdl:part name="exception" element="tns:AccountAlreadyExistsException"/>
+    </wsdl:message>
+    <wsdl:message name="AccountNotFoundException">
+        <wsdl:part name="exception" element="tns:AccountNotFoundException"/>
+    </wsdl:message>
+    <wsdl:message name="getAccountResponse">
+        <wsdl:part name="outparameter" element="tns:getAccountResponse"/>
+    </wsdl:message>
+    <wsdl:portType name="Bank">
+        <wsdl:operation name="getAccount">
+            <wsdl:input name="getAccountRequest" message="tns:getAccount"/>
+            <wsdl:output name="getAccountResponse" message="tns:getAccountResponse"/>
+            <wsdl:fault name="AccountNotFoundException" message="tns:AccountNotFoundException"/>
+        </wsdl:operation>
+        <wsdl:operation name="createAccount">
+            <wsdl:input name="createAccountRequest" message="tns:createAccount"/>
+            <wsdl:output name="createAccountResponse" message="tns:createAccountResponse"/>
+            <wsdl:fault name="AccountAlreadyExistsException" message="tns:AccountAlreadyExistsException"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="BankSOAPBinding" type="tns:Bank">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="getAccount">
+            <soap:operation soapAction="" style="document" />
+            <wsdl:input name="getAccountRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="getAccountResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="AccountNotFoundException">
+                <soap:fault name="AccountNotFoundException" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="createAccount">
+            <soap:operation name="createAccount" />
+            <wsdl:input name="createAccountRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="createAccountResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="AccountAlreadyExistsException">
+                <soap:fault name="AccountAlreadyExistsException" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="BankCORBABinding" type="tns:Bank">
+        <corba:binding repositoryID="IDL:yoko/Bank:1.0" />
+        <wsdl:operation name="getAccount">
+            <corba:operation name="getAccount">
+                <corba:param mode="in" name="name" idltype="corba:string" />
+                <corba:return xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" name="return" idltype="Account" />
+                <corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountNotFoundException" />
+            </corba:operation>
+            <wsdl:input name="getAccountRequest">
+            </wsdl:input>
+            <wsdl:output name="getAccountResponse">
+            </wsdl:output>
+            <wsdl:fault name="AccountNotFoundException">
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="createAccount">
+            <corba:operation name="createAccount">
+                <corba:param mode="in" name="name" idltype="corba:string" />
+                <corba:param xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" mode="out" name="account" idltype="Account" />
+                <corba:return name="return" idltype="corba:boolean" />
+                <corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountAlreadyExistsException" />
+            </corba:operation>
+            <wsdl:input name="createAccountRequest">
+            </wsdl:input>
+            <wsdl:output name="createAccountResponse">
+            </wsdl:output>
+            <wsdl:fault name="AccountAlreadyExistsException">
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="BankSOAPService">
+        <wsdl:port name="BankSOAPPort" binding="tns:BankSOAPBinding">
+            <soap:address location="http://localhost:10000/bank/BankSOAPService" />
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="BankCORBAService">
+        <wsdl:port name="BankCORBAPort" binding="tns:BankCORBABinding">
+            <corba:address location="file:./bank.ref" />
+        </wsdl:port>
+    </wsdl:service>
 </wsdl:definitions>

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java Tue Mar 11 17:34:08 2008
@@ -31,7 +31,6 @@
 
 import org.apache.cxf.binding.corba.types.CorbaHandlerUtils;
 import org.apache.cxf.binding.corba.types.CorbaObjectHandler;
-import org.apache.cxf.binding.corba.types.CorbaPrimitiveHandler;
 import org.apache.cxf.binding.corba.utils.ContextUtils;
 import org.apache.cxf.binding.corba.utils.CorbaBindingHelper;
 import org.apache.cxf.binding.corba.utils.CorbaUtils;
@@ -63,7 +62,6 @@
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.Request;
 import org.omg.CORBA.SystemException;
-import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.UnknownUserException;
 
@@ -222,7 +220,7 @@
 
             for (CorbaStreamable argument : arguments) {
                 Any value = orb.create_any();
-                setIntoAny(value, argument);
+                argument.getObject().setIntoAny(value, argument, true);
                 list.add_value(argument.getName(), value, argument.getMode());
             }
         } else {
@@ -232,23 +230,12 @@
         return list;        
     }
     
-    private void setIntoAny(Any value, CorbaStreamable argument) {
-        switch (argument._type().kind().value()) {
-        case TCKind._tk_string:
-            value.insert_string((String)((CorbaPrimitiveHandler)argument.getObject()).getValue());
-            break;
-            //FIXME - other primatives that the Sun ORB apparently cannot handle
-        default:
-            value.insert_Streamable(argument);
-        }
-    }
-
     protected NamedValue getReturn(CorbaMessage message) {
         CorbaStreamable retVal = message.getStreamableReturn();
         NamedValue ret = null;
         if (retVal != null) {
             Any returnAny = orb.create_any();
-            returnAny.insert_Streamable(retVal);
+            retVal.getObject().setIntoAny(returnAny, retVal, false);
             ret = orb.create_named_value(retVal.getName(), returnAny, org.omg.CORBA.ARG_OUT.value);
         } else {
             // TODO: REVISIT: for some reason,some ORBs do not like to

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java Tue Mar 11 17:34:08 2008
@@ -43,7 +43,11 @@
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.omg.CORBA.ORB;
+import org.omg.CORBA.Object;
 import org.omg.CORBA.Policy;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContextExt;
+import org.omg.CosNaming.NamingContextExtHelper;
 import org.omg.PortableServer.POA;
 import org.omg.PortableServer.POAHelper;
 import org.omg.PortableServer.POAManager;
@@ -240,6 +244,8 @@
             } else if (location.startsWith("corbaloc")) {
                 // Try add the key to the boot manager.  This is required for a corbaloc
                 addKeyToBootManager(location, obj);
+            } else if (location.startsWith("corbaname")) {
+                addKeyToNameservice(location, obj);
             } else {
                 String ior = orb.object_to_string(obj);
                 address.setLocation(ior);
@@ -255,6 +261,17 @@
         }
     }
 
+    private void addKeyToNameservice(String location, Object ref) throws Exception {
+        int idx = location.indexOf("#");
+        String name = location.substring(idx + 1);
+        
+        //Register in NameService
+        org.omg.CORBA.Object nsObj = orb.resolve_initial_references("NameService");
+        NamingContextExt rootContext = NamingContextExtHelper.narrow(nsObj);
+        NameComponent[] nc = rootContext.to_name(name);
+        rootContext.rebind(nc, ref);
+    }
+
     private void populateEpr(String ior) {
         AttributedURIType addr = new AttributedURIType();
         addr.setValue(ior);
@@ -305,7 +322,8 @@
             Class<?> bootMgrClass = Class.forName("org.apache.yoko.orb.OB.BootManager");
             Method narrowMethod =
                 bootMgrHelperClass.getMethod("narrow", org.omg.CORBA.Object.class);
-            Object bootMgr = narrowMethod.invoke(null, orb.resolve_initial_references("BootManager"));
+            java.lang.Object bootMgr = narrowMethod.invoke(null,
+                                                           orb.resolve_initial_references("BootManager"));
             Method addBindingMethod = 
                 bootMgrClass.getMethod("add_binding", byte[].class, org.omg.CORBA.Object.class);
             addBindingMethod.invoke(bootMgr, key.getBytes(), value);

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java Tue Mar 11 17:34:08 2008
@@ -124,7 +124,8 @@
                     if (arguments != null) {
                         for (int i = 0; i < arguments.length; ++i) {
                             if (list.item(i).flags() != org.omg.CORBA.ARG_IN.value) {
-                                list.item(i).value().insert_Streamable(arguments[i]);
+                                arguments[i].getObject().setIntoAny(list.item(i).value(),
+                                                                    arguments[i], true);
                             }   
                         }
                     }
@@ -132,7 +133,7 @@
                     CorbaStreamable resultValue = msg.getStreamableReturn();
                     if (resultValue != null) {
                         Any resultAny = orb.create_any();
-                        resultAny.insert_Streamable(resultValue);
+                        resultValue.getObject().setIntoAny(resultAny, resultValue, true);
                         request.set_result(resultAny);
                     }
                 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java Tue Mar 11 17:34:08 2008
@@ -278,6 +278,7 @@
                 CorbaObjectHandler obj = 
                     CorbaHandlerUtils.initializeObjectHandler(orb, paramName, paramIdlType, map, service);
                 streamables[i] = corbaMsg.createStreamableObject(obj, paramName);
+                
                 if (paramMode.value().equals("in")) {
                     streamables[i].setMode(org.omg.CORBA.ARG_IN.value);
                 } else if (paramMode.value().equals("out")) {
@@ -287,7 +288,7 @@
                 }
 
                 Any value = orb.create_any();
-                value.insert_Streamable(streamables[i]);
+                streamables[i].getObject().setIntoAny(value, streamables[i], false);
                 list.add_value(streamables[i].getName(), value, streamables[i].getMode());              
                 corbaMsg.addStreamableArgument(streamables[i]);
             }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectHandler.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectHandler.java Tue Mar 11 17:34:08 2008
@@ -20,8 +20,10 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.corba.CorbaStreamable;
 import org.apache.cxf.binding.corba.wsdl.CorbaTypeImpl;
 
+import org.omg.CORBA.Any;
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
@@ -87,5 +89,9 @@
     }
 
     public void clear() {        
+    }
+    
+    public void setIntoAny(Any value, CorbaStreamable stream, boolean output) {
+        value.insert_Streamable(stream);
     }
 }

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java Tue Mar 11 17:34:08 2008
@@ -20,6 +20,8 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.corba.CorbaStreamable;
+import org.omg.CORBA.Any;
 import org.omg.CORBA.TCKind;
 import org.omg.CORBA.TypeCode;
 
@@ -27,6 +29,8 @@
 
     private static final int UNSIGNED_MAX = 256; 
     private Object value;
+    private boolean objectSet;
+    private Any any;
     
     public CorbaPrimitiveHandler(QName primName, QName primIdlType, TypeCode primTC, Object primType) {
         super(primName, primIdlType, primTC, primType);
@@ -36,12 +40,71 @@
         return value;
     }
     
-    
+    public void setIntoAny(Any val, CorbaStreamable stream, boolean output) {
+        any = val;
+        if (output && value != null) {
+            switch (this.typeCode.kind().value()) {
+            case TCKind._tk_boolean:
+                any.insert_boolean((Boolean)value);
+                break;
+            case TCKind._tk_char:
+                any.insert_char(((Character)value).charValue());
+                break;
+            case TCKind._tk_wchar:
+                any.insert_wchar(((Character)value).charValue());
+                break;
+            case TCKind._tk_octet:
+                any.insert_octet(((Byte)value).byteValue());
+                break;
+            case TCKind._tk_short:
+                any.insert_short(((Short)value).shortValue());
+                break;
+            case TCKind._tk_ushort:
+                any.insert_ushort((short)((Integer)value).intValue());
+                break;
+            case TCKind._tk_long:
+                any.insert_long(((Integer)value).intValue());
+                break;
+            case TCKind._tk_longlong:
+                any.insert_longlong(((Long)value).longValue());
+                break;
+            case TCKind._tk_ulong:
+                any.insert_ulong((int)((java.math.BigInteger)value).longValue());
+                break;
+            case TCKind._tk_ulonglong:
+                any.insert_ulonglong(((java.math.BigInteger)value).longValue());
+                break;
+            case TCKind._tk_float:
+                any.insert_float((Float)value);
+                break;
+            case TCKind._tk_double:
+                any.insert_double((Double)value);
+                break;
+            case TCKind._tk_string:
+                any.insert_string((String)value);
+                break;
+            case TCKind._tk_wstring:
+                any.insert_wstring((String)value);
+                break;
+            default:
+                // Default: assume that whatever stored the data will also know how to convert it into what 
+                // it needs.
+                val.insert_Streamable(stream);
+            }
+        } else {
+            val.insert_Streamable(stream);
+        }
+    }
+
     public void setValue(Object obj) {
+        objectSet = true;
         value = obj;
     }
 
     public String getDataFromValue() {
+        if (!objectSet && any != null) {
+            return getDataFromAny();
+        }
         String data = "";
 
         switch (this.typeCode.kind().value()) {
@@ -149,6 +212,61 @@
             // will also know how to convert it into what it needs.
             value = data;
         }
+    }
+    public String getDataFromAny() {
+        String data = "";
+        switch (this.typeCode.kind().value()) {
+        case TCKind._tk_boolean:
+            data = any.extract_boolean() ? "true" : "false";
+            break;
+        case TCKind._tk_char:
+            char charValue = any.extract_char();
+            // outside the normal range it will -256
+            data = Byte.toString((byte)(charValue > Byte.MAX_VALUE 
+                                                    ? charValue - UNSIGNED_MAX 
+                                                    : charValue));
+            break;
+        case TCKind._tk_wchar:
+            data = Character.toString(any.extract_wchar());
+            break;
+        case TCKind._tk_octet:
+            data = Byte.toString(any.extract_octet());
+            break;
+        case TCKind._tk_short:
+            data = Short.toString(any.extract_short());
+            break;
+        case TCKind._tk_ushort:
+            data = Integer.toString(any.extract_ushort());
+            break;
+        case TCKind._tk_long:
+            data = Integer.toString(any.extract_long());
+            break;
+        case TCKind._tk_longlong:
+            data = Long.toString(any.extract_longlong());
+            break;
+        case TCKind._tk_ulong:
+            data = Long.toString(any.extract_ulong());
+            break;
+        case TCKind._tk_ulonglong:
+            data = java.math.BigInteger.valueOf(any.extract_ulonglong()).toString();
+            break;
+        case TCKind._tk_float:
+            data = Float.toString(any.extract_float());
+            break;
+        case TCKind._tk_double:
+            data = Double.toString(any.extract_double());
+            break;
+        case TCKind._tk_string:
+            data = any.extract_string();
+            break;
+        case TCKind._tk_wstring:
+            data = any.extract_wstring();
+            break;
+        default:
+            //should not get here
+            throw new RuntimeException("Unknown tc: " + this.typeCode);
+        }
+        return data;
     }
     
     public void clear() {

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaBindingHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaBindingHelper.java?rev=636160&r1=636159&r2=636160&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaBindingHelper.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaBindingHelper.java Tue Mar 11 17:34:08 2008
@@ -51,7 +51,6 @@
             if (config.getOrbSingletonClass() != null) {
                 props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
             }
-            props.put("yoko.orb.id", "CXF-CORBA-Binding");
             List<String> orbArgs = config.getOrbArgs();
             defaultORB = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
             if (defaultORB == null) {
@@ -79,14 +78,13 @@
         if (config.getOrbSingletonClass() != null) {
             props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
         }
-        props.put("yoko.orb.id", "CXF-CORBA-Binding-" + address);
         List<String> orbArgs = config.getOrbArgs();
         
         String scheme = addressURI.getScheme();
         // 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 ("corbalob".equals(scheme)) {
+        if ("corbaloc".equals(scheme)) {
             String schemeSpecificPart = addressURI.getSchemeSpecificPart();
             int keyIndex = schemeSpecificPart.indexOf('/');
             String corbaAddr = schemeSpecificPart.substring(0, keyIndex);
@@ -102,20 +100,26 @@
             String port = corbaAddr.substring(index + 1);
             
             props.put("yoko.orb.oa.endpoint", new String(protocol + " --host " + host + " --port " + port));
+            // WHAT to do for non-yoko orb? 
+        } else if ("corbaname".equals(scheme)) {
+            String schemeSpecificPart = addressURI.getSchemeSpecificPart();
+            if (schemeSpecificPart.startsWith(":")) {
+                schemeSpecificPart = schemeSpecificPart.substring(1);
+            }
+            int idx = schemeSpecificPart.indexOf(':');
             
-            orb = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
-            
-            orbList.put(getORBNameFromAddress(address), orb);
+            props.put("org.omg.CORBA.ORBInitialHost", schemeSpecificPart.substring(0, idx));
+            props.put("org.omg.CORBA.ORBInitialPort", schemeSpecificPart.substring(idx + 1));
         } 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);
+            //use defaults
         } else {
             throw new CorbaBindingException("Unsupported address scheme type " + scheme);
         }
+        orb = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
+        orbList.put(getORBNameFromAddress(address), orb);
 
         return orb;
     }
@@ -141,8 +145,18 @@
         String scheme = addressURI.getScheme();
         if ("corbaloc".equals(scheme) || "corbaname".equals(scheme)) {
             String schemeSpecificPart = addressURI.getSchemeSpecificPart();
+            if (schemeSpecificPart.startsWith(":")) {
+                schemeSpecificPart = schemeSpecificPart.substring(1);
+            }
             int keyIndex = schemeSpecificPart.indexOf('/');
-            name = schemeSpecificPart.substring(0, keyIndex);        
+            if (keyIndex != -1) {
+                name = schemeSpecificPart.substring(0, keyIndex);        
+            } else {
+                name = schemeSpecificPart;
+            }
+            if (addressURI.getRawQuery() != null) {
+                name += addressURI.getRawQuery();
+            }
         } else if ("IOR".equals(scheme) || "ior".equals(scheme)) {        
             name = addressURI.toString();
         } else if ("file".equals(scheme) || "relfile".equals(scheme)) {



Mime
View raw message