You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by br...@apache.org on 2006/08/09 13:25:15 UTC

svn commit: r430049 - in /incubator/yoko/trunk: core/ distribution/ distribution/src/main/samples/ws/bank/ distribution/src/main/samples/ws/bank/src/soap/client/ yoko-spec-corba/

Author: bravi
Date: Wed Aug  9 06:25:12 2006
New Revision: 430049

URL: http://svn.apache.org/viewvc?rev=430049&view=rev
Log:
[YOKO-139, YOKO-140, YOKO-57, YOKO-112] - Removed COPYRIGHT in core & yoko-spec-corba modules. Added the soap client to yoko server demo. Also fixed an issue with build from the src package of the release.

Added:
    incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml   (with props)
    incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl   (with props)
    incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java   (with props)
Removed:
    incubator/yoko/trunk/core/COPYRIGHT
    incubator/yoko/trunk/yoko-spec-corba/COPYRIGHT
Modified:
    incubator/yoko/trunk/distribution/assembly-src.xml
    incubator/yoko/trunk/distribution/pom.xml
    incubator/yoko/trunk/distribution/src/main/samples/ws/bank/README.txt

Modified: incubator/yoko/trunk/distribution/assembly-src.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/assembly-src.xml?rev=430049&r1=430048&r2=430049&view=diff
==============================================================================
--- incubator/yoko/trunk/distribution/assembly-src.xml (original)
+++ incubator/yoko/trunk/distribution/assembly-src.xml Wed Aug  9 06:25:12 2006
@@ -12,7 +12,6 @@
         <include>LICENSE*</include>
         <include>NOTICE*</include>
         <include>DISCLAIMER*</include>
-        <include>pom.xml</include>
       </includes>
     </fileSet>
     <fileSet>

Modified: incubator/yoko/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/pom.xml?rev=430049&r1=430048&r2=430049&view=diff
==============================================================================
--- incubator/yoko/trunk/distribution/pom.xml (original)
+++ incubator/yoko/trunk/distribution/pom.xml Wed Aug  9 06:25:12 2006
@@ -31,6 +31,11 @@
             <groupId>org.apache.yoko</groupId>
             <artifactId>yoko-bindings</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.objectweb.celtix</groupId>
