You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2008/07/29 18:26:06 UTC

svn commit: r680757 - in /cxf/trunk/distribution/src/main/release/samples/wsdl_first_https: ./ src/demo/hw_https/client/ src/demo/hw_https/server/

Author: seanoc
Date: Tue Jul 29 09:26:02 2008
New Revision: 680757

URL: http://svn.apache.org/viewvc?rev=680757&view=rev
Log:
Enabled demo to be built and run using maven.
Updated README.

Added:
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/pom.xml
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/InsecureClient.xml
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/WibbleClient.xml
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/CherryServer.xml
Removed:
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/CherryServer.cxf
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/InsecureClient.cxf
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/WibbleClient.cxf
Modified:
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/README.txt
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/build.xml
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/Client.java
    cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/Server.java

Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/README.txt?rev=680757&r1=680756&r2=680757&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/README.txt Tue Jul 29 09:26:02 2008
@@ -20,6 +20,21 @@
 environment by running the script.
 
 
+Building and running the demo using maven
+-----------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo. 
+
+  mvn install (builds the demo)
+
+In separate windows:
+  mvn -Pserver (starts the server)
+  mvn -Psecure.client (runs the client in secure mode, Scenario 2)
+  mvn -Pinsecure.client (runs the client in insecure mode, Scenario 1)
+  mvn clean (removes all generated and compiled classes)
+
+
 Building and running the demo using Ant
 ---------------------------------------
 From the base directory of this sample (i.e., where this README file is

Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/build.xml?rev=680757&r1=680756&r2=680757&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/build.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/build.xml Tue Jul 29 09:26:02 2008
@@ -24,22 +24,19 @@
     <target name="insecure.client" description="run demo insecure client" depends="build">
         <property name="param" value=""/>
         <cxfrun classname="demo.hw_https.client.Client"
-                jvmarg1="-Dcxf.config.file=InsecureClient.cxf"
                 param1="${basedir}/wsdl/hello_world.wsdl" 
-                param2="${user}"/>
+                param2="insecure"/>
     </target> 
 
     <target name="secure.client" description="run demo secure client" depends="build">
         <property name="param" value=""/>
         <cxfrun classname="demo.hw_https.client.Client"
-                jvmarg1="-Dcxf.config.file=WibbleClient.cxf"
                 param1="${basedir}/wsdl/hello_world.wsdl" 
-                param2="${user}"/>
+                param2="secure"/>
     </target> 
         
     <target name="server" description="run demo server" depends="build">
-        <cxfrun classname="demo.hw_https.server.Server" 
-                jvmarg1="-Dcxf.config.file=CherryServer.cxf"/>
+        <cxfrun classname="demo.hw_https.server.Server"/>
     </target>
         
     <target name="generate.code">

Added: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/pom.xml?rev=680757&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/pom.xml Tue Jul 29 09:26:02 2008
@@ -0,0 +1,205 @@
+<?xml version="1.0"?>
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>wsdl_first_https</artifactId>
+    <version>1.0</version>
+    <properties>
+        <cxf.version>[2,)</cxf.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source> 
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>LATEST</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/wsdl/hello_world.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+               </executions>
+           </plugin>
+           <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copyxmlfiles</id>
+                        <phase>generate-sources</phase>
+	    	        <goals>
+	    	            <goal>run</goal>
+	    	        </goals>
+	    	        <configuration>
+	    	            <tasks>
+	    	               <copy file="${basedir}/src/demo/hw_https/server/CherryServer.xml" todir="${basedir}/target/classes/demo/hw_https/server"/>
+	    	               <copy file="${basedir}/src/demo/hw_https/client/WibbleClient.xml" todir="${basedir}/target/classes/demo/hw_https/client"/>
+	    	               <copy file="${basedir}/src/demo/hw_https/client/InsecureClient.xml" todir="${basedir}/target/classes/demo/hw_https/client"/>
+	    	               <copy todir="${basedir}/target/classes/certs">
+	    	                   <fileset dir="${basedir}/certs"/>
+	    	               </copy>
+	    	            </tasks>
+	    	        </configuration>
+	    	    </execution>
+	    	</executions>
+            </plugin>           
+       </plugins>
+    </build>   
+    <profiles>
+        <profile>
+            <id>server</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>java</executable>
+                                    <arguments>
+                                        <argument>-classpath</argument>
+                                        <classpath/>
+                                        <argument>demo.hw_https.server.Server</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>insecure.client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.hw_https.client.Client</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        <argument>insecure</argument>
+                                   </arguments>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+               </plugins>
+           </build>
+        </profile>
+        <profile>
+            <id>secure.client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.hw_https.client.Client</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        <argument>secure</argument>
+                                   </arguments>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+               </plugins>
+           </build>
+        </profile>
+    </profiles>
+    <repositories>
+        <repository>
+            <id>apache-snapshots</id>
+            <name>Apache SNAPSHOT Repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+	    <id>apache-incubating</id>
+	    <name>Apache Incubating Repository</name>
+	    <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+	</repository>
+	<!-- for jaxb-impl -->
+        <repository>
+            <id>java.net</id>
+            <url>http://download.java.net/maven/1/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>apache-plugin-snapshots</id>
+            <name>Apache Maven Plugin Snapshots</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+            <id>apache-plugin-incubating</id>
+            <name>Apache Plugin Incubating Repository</name>
+            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+        </pluginRepository>
+    </pluginRepositories>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+             <groupId>org.apache.cxf</groupId>
+             <artifactId>cxf-rt-transports-http-jetty</artifactId>
+             <version>${cxf.version}</version>
+       </dependency>
+   </dependencies>
+</project>

Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/Client.java?rev=680757&r1=680756&r2=680757&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/Client.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/Client.java Tue Jul 29 09:26:02 2008
@@ -22,26 +22,28 @@
 import java.io.File;
 import java.net.URL;
 import javax.xml.namespace.QName;
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.SOAPService;
 
 public final class Client {
 
-    private static final QName SERVICE_NAME 
+    private static final QName SERVICE_NAME
         = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
-    
-    private static final QName PORT_NAME = 
+
+    private static final QName PORT_NAME =
         new QName("http://apache.org/hello_world_soap_http", "SoapPort");
 
 
     private Client() {
-    } 
+    }
 
     public static void main(String args[]) throws Exception {
-        
-        if (args.length == 0) { 
+
+        if (args.length == 0) {
             System.out.println("please specify wsdl");
-            System.exit(1); 
+            System.exit(1);
         }
 
         URL wsdlURL;
@@ -51,28 +53,36 @@
         } else {
             wsdlURL = new URL(args[0]);
         }
-        
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = null;
+        if ("secure".equals(args[1])) {
+            busFile = Client.class.getResource("WibbleClient.xml");
+        } else if ("insecure".equals(args[1])) {
+            busFile = Client.class.getResource("InsecureClient.xml");
+        } else {
+			System.out.println("arg1 needs to be either secure or insecure");
+			System.exit(1);
+		}
+        Bus bus = bf.createBus(busFile.toString());
+        bf.setDefaultBus(bus);
+
         System.out.println(wsdlURL);
         SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
-        
-        String config = System.getProperty("cxf.config.file");
-        System.out.println("Credentials from "
-                           + (config != null ? config : "unknown source")
-                           + " will be used for the invocation.");
         Greeter port = ss.getPort(PORT_NAME, Greeter.class);
-        
+
         System.out.println("Invoking greetMe...");
         try {
             String resp = port.greetMe(System.getProperty("user.name"));
             System.out.println("Server responded with: " + resp);
             System.out.println();
-            
+
         } catch (Exception e) {
             System.out.println("Invocation failed with the following: " + e.getCause());
             System.out.println();
         }
 
-        System.exit(0); 
+        System.exit(0);
     }
 
 }

