cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r476137 - in /incubator/cxf/trunk: distribution/src/main/release/samples/hello_world_https/ distribution/src/main/release/samples/hello_world_https/src/ distribution/src/main/release/samples/hello_world_https/src/demo/ distribution/src/main...
Date Fri, 17 Nov 2006 13:37:59 GMT
Author: eglynn
Date: Fri Nov 17 05:37:57 2006
New Revision: 476137

URL: http://svn.apache.org/viewvc?view=rev&rev=476137
Log:
Fixed up HTTP config issues that were impacting on HTTPS demo

Added:
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/README.txt
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/README.txt
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/build.xml
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/build.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/client.xml
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-client.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/server.xml
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-server.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/Client.java
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/client/Client.java
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/resources/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/resources/abigcompany_ca.pem
      - copied unchanged from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/resources/abigcompany_ca.pem
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/resources/celtix.p12
      - copied unchanged from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/resources/celtix.p12
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/resources/celtixp12.truststore
      - copied unchanged from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/resources/celtixp12.truststore
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/Server.java
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/Server.java
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/hello_world.wsdl
      - copied, changed from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/wsdl/hello_world.wsdl
Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java
    incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
    incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/README.txt (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/README.txt)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/README.txt?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/README.txt&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/README.txt&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/README.txt Fri Nov 17 05:37:57 2006
@@ -12,7 +12,7 @@
 Prerequisite
 ------------
 
-If your environment already includes celtix.jar on the
+If your environment already includes cxf-incubator.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
@@ -25,7 +25,7 @@
 Building and running the demo using ant
 ---------------------------------------
 
-From the samples/hello_world_https_https directory, the ant build script
+From the samples/hello_world_https directory, the ant build script
 can be used to build demo.
 
 Using either UNIX or Windows:
@@ -39,99 +39,42 @@
   ant clean
 
 