+            <artifactId>celtix-router</artifactId>
+            <version>${celtix.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Modified: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/README.txt
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/bank/README.txt?rev=430049&r1=430048&r2=430049&view=diff
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/bank/README.txt (original)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/bank/README.txt Wed Aug  9 06:25:12 2006
@@ -91,6 +91,63 @@
    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/bank
+
+2. Enter the following command to start the server (on a single command line):
+
+   UNIX (must use forward slashes):
+
+     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-core-1.0-incubating-M1-SNAPSHOT.jar 
+        -Dceltix.config.file=file:$YOKO_HOME/samples/ws/etc/corba_bus_config.xml
+        -classpath $CLASSPATH:build/classes yoko.server.Server &
+
+   Windows (may use either forward or back slashes):
+
+     start java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-core-1.0-incubating-M1-SNAPSHOT.jar 
+        -Dceltix.config.file=file:/%YOKO_HOME%\samples\ws\etc\corba_bus_config.xml
+        -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 celtix router (on a single command line):
+
+   UNIX (must use forward slashes):
+
+     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-core-1.0-incubating-M1-SNAPSHOT.jar 
+        -Dceltix.config.file=file:$YOKO_HOME/samples/ws/bank/celtix-yoko-router.xml
+        -classpath $CLASSPATH:build/classes:. org.objectweb.celtix.routing.RouterManager 
+        -BUSid celtix-yoko
+
+   Windows (may use either forward or back slashes):
+
+     start java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-core-1.0-incubating-M1-SNAPSHOT.jar 
+        -Dceltix.config.file=file:/%YOKO_HOME%\samples\ws\etc\corba_bus_config.xml
+        -classpath %CLASSPATH%;build\classes;. org.objectweb.celtix.routing.RouterManager 
+        -BUSid celtix-yoko
+
+4. Enter the following command to start the soap client:
+
+   UNIX:
+
+     java -Xbootclasspath/p:$YOKO_HOME/lib/yoko-core-1.0-incubating-M1-SNAPSHOT.jar 
+        -Dceltix.config.file=file:$YOKO_HOME/samples/ws/etc/corba_bus_config.xml 
+        -classpath $CLASSPATH:build/classes soap.client.Client
+
+   Windows:
+
+     java -Xbootclasspath/p:%YOKO_HOME%\lib\yoko-core-1.0-incubating-M1-SNAPSHOT.jar
+        -Dceltix.config.file=file:/%YOKO_HOME%\samples\ws\etc\corba_bus_config.xml
+        -classpath %CLASSPATH%;build\classes soap.client.Client
+
+4. After running the client, use the kill command to terminate the server & router process (UNIX) or
+   type Ctrl-C in the server's & router's command window (Windows).
+
 Cleanup
 =======
 

Added: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml?rev=430049&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml Wed Aug  9 06:25:12 2006
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans SYSTEM "http://celtix.objectweb.org/configuration/spring/celtix-spring-beans.dtd">
+
+<beans
+    xmlns:ct="http://celtix.objectweb.org/configuration/types"
+    xmlns:rt-conf="http://celtix.objectweb.org/routing/configuration"
+>
+
+  <!-- configuration for the pass through router in soap_to_corba demo -->
+
+  <!-- to specify non-default configuration for a configurable component, supply a bean definition for this
+       component with
+
+       Class: the class name of the bean is derived from the namespace uri of the component's configuration
+       in the following way:
+       The namespace uri is converted into a package name. To this, the suffix 'spring' is appended, and
+       finally the actual class name obtained by converting the last part of the package name into a class name
+       and suffixing it with 'Bean'.
+       Example:
+       The namespace uri for the Routing component configuration is
+           http://celtix.objectweb.org/routing/configuration
+       The resulting bean class is
+           org.objectweb.celtix.routing.configuration.spring.ConfigurationBean
+
+       Id: a unique identifier for the instance of the configurable component represented by the bean
+       The implementation for this is component specific, e.g. for the Bus component it is the bus's id
+       (default: celtix), for Service components it the id of the bus, followed by a '.' and the id for the Router
+       which is "router".
+
+       The actual component's configuration then is composed of <property> elements, the name attribute of which
+       must be the name of one of the component's configuration items.
+       The (non-default) value for that item can be specified either as text (if this is possible, e.g. for
+       strings) or as the content of the <value> element.
+
+       In case of the router configuration the property name is routesWSDL and takes a string value representing a
+       path to the wsdl which defines the route elements.
+
+       Refer to the component configuration metadata (e.g. to router-config.xml) for more information
+       about possible values.
+  -->
+
+  <bean id="celtix-yoko.router"
+        class="org.objectweb.celtix.routing.configuration.spring.ConfigurationBean">
+
+      <property name="routesWSDL">
+          <value>
+              <rt-conf:wsdlUrl>
+                  <rt-conf:url>/router.wsdl</rt-conf:url>
+              </rt-conf:wsdlUrl>
+          </value>
+      </property>
+  </bean>
+
+  <bean id="celtix-yoko.bus"
+        class="org.objectweb.celtix.bus.bus_config.spring.BusConfigBean">
+
+      <property name="bindingFactories">
+          <value>
+              <ct:classNamespaceMappingListValue>
+                <ct:map>
+                    <ct:classname>org.apache.yoko.bindings.corba.CorbaBindingFactory</ct:classname>
+                    <ct:namespace>http://schemas.apache.org/yoko/bindings/corba</ct:namespace>
+                </ct:map>
+                <ct:map>
+                    <ct:classname>org.objectweb.celtix.bus.bindings.soap.SOAPBindingFactory</ct:classname>
+                    <ct:namespace>http://schemas.xmlsoap.org/wsdl/soap/</ct:namespace>
+                    <ct:namespace>http://schemas.xmlsoap.org/wsdl/soap/http</ct:namespace>
+                    <ct:namespace>http://celtix.objectweb.org/transports/jms</ct:namespace>
+                </ct:map>
+              </ct:classNamespaceMappingListValue>
+          </value>
+      </property>
+  </bean>
+
+</beans>

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/celtix-yoko-router.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl?rev=430049&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl Wed Aug  9 06:25:12 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<definitions targetNamespace="http://schemas.apache.org/yoko/idl/bank" name="Bank"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:router="http://celtix.objectweb.org/routing/configuration" 
+    xmlns:tns="http://schemas.apache.org/yoko/idl/bank" 
+    xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <router:route name="soap_to_corba">
+        <router:source port="BankSOAPPort" service="tns:BankSOAPService"/>
+        <router:destination port="BankCORBAPort" service="tns:BankCORBAService"/>
+    </router:route>
+    <import namespace="http://schemas.apache.org/yoko/idl/bank" location="../resources/bank.wsdl" />
+</definitions>

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/router.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java?rev=430049&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java Wed Aug  9 06:25:12 2006
@@ -0,0 +1,86 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
+
+package soap.client;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+
+import bank.client.Account;
+import bank.client.AccountAlreadyExistsException;
+import bank.client.AccountNotFoundException;
+import bank.client.Bank;
+import bank.client.BankSOAPService;
+
+public final class Client {
+
+    private static final QName SERVICE_NAME = new QName("http://schemas.apache.org/yoko/idl/bank", "BankSOAPService");
+
+    private Client() {
+    }
+
+    public static void main(String args[]) throws Exception {
+        URL wsdlUrl = new URL("file:./../resources/bank.wsdl");
+    
+        BankSOAPService ss = new BankSOAPService(wsdlUrl, SERVICE_NAME);
+        Bank port = ss.getBankSOAPPort();  
+        
+
+        System.out.print("Invoking createAccount for Mr. John... ");
+        javax.xml.ws.Holder<Account> account = new javax.xml.ws.Holder<Account>();
+        try {
+            if (port.createAccount("John", account)) {
+                System.out.println("success");
+            } else {
+                System.out.println("failure (Unknown)");
+            }
+        } catch (AccountAlreadyExistsException ex) {
+            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
+        }
+
+        Account bankAccount = account.value;
+        if (bankAccount != null) {
+            System.out.println("Created Account : " + bankAccount);
+        }
+
+        System.out.println("Getting Mr. John's account...");
+        try {
+            bankAccount = port.getAccount("John");
+            if (bankAccount != null) {
+                System.out.println("success");
+            } else {
+                System.out.println("failure");
+            }
+        } catch (AccountNotFoundException ex) {
+            System.out.println("failure (" + ex.getMessage() + " : " + ex.getFaultInfo().getName() + ")");
+        }       
+
+        System.out.println("Getting an non-existent account (Ms. Helen)...");
+        try {
+            bankAccount = port.getAccount("Helen");
+        } catch (AccountNotFoundException ex) {
+            System.out.println("Caught the expected AccountNotFoundException(" + ex.getFaultInfo().getName() + ")");
+        }
+                
+        System.exit(0);
+    }
+
+}

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/bank/src/soap/client/Client.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date