Added: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/InsecureClient.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/InsecureClient.xml?rev=680757&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/InsecureClient.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/InsecureClient.xml Tue Jul 29 09:26:02 2008
@@ -0,0 +1,30 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <http:conduit name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit">
+  </http:conduit>
+
+</beans>

Added: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/WibbleClient.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/WibbleClient.xml?rev=680757&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/WibbleClient.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/client/WibbleClient.xml Tue Jul 29 09:26:02 2008
@@ -0,0 +1,62 @@
+<?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.
+-->
+
+<!-- 
+  ** This file configures the Wibble Client
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+  xsi:schemaLocation="
+           http://cxf.apache.org/configuration/security
+           http://cxf.apache.org/schemas/configuration/security.xsd
+           http://cxf.apache.org/transports/http/configuration
+           http://cxf.apache.org/schemas/configuration/http-conf.xsd
+           http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <http:conduit name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit">
+    <http:tlsClientParameters disableCNCheck="true">
+      <sec:trustManagers>
+          <sec:keyStore type="JKS" password="password"
+               file="certs/truststore.jks"/>
+      </sec:trustManagers>
+      <sec:keyManagers keyPassword="password">
+           <sec:keyStore type="JKS" password="password" 
+                file="certs/wibble.jks"/>
+      </sec:keyManagers>
+      <sec:cipherSuitesFilter>
+        <!-- these filters ensure that a ciphersuite with
+          export-suitable or null encryption is used,
+          but exclude anonymous Diffie-Hellman key change as
+          this is vulnerable to man-in-the-middle attacks -->
+        <sec:include>.*_EXPORT_.*</sec:include>
+        <sec:include>.*_EXPORT1024_.*</sec:include>
+        <sec:include>.*_WITH_DES_.*</sec:include>
+        <sec:include>.*_WITH_NULL_.*</sec:include>
+        <sec:exclude>.*_DH_anon_.*</sec:exclude>
+      </sec:cipherSuitesFilter>
+    </http:tlsClientParameters>
+   </http:conduit>
+</beans> 
+