-The demo illustrates how authentication can be achieved through configuration
-using 3 different scenarios. For each scenario the correct security related data 
-must be provided. The security data values are defaulted but non default values
-can be specified by using configurations files, or by developing a Java class to
-provide the data, or through the combination of the Java class and the configuration 
-file.
-
-Scenario 1: A HTTPS listener is started up. The listener requires client 
-authentication so the client must provide suiteable credentials. The listener 
-configuration is read in from the celtix-server.xml file located in this directory. 
-The client's security data is read in from the celtix-client.xml, using the bean id
-celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/InsecurePort.http-client.
-The client does NOT provide the appropriate credentials and so the invocation on 
-the server fails. 
-
-To run
-ant server
-ant client -Duser=insecure_user
-
-Scenario 2: The same HTTPS listener is used. The client's security data is
-read in from the celtix-client.xml file in this directory, using the bean id
-celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/SecurePort.http-client.
-The client is configured to provide the src\demo\hw_https\resources\celtix.p12 
-certificate to the server and so the server authenticates the client's certificate 
-using it's trust store 
-src\demo\hw_https\resources\abigcompany_ca.pem.
-Likewise the client authenticates the servers certificate against its CA
-src\demo\hw_https\resources\abigcompany_ca.pem
-But please note it's not adviseable to have sensitive data such as passwords stored in 
-a clear text configuration file. It is done here for demonstration reasons only. Scenario
-3 below shows how to overcome this problem.
-
-To run
-ant server
-ant client -Duser=secure_user
-
-
-Scenario 3: This is similar to scenario 2 but uses a security configurer Java class to
-retrieve the celtix.p12 certificate password securely. 
-(The security configurer is supported for Celtix 1.0 but the API is subject to change in 
-future release.) For this release to create a security configurer simply write a 
-Java class that implements the method 
-
-public void configure(SSLClientPolicy sslPolicyParam)
-
-for a client or 
-
-public void configure(SSLServerPolicy sslPolicyParam)
-
-for a server.
-
-Then on the client side set the java system property to point to the
-name of the class you have developed. The name of the system property
-is derived by concatenating the string 
-
-"celtix.security.configurer." 
-with the bean id.
-
-For example a typical client side system property would id look like
-
-"celtix.security.configurer.celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/StrictSecurePort.http-client"
-
-And also a typical server side system property would look like
-
-"celtix.security.configurer.celtix.http-listener.9001"
-
-The code for setting the appropriate property is available 
-in the Client.java and Server.java classes.
-(For further information on Bean ids please also refer to 
-the celtix configuration guide).
-
-The property value be the fully qualified Java class that implements the 
-public void configure(SSLClientPolicy sslPolicyParam)
-or 
-public void configure(SSLServerPolicy sslPolicyParam)
-methods. Celtix will use reflection to load the class
-and will pass an instance of the client side or server side
-policy. The code can then populate any or all of the data in 
-the policy. 
-To see the structrure of the SSLClientPolicy or SSLServerPolicy
-please refer to its structure as defined in the security.xsd file.
-
-
-In this demo the demo.hw_https.common.DemoSecurityConfigurer class retrieves
-the password for the celtix.p12 certificate via a dialog box so that the 
-data does not need to be stored in configuration. When either the the server
-or the client are run as follows, a dialog box appears prompting for the 
-password.
-
-To run 
-ant server -Dsecurity_mode=strict_server
-ant client -Duser=strict_secure_user
+The demo illustrates how authentication can be achieved through
+configuration using 2 different scenarios. The non-defaulted security
+policy values are be specified via configuration files.
+
+Scenario 1: A HTTPS listener is started up. The listener requires
+client authentication so the client must provide suitable
+credentials. The listener configuration is taken from the server.xml
+file located in this directory.  The client's security data is taken
+from from the secure_client.xml file in this directory,
+using the bean name:
+"{http://apache.org/hello_world_soap_http}SoapPort.http-conduit".
+The client does NOT provide the appropriate credentials and so the
+invocation on the server fails.
+
+To run:
+
+  ant server
+  ant insecure.client
+
+Scenario 2: The same HTTPS listener is used. The client's security
+data is taken from the client.xml file in this directory,
+using the bean name:
+"{http://apache.org/hello_world_soap_http}SoapPort.http-conduit".
+The client is configured to provide the certificate
+src/demo/hw_https/resources/celtix.p12 to the server and so the server
+authenticates the client's certificate using its trust store
+src/demo/hw_https/resources/abigcompany_ca.pem. Likewise the client
+authenticates the servers certificate against its CA
+src/demo/hw_https/resources/abigcompany_ca.pem.
+
+But please note that it is not adviseable to store sensitive data such
+as passwords stored in a clear text configuration file, unless the
+file is sufficiently protected by OS level permissions. The approach
+taken here is for demonstration reasons only.
 
-You will be prompted via a dialog for the password, please enter "celtixpass".
+To run:
 