Added: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/CherryServer.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/CherryServer.xml?rev=680757&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/CherryServer.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/CherryServer.xml Tue Jul 29 09:26:02 2008
@@ -0,0 +1,70 @@
+<?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.
+-->
+
+<!-- 
+  ** This file configures the Cherry Server.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+  xsi:schemaLocation="
+            http://cxf.apache.org/configuration/security  		      
+            http://cxf.apache.org/schemas/configuration/security.xsd
+            http://cxf.apache.org/transports/http/configuration
+            http://cxf.apache.org/schemas/configuration/http-conf.xsd
+            http://cxf.apache.org/transports/http-jetty/configuration
+            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+            http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+  <http:destination name="{http://apache.org/hello_world_soap_http}GreeterPort.http-destination"> 
+  </http:destination>
+
+  <httpj:engine-factory>
+   <httpj:engine port="9001">
+    <httpj:tlsServerParameters>
+      <sec:keyManagers keyPassword="password">
+           <sec:keyStore type="JKS" password="password" 
+                file="certs/cherry.jks"/>
+      </sec:keyManagers>
+      <sec:trustManagers>
+          <sec:keyStore type="JKS" password="password"
+               file="certs/truststore.jks"/>
+      </sec:trustManagers>
+      <sec:cipherSuitesFilter>
+        <!-- these filters ensure that a ciphersuite with
+          export-suitable or null encryption is used,
+          but exclude anonymous Diffie-Hellman key change as
+          this is vulnerable to man-in-the-middle attacks -->
+        <sec:include>.*_EXPORT_.*</sec:include>
+        <sec:include>.*_EXPORT1024_.*</sec:include>
+        <sec:include>.*_WITH_DES_.*</sec:include>
+        <sec:include>.*_WITH_NULL_.*</sec:include>
+        <sec:exclude>.*_DH_anon_.*</sec:exclude>
+      </sec:cipherSuitesFilter>
+      <sec:clientAuthentication want="true" required="true"/>
+    </httpj:tlsServerParameters>
+   </httpj:engine>
+  </httpj:engine-factory>
+</beans>

Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/Server.java?rev=680757&r1=680756&r2=680757&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/Server.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/demo/hw_https/server/Server.java Tue Jul 29 09:26:02 2008
@@ -20,12 +20,21 @@
 package demo.hw_https.server;
 
 import javax.xml.ws.Endpoint;
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 
 public class Server {
 
     protected Server() throws Exception {
         System.out.println("Starting Server");
 
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Server.class.getResource("CherryServer.xml");
+        Bus bus = bf.createBus(busFile.toString());
+        bf.setDefaultBus(bus);
+
         Object implementor = new GreeterImpl();
         String address = "https://localhost:9001/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);