-The invocation from the client to the server should succeed.
+  ant server
+  ant secure.client

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/build.xml (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/build.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/build.xml?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/build.xml&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/build.xml&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/build.xml Fri Nov 17 05:37:57 2006
@@ -1,21 +1,45 @@
 <?xml version="1.0"?>
-<project name="hello world demo" default="build" basedir=".">
+<!--
+  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.
+-->
+<project name="Secure hello world demo" default="build" basedir=".">
 
     <import file="../common_build.xml"/>        
         
-    <target name="client" description="run demo client" depends="build">
+    <target name="insecure.client" description="run demo insecure client" depends="build">
         <property name="param" value=""/>
-        <celtixrun classname="demo.hw_https.client.Client"
-            jvmarg1="-Dceltix.config.file=file:///${basedir}/celtix-client.xml"
-            param1="${basedir}/wsdl/hello_world.wsdl" 
-            param2="${user}"/>
+        <cxfrun classname="demo.hw_https.client.Client"
+                jvmarg1="-Dcxf.config.file=insecure_client.xml"
+                param1="${basedir}/wsdl/hello_world.wsdl" 
+                param2="${user}"/>
+    </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=client.xml"
+                param1="${basedir}/wsdl/hello_world.wsdl" 
+                param2="${user}"/>
     </target> 
         
     <target name="server" description="run demo server" depends="build">
-        <celtixrun classname="demo.hw_https.server.Server" 
-            jvmarg1="-Dceltix.config.file=file:///${basedir}/celtix-server.xml"
-            param1="${basedir}/wsdl/hello_world.wsdl"
-	    param2="${security_mode}"/>
+        <cxfrun classname="demo.hw_https.server.Server" 
+                jvmarg1="-Dcxf.config.file=server.xml"/>
     </target>
         
     <target name="generate.code">

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/client.xml (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-client.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/client.xml?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-client.xml&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/client.xml&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-client.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/client.xml Fri Nov 17 05:37:57 2006
@@ -1,52 +1,39 @@
 <?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:jaxws-types="http://celtix.objectweb.org/bus/jaxws/configuration/types"
-    xmlns:sec="http://celtix.objectweb.org/bus/configuration/security"
-    xmlns:http-conf="http://celtix.objectweb.org/transports/http/configuration"
->
-
-   <bean id="celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/InsecurePort.http-client"
-        class="org.objectweb.celtix.bus.transports.http.http_client_config.spring.HttpClientConfigBean">
-  
-      <property name="sslClient">
-          <value>
-              <sec:sslClient>
-              </sec:sslClient>
-          </value>
-      </property>
-    </bean>
+<!--
+  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
  
-    <bean id="celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/SecurePort.http-client"
-        class="org.objectweb.celtix.bus.transports.http.http_client_config.spring.HttpClientConfigBean">
-  
-      <property name="sslClient">
-          <value>
-              <sec:sslClient>
-
-		<sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore> 
-		<sec:KeystorePassword>celtixpass</sec:KeystorePassword>
-		<sec:KeyPassword>celtixpass</sec:KeyPassword>
-		<sec:TrustStore>src/demo/hw_https/resources/abigcompany_ca.pem</sec:TrustStore>
-              </sec:sslClient>
-          </value>
-      </property> 
-    </bean>
-
+  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:sec="http://cxf.apache.org/configuration/security"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-    <bean id="celtix.{http://objectweb.org/hello_world_soap_http}SOAPService/StrictSecurePort.http-client"
-        class="org.objectweb.celtix.bus.transports.http.http_client_config.spring.HttpClientConfigBean">
-  
+    <bean name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit" abstract="true">
       <property name="sslClient">
           <value>
               <sec:sslClient>
-		<sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore> 
-		<sec:TrustStore>src/demo/hw_https/resources/abigcompany_ca.pem</sec:TrustStore>
+                  <sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore> 
+                  <sec:KeystorePassword>celtixpass</sec:KeystorePassword>
+                  <sec:KeyPassword>celtixpass</sec:KeyPassword>
+                  <sec:TrustStore>src/demo/hw_https/resources/abigcompany_ca.pem</sec:TrustStore>
               </sec:sslClient>
           </value>
       </property> 
     </bean>
- 
+
 </beans>

Added: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml?view=auto&rev=476137
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml Fri Nov 17 05:37:57 2006
@@ -0,0 +1,28 @@
+<?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"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit" abstract="true">
+    </bean>
+
+</beans>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/insecure_client.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/server.xml (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-server.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/server.xml?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-server.xml&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/server.xml&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/celtix-server.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/server.xml Fri Nov 17 05:37:57 2006
@@ -1,27 +1,40 @@
 <?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:jaxws-types="http://celtix.objectweb.org/bus/jaxws/configuration/types"
-    xmlns:sec="http://celtix.objectweb.org/bus/configuration/security"
->
-  
-  <!-- configuration for the demo server -->
+<!--
+  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:sec="http://cxf.apache.org/configuration/security"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-  <bean id="celtix.http-listener.9001"
-        class="org.objectweb.celtix.bus.transports.http.http_listener_config.spring.HttpListenerConfigBean">
+  <bean name="{http://apache.org/hello_world_soap_http}GreeterImplPort.http-destination" abstract="true">
  
       <property name="sslServer">
           <value>
               <sec:sslServer>
-	        <sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore>
-		<sec:KeystoreType>PKCS12</sec:KeystoreType>
-		<sec:KeystorePassword>celtixpass</sec:KeystorePassword>
-		<sec:KeyPassword>celtixpass</sec:KeyPassword>
-		<sec:WantClientAuthentication>true</sec:WantClientAuthentication>
-		<sec:RequireClientAuthentication>true</sec:RequireClientAuthentication>
-		<sec:TrustStore>src/demo/hw_https/resources/celtixp12.truststore</sec:TrustStore>
+                  <sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore>
+                  <sec:KeystoreType>PKCS12</sec:KeystoreType>
+                  <sec:KeystorePassword>celtixpass</sec:KeystorePassword>
+                  <sec:KeyPassword>celtixpass</sec:KeyPassword>
+                  <sec:WantClientAuthentication>true</sec:WantClientAuthentication>
+                  <sec:RequireClientAuthentication>true</sec:RequireClientAuthentication>
+                  <sec:TrustStore>src/demo/hw_https/resources/celtixp12.truststore</sec:TrustStore>
               </sec:sslServer>
           </value>
       </property>

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/Client.java (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/client/Client.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/Client.java?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/client/Client.java&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/Client.java&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/client/Client.java Fri Nov 17 05:37:57 2006
@@ -1,29 +1,37 @@
+/**
+ * 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 demo.hw_https.client;
 
 import java.io.File;
 import java.net.URL;
 import javax.xml.namespace.QName;
-import org.objectweb.hello_world_soap_http.Greeter;
-import org.objectweb.hello_world_soap_http.SOAPService;
+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 
-        = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService");
-    
-    
-    private static final QName SECURE_PORT_NAME = 
-        new QName("http://objectweb.org/hello_world_soap_http",
-                  "SecurePort");
+        = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
     
-    private static final QName STRICT_SECURE_PORT_NAME = 
-        new QName("http://objectweb.org/hello_world_soap_http",
-                  "StrictSecurePort");
-    
-
-    private static final QName INSECURE_PORT_NAME = 
-        new QName("http://objectweb.org/hello_world_soap_http",
-                  "InsecurePort");
+    private static final QName PORT_NAME = 
+        new QName("http://apache.org/hello_world_soap_http", "SoapPort");
 
 
     private Client() {
@@ -46,40 +54,21 @@
         
         System.out.println(wsdlURL);
         SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
-        Greeter port;
         
-        if ((args[1] != null) && (args[1].equalsIgnoreCase("secure_user"))) {
-            System.out.println("The secure_user credentials will be used for the invocation.");
-            System.out.println();
-            port = ss.getPort(SECURE_PORT_NAME, Greeter.class);
-        } else if ((args[1] != null) && (args[1].equalsIgnoreCase("strict_secure_user"))) {
-            String configurerProperty = "celtix.security.configurer" 
-                        + ".celtix.{http://objectweb.org/hello_world_soap_http}" 
-                        + "SOAPService/StrictSecurePort.http-client";
-            String configurerClass = "demo.hw_https.common.DemoSecurityConfigurer";
-            System.setProperty(configurerProperty, configurerClass);
-            System.out.println("The strict_secure_user credentials will be used for the invocation.");
-            System.out.println("Extra security data will be provided by the class, " + configurerClass 
-                               + " because the system property  " + configurerProperty
-                               + " has been set.");
-            System.out.println();
-            port = ss.getPort(STRICT_SECURE_PORT_NAME, Greeter.class);
-        } else {
-            System.out.println("The insecure_user credentials will be used for the invocation.");
-            System.out.println();
-            port = ss.getPort(INSECURE_PORT_NAME, Greeter.class);
-        }
+        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);
         
-        String resp; 
-
         System.out.println("Invoking greetMe...");
         try {
-            resp = port.greetMe(System.getProperty("user.name"));
+            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 to server failed with the following error : " + e.getCause());
+            System.out.println("Invocation failed with the following: " + e.getCause());
             System.out.println();
         }
 

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/GreeterImpl.java Fri Nov 17 05:37:57 2006
@@ -1,10 +1,29 @@
+/**
+ * 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 demo.hw_https.server;
 
 import java.util.logging.Logger;
-import org.objectweb.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.Greeter;
 
 @javax.jws.WebService(name = "Greeter", serviceName = "SOAPService", 
-                      targetNamespace = "http://objectweb.org/hello_world_soap_http", 
+                      targetNamespace = "http://apache.org/hello_world_soap_http", 
                       wsdlLocation = "file:./wsdl/hello_world.wsdl")
                   
 public class GreeterImpl implements Greeter {
@@ -21,7 +40,4 @@
         System.out.println("Message received: " + me + "\n");
         return "Hello " + me;
     }
-    
- 
-    
 }

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/Server.java (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/Server.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/Server.java?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/Server.java&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/Server.java&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/src/demo/hw_https/server/Server.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/src/demo/hw_https/server/Server.java Fri Nov 17 05:37:57 2006
@@ -1,3 +1,22 @@
+/**
+ * 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 demo.hw_https.server;
 
 import javax.xml.ws.Endpoint;
@@ -13,18 +32,10 @@
     }
 
     public static void main(String args[]) throws Exception {
-        System.out.println("The server's security configuration wil be read from the configuration file, "
-                           + "celtix-server.xml using the bean id \"celtix.http-listener.9001\".");
-        if ((args[1] != null) && (args[1].equalsIgnoreCase("strict_server"))) {
-            String configurerProperty = "celtix.security.configurer.celtix.http-listener.9001";
-            String configurerClass = "demo.hw_https.common.DemoSecurityConfigurer";
-            System.setProperty(configurerProperty, configurerClass);
-            
-            System.out.println("Extra security data will be provided by the class, " + configurerClass 
-                               + " because the system property  " + configurerProperty
-                               + " has been set to invoke on it.");
-            
-        }
+        System.out.println("The server's security configuration will be taken "
+                           + "from server.xml using the bean name : "
+                           + "\"{http://apache.org/hello_world_soap_http}"
+                           + "GreeterImplPort.http-destination\".");
         System.out.println();
         new Server();
         System.out.println("Server ready...");

Copied: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/hello_world.wsdl (from r438444, incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/wsdl/hello_world.wsdl)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/hello_world.wsdl?view=diff&rev=476137&p1=incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/wsdl/hello_world.wsdl&r1=438444&p2=incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/hello_world.wsdl&r2=476137
==============================================================================
--- incubator/cxf/branches/post_apache_integration/distribution/src/main/samples/hello_world_https/wsdl/hello_world.wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world_https/wsdl/hello_world.wsdl Fri Nov 17 05:37:57 2006
@@ -1,15 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="HelloWorld" targetNamespace="http://objectweb.org/hello_world_soap_http" 
+<!--
+  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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" 
     xmlns="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
-    xmlns:tns="http://objectweb.org/hello_world_soap_http"
-    xmlns:x1="http://objectweb.org/hello_world_soap_http/types"
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://apache.org/hello_world_soap_http/types"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <wsdl:types>
-        <schema targetNamespace="http://objectweb.org/hello_world_soap_http/types" 
+        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" 
             xmlns="http://www.w3.org/2001/XMLSchema"
-	    xmlns:tns="http://objectweb.org/hello_world_soap_http/types"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
             elementFormDefault="qualified">
 
 	    <simpleType name="MyStringType">

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml Fri Nov 17 05:37:57 2006
@@ -23,14 +23,14 @@
 
     <target name="client" description="run demo client" depends="build">
         <cxfrun classname="demo.ws_addressing.client.Client"
-                 param1="${basedir}/wsdl/hello_world_addr.wsdl"
-                 jvmarg1="-Dcxf.config.file=client.xml"/>
+                param1="${basedir}/wsdl/hello_world_addr.wsdl"
+                jvmarg1="-Dcxf.config.file=client.xml"/>
     </target>
 
     <target name="server" description="run demo server" depends="build">
         <cxfrun classname="demo.ws_addressing.server.Server"
-                 param1="${basedir}/wsdl/hello_world_addr.wsdl"
-                 jvmarg1="-Dcxf.config.file=server.xml"/>
+                param1="${basedir}/wsdl/hello_world_addr.wsdl"
+                jvmarg1="-Dcxf.config.file=server.xml"/>
     </target>
 
     <target name="generate.code">

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Fri Nov 17 05:37:57 2006
@@ -88,10 +88,11 @@
     
     @Override
     public String getBeanName() {
+        String beanName = null;
         if (endpointInfo.getName() != null) {
-            return endpointInfo.getName().toString() + ".http-destination";
+            beanName = endpointInfo.getName().toString() + ".http-destination";
         }
-        return null;
+        return beanName;
     }
 
 

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Nov 17 05:37:57 2006
@@ -77,7 +77,8 @@
     
     private static final Logger LOG = LogUtils.getL7dLogger(HTTPConduit.class);
     private final Bus bus;
-    private final URLConnectionFactory connectionFactory;
+    private final URLConnectionFactory alternateConnectionFactory;
+    private URLConnectionFactory connectionFactory;
     private URL url;
     private MessageObserver incomingObserver;
     private EndpointReferenceType target;
@@ -136,14 +137,19 @@
         init();
         bus = b;
         endpointInfo = ei;
-        connectionFactory = factory != null
-                            ? factory
-                            : HTTPTransportFactory.getConnectionFactory(sslClient);
+        alternateConnectionFactory = factory;
+
         decoupledEngine = eng;
         url = t == null
               ? new URL(getAddress())
               : new URL(t.getAddress().getValue());
         target = getTargetReference(t);
+    }
+
+    protected void retrieveConnectionFactory() {
+        connectionFactory = alternateConnectionFactory != null
+                            ? alternateConnectionFactory
+                            : HTTPTransportFactory.getConnectionFactory(sslClient);
     }
     
     @Override

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java Fri Nov 17 05:37:57 2006
@@ -110,12 +110,14 @@
         HTTPConduit conduit = target == null
             ? new HTTPConduit(bus, endpointInfo) : new HTTPConduit(bus, endpointInfo, target);
         configure(conduit);
+        conduit.retrieveConnectionFactory();
         return conduit;
     }
 
     public Destination getDestination(EndpointInfo endpointInfo) throws IOException {
         JettyHTTPDestination destination = new JettyHTTPDestination(bus, this, endpointInfo);
         configure(destination);
+        destination.retrieveEngine();
         return destination;
     }
 

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java Fri Nov 17 05:37:57 2006
@@ -61,6 +61,7 @@
     protected static final String ANONYMOUS_ADDRESS = "http://www.w3.org/2005/08/addressing/anonymous";
 
     protected ServerEngine engine;
+    protected ServerEngine alternateEngine;
     protected MessageObserver incomingObserver;
 
     /**
@@ -88,8 +89,13 @@
     public JettyHTTPDestination(Bus b, ConduitInitiator ci, EndpointInfo endpointInfo, ServerEngine eng)
         throws IOException {
         super(b, ci, endpointInfo);
-        engine = eng != null ? eng : JettyHTTPServerEngine
-            .getForPort(bus, nurl.getProtocol(), nurl.getPort());
+        alternateEngine = eng;
+    }
+
+    protected void retrieveEngine() {
+        engine = alternateEngine != null
+                 ? alternateEngine
+                 : JettyHTTPServerEngine.getForPort(bus, nurl.getProtocol(), nurl.getPort(), sslServer);
     }
 
     /**
@@ -325,7 +331,7 @@
             String m = (new org.apache.cxf.common.i18n.Message("UNEXPECTED_RESPONSE_TYPE_MSG",
                 LOG, responseObj.getClass())).toString();
             LOG.log(Level.WARNING, m);
-            throw new IOException(m);
+            throw new IOException(m);   
         } else {
             String m = (new org.apache.cxf.common.i18n.Message("NULL_RESPONSE_MSG", LOG)).toString();
             LOG.log(Level.WARNING, m);

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java Fri Nov 17 05:37:57 2006
@@ -26,6 +26,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.security.SSLServerPolicy;
 import org.apache.cxf.transport.HttpUriMapper;
 import org.apache.cxf.transport.http.listener.HTTPListenerConfigBean;
 import org.apache.cxf.transports.http.configuration.HTTPListenerPolicy;
@@ -34,7 +35,6 @@
 import org.mortbay.http.HttpServer;
 import org.mortbay.http.SocketListener;
 import org.mortbay.http.handler.AbstractHttpHandler;
-import org.mortbay.util.InetAddrPort;
 
 
 
@@ -47,10 +47,19 @@
     private int servantCount;
     private HttpServer server;
     private SocketListener listener;
+    private final JettyListenerFactory listenerFactory;
     private final int port;
     
     JettyHTTPServerEngine(Bus bus, String protocol, int p) {
+        this(bus, protocol, p, null);
+    }
+
+    JettyHTTPServerEngine(Bus bus, String protocol, int p, SSLServerPolicy sslServerPolicy) {
         port = p;
+        if (sslServerPolicy != null) {
+            sslServer = sslServerPolicy;
+        }
+        listenerFactory = HTTPTransportFactory.getListenerFactory(sslServer);
         init();
     }    
     
@@ -62,9 +71,16 @@
 
 
     static synchronized JettyHTTPServerEngine getForPort(Bus bus, String protocol, int p) {
+        return getForPort(bus, protocol, p, null);
+    }
+
+    static synchronized JettyHTTPServerEngine getForPort(Bus bus,
+                                                         String protocol,
+                                                         int p,
+                                                         SSLServerPolicy sslServerPolicy) {
         JettyHTTPServerEngine ref = portMap.get(p);
         if (ref == null) {
-            ref = new JettyHTTPServerEngine(bus, protocol, p);
+            ref = new JettyHTTPServerEngine(bus, protocol, p, sslServerPolicy);
             configure(bus, ref);
             portMap.put(p, ref);
         }
@@ -99,8 +115,7 @@
         if (server == null) {
             server = new HttpServer();
             
-            // REVISIT create SSL listener if neccessary
-            listener = new SocketListener(new InetAddrPort(port));
+            listener = listenerFactory.createListener(port);
            
             if (getListener().isSetMinThreads()) {
                 listener.setMinThreads(getListener().getMinThreads());

Modified: incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java Fri Nov 17 05:37:57 2006
@@ -215,6 +215,7 @@
                                               null,
                                               connectionFactory,
                                               decoupledEngine);
+        conduit.retrieveConnectionFactory();
 
         if (send) {
             conduit.getClient().setConnectionTimeout(303030);

Modified: incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java?view=diff&rev=476137&r1=476136&r2=476137
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java Fri Nov 17 05:37:57 2006
@@ -263,6 +263,7 @@
                                                              conduitInitiator,
                                                              endpointInfo,
                                                              engine);
+        dest.retrieveEngine();
         policy = dest.getServer();
         observer = new MessageObserver() {
             public void onMessage(Message m) {



Mime
View raw message