cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r448255 [2/3] - in /incubator/cxf/trunk: ./ api/ api/src/test/java/org/apache/cxf/wsdl/ api/src/test/resources/schemas/ api/src/test/resources/schemas/wsdl/ api/src/test/resources/wsdl/ common/ common/metacode/ common/metacode/src/main/reso...
Date Wed, 20 Sep 2006 16:23:44 GMT
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=448255&r1=448254&r2=448255
==============================================================================
--- 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 Wed Sep 20 09:23:41 2006
@@ -24,9 +24,11 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
 import java.net.Proxy;
 import java.net.URL;
 import java.net.URLConnection;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -37,6 +39,9 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.Base64Utility;
+import org.apache.cxf.configuration.security.AuthorizationPolicy;
+import org.apache.cxf.configuration.security.SSLClientPolicy;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -45,6 +50,8 @@
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.http.conduit.HTTPConduitConfigBean;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
@@ -55,79 +62,75 @@
 /**
  * HTTP Conduit implementation.
  */
-public class HTTPConduit implements Conduit {
+public class HTTPConduit extends HTTPConduitConfigBean implements Conduit {
 
     public static final String HTTP_CONNECTION = "http.connection";
     
     private static final Logger LOG = LogUtils.getL7dLogger(HTTPConduit.class);
     private final Bus bus;
-    private final HTTPConduitConfiguration config;
     private final URLConnectionFactory connectionFactory;
     private URL url;
     private MessageObserver incomingObserver;
     private EndpointReferenceType target;
-
+    
     private ServerEngine decoupledEngine;
     private URL decoupledURL;
     private DecoupledDestination decoupledDestination;
+    private EndpointInfo endpointInfo;
 
     /**
-     * Constructor, using real configuration.
+     * Constructor
      * 
      * @param b the associated Bus
-     * @param endpointInfo the endpoint info of the initiator
+     * @param ei the endpoint info of the initiator
      * @throws IOException
      */
-    public HTTPConduit(Bus b, EndpointInfo endpointInfo) throws IOException {
+    public HTTPConduit(Bus b, EndpointInfo ei) throws IOException {
         this(b,
-             endpointInfo,
+             ei,
              null);
     }
 
     /**
-     * Constructor, using real configuration.
+     * Constructor
      * 
      * @param b the associated Bus
-     * @param endpointInfo the endpoint info of the initiator
-     * @param target the endpoint reference of the target
+     * @param ei the endpoint info of the initiator
+     * @param t the endpoint reference of the target
      * @throws IOException
      */
-    public HTTPConduit(Bus b,
-                       EndpointInfo endpointInfo,
-                       EndpointReferenceType target) throws IOException {
+    public HTTPConduit(Bus b, EndpointInfo ei, EndpointReferenceType t) throws IOException {
         this(b,
-             endpointInfo,
-             target,
+             ei,
+             t,
              null,
-             null,
-             new HTTPConduitConfiguration(b, endpointInfo));
+             null);
     }
 
     /**
-     * Constructor, allowing subsititution of configuration, 
-     * connnection factory ang decoupled engine.
+     * Constructor, allowing subsititution of
+     * connnection factory and decoupled engine.
      * 
      * @param b the associated Bus
-     * @param endpointInfo the endpoint info of the initiator
-     * @param target the endpoint reference of the target
+     * @param ei the endpoint info of the initiator
+     * @param t the endpoint reference of the target
      * @param factory the URL connection factory
      * @param eng the decoupled engine
-     * @param cfg the configuration
      * @throws IOException
      */
     public HTTPConduit(Bus b,
-                       EndpointInfo endpointInfo,
+                       EndpointInfo ei,
                        EndpointReferenceType t,
                        URLConnectionFactory factory,
-                       ServerEngine eng,
-                       HTTPConduitConfiguration cfg) throws IOException {
+                       ServerEngine eng) throws IOException {
+        init();
         bus = b;
-        config = cfg;
+        endpointInfo = ei;
         connectionFactory = factory != null
                             ? factory
                             : getDefaultConnectionFactory();
         decoupledEngine = eng;
-        url = new URL(config.getAddress());
+        url = new URL(getAddress());
         target = getTargetReference(t);
     }
     
@@ -151,9 +154,8 @@
         
         String value = (String)message.get(Message.ENDPOINT_ADDRESS);
         URL currentURL = value != null ? new URL(value) : url;
-
         URLConnection connection = 
-            connectionFactory.createConnection(config.getProxy(), currentURL);
+            connectionFactory.createConnection(getProxy(), currentURL);
         connection.setDoOutput(true);
 
         if (connection instanceof HttpURLConnection) {
@@ -161,25 +163,25 @@
             hc.setRequestMethod("POST");
         }
 
-        connection.setConnectTimeout((int)config.getPolicy().getConnectionTimeout());
-        connection.setReadTimeout((int)config.getPolicy().getReceiveTimeout());
+        connection.setConnectTimeout((int)getClient().getConnectionTimeout());
+        connection.setReadTimeout((int)getClient().getReceiveTimeout());
 
         connection.setUseCaches(false);
         if (connection instanceof HttpURLConnection) {
             HttpURLConnection hc = (HttpURLConnection)connection;
-            if (config.getPolicy().isAutoRedirect()) {
+            if (getClient().isAutoRedirect()) {
                 //cannot use chunking if autoredirect as the request will need to be
                 //completely cached locally and resent to the redirect target
                 hc.setInstanceFollowRedirects(true);
             } else {
                 hc.setInstanceFollowRedirects(false);
-                if (config.getPolicy().isAllowChunking()) {
+                if (getClient().isAllowChunking()) {
                     hc.setChunkedStreamingMode(2048);
                 }
             }
         }
 
-        config.setPolicies(message, headers);
+        setPolicies(message, headers);
      
         message.setContent(OutputStream.class,
                            new WrappedOutputStream(message, connection));
@@ -200,7 +202,7 @@
      */
     public synchronized Destination getBackChannel() {
         if (decoupledDestination == null
-            && config.getPolicy().getDecoupledEndpoint() != null) {
+            && getClient().getDecoupledEndpoint() != null) {
             decoupledDestination = setUpDecoupledDestination(); 
         }
         return decoupledDestination;
@@ -252,7 +254,7 @@
         return new URLConnectionFactory() {
             public URLConnection createConnection(Proxy proxy, URL u)
                 throws IOException {
-                return config.getProxy() != null 
+                return getProxy() != null 
                         ? u.openConnection(proxy)
                         : u.openConnection();
             }
@@ -271,7 +273,7 @@
         if (null == t) {
             ref = new EndpointReferenceType();
             AttributedURIType address = new AttributedURIType();
-            address.setValue(config.getAddress());
+            address.setValue(getAddress());
             ref.setAddress(address);
         } else {
             ref = t;
@@ -343,7 +345,7 @@
      */
     private DecoupledDestination setUpDecoupledDestination() {        
         EndpointReferenceType reference =
-            EndpointReferenceUtils.getEndpointReference(config.getPolicy().getDecoupledEndpoint());
+            EndpointReferenceUtils.getEndpointReference(getClient().getDecoupledEndpoint());
         if (reference != null) {
             String decoupledAddress = reference.getAddress().getValue();
             LOG.info("creating decoupled endpoint: " + decoupledAddress);
@@ -523,4 +525,130 @@
             decoupledDestination.getMessageObserver().onMessage(inMessage);
         }
     }    
+
+    private void init() {
+        if (!isSetClient()) {
+            setClient(new HTTPClientPolicy());
+        }
+        if (!isSetAuthorization()) {
+            setAuthorization(new AuthorizationPolicy());
+        }
+        if (!isSetProxyAuthorization()) {
+            setProxyAuthorization(new AuthorizationPolicy());
+        }
+        if (!isSetSslClient()) {
+            setSslClient(new SSLClientPolicy());
+        }
+    }
+
+    private String getAddress() {
+        return endpointInfo.getAddress();
+    }
+
+    private Proxy getProxy() {
+        Proxy proxy = null;
+        HTTPClientPolicy policy = getClient(); 
+        if (policy.isSetProxyServer()) {
+            proxy = new Proxy(Proxy.Type.valueOf(policy.getProxyServerType().toString()),
+                              new InetSocketAddress(policy.getProxyServer(),
+                                                    policy.getProxyServerPort()));
+        }
+        return proxy;
+    }
+
+    private void setPolicies(Message message, Map<String, List<String>> headers) {
+        AuthorizationPolicy authPolicy = getAuthorization();
+        AuthorizationPolicy newPolicy = message.get(AuthorizationPolicy.class);
+        String userName = null;
+        String passwd = null;
+        if (null != newPolicy) {
+            userName = newPolicy.getUserName();
+            passwd = newPolicy.getPassword();
+        }
+        if (userName == null && authPolicy.isSetUserName()) {
+            userName = authPolicy.getUserName();
+        }
+        if (userName != null) {
+            if (passwd == null && authPolicy.isSetPassword()) {
+                passwd = authPolicy.getPassword();
+            }
+            userName += ":";
+            if (passwd != null) {
+                userName += passwd;
+            }
+            userName = Base64Utility.encode(userName.getBytes());
+            headers.put("Authorization",
+                        Arrays.asList(new String[] {"Basic " + userName}));
+        } else if (authPolicy.isSetAuthorizationType() && authPolicy.isSetAuthorization()) {
+            String type = authPolicy.getAuthorizationType();
+            type += " ";
+            type += authPolicy.getAuthorization();
+            headers.put("Authorization",
+                        Arrays.asList(new String[] {type}));
+        }
+        AuthorizationPolicy proxyAuthPolicy = getProxyAuthorization();
+        if (proxyAuthPolicy.isSetUserName()) {
+            userName = proxyAuthPolicy.getUserName();
+            if (userName != null) {
+                passwd = "";
+                if (proxyAuthPolicy.isSetPassword()) {
+                    passwd = proxyAuthPolicy.getPassword();
+                }
+                userName += ":";
+                if (passwd != null) {
+                    userName += passwd;
+                }
+                userName = Base64Utility.encode(userName.getBytes());
+                headers.put("Proxy-Authorization",
+                            Arrays.asList(new String[] {"Basic " + userName}));
+            } else if (proxyAuthPolicy.isSetAuthorizationType() && proxyAuthPolicy.isSetAuthorization()) {
+                String type = proxyAuthPolicy.getAuthorizationType();
+                type += " ";
+                type += proxyAuthPolicy.getAuthorization();
+                headers.put("Proxy-Authorization",
+                            Arrays.asList(new String[] {type}));
+            }
+        }
+        HTTPClientPolicy policy = getClient();
+        if (policy.isSetCacheControl()) {
+            headers.put("Cache-Control",
+                        Arrays.asList(new String[] {policy.getCacheControl().value()}));
+        }
+        if (policy.isSetHost()) {
+            headers.put("Host",
+                        Arrays.asList(new String[] {policy.getHost()}));
+        }
+        if (policy.isSetConnection()) {
+            headers.put("Connection",
+                        Arrays.asList(new String[] {policy.getConnection().value()}));
+        }
+        if (policy.isSetAccept()) {
+            headers.put("Accept",
+                        Arrays.asList(new String[] {policy.getAccept()}));
+        }
+        if (policy.isSetAcceptEncoding()) {
+            headers.put("Accept-Encoding",
+                        Arrays.asList(new String[] {policy.getAcceptEncoding()}));
+        }
+        if (policy.isSetAcceptLanguage()) {
+            headers.put("Accept-Language",
+                        Arrays.asList(new String[] {policy.getAcceptLanguage()}));
+        }
+        if (policy.isSetContentType()) {
+            headers.put("Content-Type",
+                        Arrays.asList(new String[] {policy.getContentType()}));
+        }
+        if (policy.isSetCookie()) {
+            headers.put("Cookie",
+                        Arrays.asList(new String[] {policy.getCookie()}));
+        }
+        if (policy.isSetBrowserType()) {
+            headers.put("BrowserType",
+                        Arrays.asList(new String[] {policy.getBrowserType()}));
+        }
+        if (policy.isSetReferer()) {
+            headers.put("Referer",
+                        Arrays.asList(new String[] {policy.getReferer()}));
+        }
+    }
 }

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=448255&r1=448254&r2=448255
==============================================================================
--- 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 Wed Sep 20 09:23:41 2006
@@ -62,7 +62,7 @@
     protected MessageObserver incomingObserver;
 
     /**
-     * Constructor, using real configuration and Jetty server engine.
+     * Constructor, using Jetty server engine.
      * 
      * @param b the associated Bus
      * @param ci the associated conduit initiator
@@ -73,27 +73,25 @@
                                 ConduitInitiator ci,
                                 EndpointInfo endpointInfo)
         throws IOException {
-        this(b, ci, endpointInfo, null, new HTTPDestinationConfiguration(b, endpointInfo));
+        this(b, ci, endpointInfo, null);
     }
 
     /**
-     * Constructor, allowing subsititution of configuration.
+     * Constructor, allowing subsititution of server engine.
      * 
      * @param b the associated Bus
      * @param ci the associated conduit initiator
      * @param endpointInfo the endpoint info of the destination
      * @param eng the server engine
-     * @param cfg the configuration
      * @throws IOException
      */
 
     public JettyHTTPDestination(Bus b,
                                 ConduitInitiator ci,
                                 EndpointInfo endpointInfo,
-                                ServerEngine eng,
-                                HTTPDestinationConfiguration cfg)
+                                ServerEngine eng)
         throws IOException {
-        super(b, ci, endpointInfo, cfg);
+        super(b, ci, endpointInfo);
         engine = eng != null 
                  ? eng
                  : JettyHTTPServerEngine.getForPort(bus, nurl.getProtocol(), nurl.getPort());
@@ -108,8 +106,8 @@
         if (null != observer) {
             LOG.info("registering incoming observer: " + observer);
             try {
-                URL url = new URL(config.getAddress());
-                if (config.contextMatchOnStem()) {
+                URL url = new URL(getAddressValue());
+                if (contextMatchOnStem()) {
                     engine.addServant(url, new AbstractHttpHandler() {
                             public void handle(String pathInContext, String pathParams,
                                                HttpRequest req, HttpResponse resp)
@@ -239,8 +237,8 @@
     
     protected void doService(HttpRequest req, HttpResponse resp)
         throws IOException {
-        if (config.getPolicy().isSetRedirectURL()) {
-            resp.sendRedirect(config.getPolicy().getRedirectURL());
+        if (getServer().isSetRedirectURL()) {
+            resp.sendRedirect(getServer().getRedirectURL());
             resp.commit();
             req.setHandled(true);
             return;

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=448255&r1=448254&r2=448255
==============================================================================
--- 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 Wed Sep 20 09:23:41 2006
@@ -25,6 +25,9 @@
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.security.SSLServerPolicy;
+import org.apache.cxf.transport.http.listener.HTTPListenerConfigBean;
+import org.apache.cxf.transports.http.configuration.HTTPListenerPolicy;
 import org.mortbay.http.HttpContext;
 import org.mortbay.http.HttpHandler;
 import org.mortbay.http.HttpServer;
@@ -33,7 +36,8 @@
 import org.mortbay.util.InetAddrPort;
 
 
-public final class JettyHTTPServerEngine implements ServerEngine {
+
+public final class JettyHTTPServerEngine extends HTTPListenerConfigBean implements ServerEngine {
     private static final long serialVersionUID = 1L;
     
     private static Map<Integer, JettyHTTPServerEngine> portMap =
@@ -42,12 +46,11 @@
     private int servantCount;
     private HttpServer server;
     private SocketListener listener;
-    private final HTTPListenerConfiguration config;
     private final int port;
     
     JettyHTTPServerEngine(Bus bus, String protocol, int p) {
         port = p;
-        config = new HTTPListenerConfiguration(bus, protocol, port);
+        init();
     }
     
     static synchronized JettyHTTPServerEngine getForPort(Bus bus, String protocol, int p) {
@@ -92,19 +95,19 @@
             
             // REVISIT creare SSL listener if neccessary
             listener = new SocketListener(new InetAddrPort(port));
-            
-            if (config.getPolicy().isSetMinThreads()) {
-                listener.setMinThreads(config.getPolicy().getMinThreads());
+           
+            if (getListener().isSetMinThreads()) {
+                listener.setMinThreads(getListener().getMinThreads());
             }
-            if (config.getPolicy().isSetMaxThreads()) {
-                listener.setMaxThreads(config.getPolicy().getMaxThreads());            
+            if (getListener().isSetMaxThreads()) {
+                listener.setMaxThreads(getListener().getMaxThreads());            
             }
-            if (config.getPolicy().isSetMaxIdleTimeMs()) {
-                listener.setMaxIdleTimeMs(config.getPolicy().getMaxIdleTimeMs().intValue());
+            if (getListener().isSetMaxIdleTimeMs()) {
+                listener.setMaxIdleTimeMs(getListener().getMaxIdleTimeMs().intValue());
             }
-            if (config.getPolicy().isSetLowResourcePersistTimeMs()) {
+            if (getListener().isSetLowResourcePersistTimeMs()) {
                 int lowResourcePersistTime = 
-                    config.getPolicy().getLowResourcePersistTimeMs().intValue();
+                    getListener().getLowResourcePersistTimeMs().intValue();
                 listener.setLowResourcePersistTimeMs(lowResourcePersistTime);
             }
 
@@ -234,5 +237,14 @@
             }
         }
         return ret;
+    }
+
+    private void init() {
+        if (!isSetListener()) {
+            setListener(new HTTPListenerPolicy());
+        }
+        if (!isSetSslServer()) {
+            setSslServer(new SSLServerPolicy());
+        }
     }
 }

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,55 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/http/conduit" 
+           xmlns:tns="http://cxf.apache.org/transport/http/conduit"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
+           xmlns:sec="http://cxf.apache.org/configuration/security" 
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/http/configuration" schemaLocation="../wsdl/http-conf.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/configuration/security" schemaLocation="security.xsd"/>
+
+    <xs:element name="client" type="http-conf:HTTPClientPolicy"/>
+    <xs:element name="authorization" type="sec:AuthorizationPolicy"/>
+    <xs:element name="proxyAuthorization" type="sec:AuthorizationPolicy"/>
+    <xs:element name="sslClient" type="sec:SSLClientPolicy"/>
+
+    <xs:complexType name="HTTPConduitConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:client" minOccurs="0"/>
+            <xs:element ref="tns:authorization" minOccurs="0"/>
+            <xs:element ref="tns:proxyAuthorization" minOccurs="0"/>
+            <xs:element ref="tns:sslClient" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,55 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/http/destination" 
+           xmlns:tns="http://cxf.apache.org/transport/http/destination"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
+           xmlns:sec="http://cxf.apache.org/configuration/security" 
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/http/configuration" schemaLocation="../wsdl/http-conf.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/configuration/security" schemaLocation="security.xsd"/>
+
+    <xs:element name="server" type="http-conf:HTTPServerPolicy"/>
+    <xs:element name="authorization" type="sec:AuthorizationPolicy"/>
+    <xs:element name="sslServer" type="sec:SSLServerPolicy"/>
+    <xs:element name="contextMatchStrategy" type="xs:string" default="exact"/>
+
+    <xs:complexType name="HTTPDestinationConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:server" minOccurs="0"/>
+            <xs:element ref="tns:authorization" minOccurs="0"/>
+            <xs:element ref="tns:sslServer" minOccurs="0"/>
+            <xs:element ref="tns:contextMatchStrategy" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/http/listener" 
+           xmlns:tns="http://cxf.apache.org/transport/http/listener"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
+           xmlns:sec="http://cxf.apache.org/configuration/security" 
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/http/configuration" schemaLocation="../wsdl/http-conf.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/configuration/security" schemaLocation="security.xsd"/>
+
+    <xs:element name="listener" type="http-conf:HTTPListenerPolicy"/>
+    <xs:element name="sslServer" type="sec:SSLServerPolicy"/>
+
+    <xs:complexType name="HTTPListenerConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:listener" minOccurs="0"/>
+            <xs:element ref="tns:sslServer" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/security.xsd (from r447791, incubator/cxf/trunk/common/metacode/src/main/resources/schemas/configuration/security.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/security.xsd?view=diff&rev=448255&p1=incubator/cxf/trunk/common/metacode/src/main/resources/schemas/configuration/security.xsd&r1=447791&p2=incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/security.xsd&r2=448255
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/schemas/configuration/security.xsd (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/security.xsd Wed Sep 20 09:23:41 2006
@@ -75,6 +75,7 @@
             </xs:element>
         </xs:sequence>
     </xs:complexType>
+    <xs:element name="authorization" type="tns:AuthorizationPolicy"/>
 
     <xs:complexType name="SSLServerPolicy">
         <xs:annotation>
@@ -217,6 +218,7 @@
 
     	</xs:sequence>
     </xs:complexType>
+    <xs:element name="sslServer" type="tns:SSLServerPolicy"/>
 
 
 
@@ -362,5 +364,6 @@
 
     	</xs:sequence>
     </xs:complexType>
+    <xs:element name="sslClient" type="tns:SSLClientPolicy"/>
 
 </xs:schema>

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xjb?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xjb (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xjb Wed Sep 20 09:23:41 2006
@@ -0,0 +1,34 @@
+<?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.
+-->
+<jaxb:bindings version="1.0" 
+  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
+  jaxb:extensionBindingPrefixes="xjc">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema">
+        <jaxb:schemaBindings>
+            <jaxb:package name="org.apache.cxf.wsdl"/>
+        </jaxb:schemaBindings>
+        <jaxb:globalBindings generateIsSetMethod="true"/>
+    </jaxb:bindings>
+    <jaxb:bindings schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
+        <jaxb:class implClass="org.apache.cxf.wsdl.TExtensibilityElementImpl"/>
+    </jaxb:bindings>
+</jaxb:bindings>

Copied: incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd (from r447791, incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/http-conf.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd?view=diff&rev=448255&p1=incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/http-conf.xsd&r1=447791&p2=incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd&r2=448255
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/http-conf.xsd (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd Wed Sep 20 09:23:41 2006
@@ -27,7 +27,7 @@
            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
            jaxb:version="2.0">
 
-    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="wsdl.xsd"/>
+    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd"/>
 
     <xs:complexType name="HTTPServerPolicy">
         <xs:annotation>
@@ -136,6 +136,7 @@
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
+    <xs:element name="server" type="http-conf:HTTPServerPolicy"/>
 
 
     <xs:complexType name="HTTPClientPolicy">
@@ -331,6 +332,7 @@
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
+    <xs:element name="client" type="http-conf:HTTPClientPolicy"/>
     
     <xs:complexType name="HTTPListenerPolicy">
     	<xs:sequence>
@@ -364,6 +366,7 @@
     		</xs:element>
     	</xs:sequence>
     </xs:complexType>
+    <xs:element name="listener" type="http-conf:HTTPListenerPolicy"/>
 
   
     <xs:simpleType name="serverCacheControlType">

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=448255&r1=448254&r2=448255
==============================================================================
--- 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 Wed Sep 20 09:23:41 2006
@@ -42,7 +42,6 @@
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
-import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 import org.easymock.classextension.EasyMock;
@@ -56,8 +55,6 @@
     private static final String PAYLOAD = "message payload";
     private EndpointReferenceType target;
     private EndpointInfo endpointInfo;
-    private HTTPConduitConfiguration config;
-    private HTTPClientPolicy policy;
     private URLConnectionFactory connectionFactory;
     private URLConnection connection;
     private Proxy proxy;
@@ -78,8 +75,6 @@
         // calls by mocking up only class data members (no local variables)
         // and explicitly making available for GC post-verify
         finalVerify();
-        config = null;
-        policy = null;
         connectionFactory = null;
         connection = null;
         proxy = null;
@@ -126,7 +121,7 @@
     }
 
     public void testSendHttpConnectionAutoRedirect() throws Exception {
-        HTTPConduit conduit = setUpConduit(true, true, false);
+        HTTPConduit conduit = setUpConduit(true, true, true);
         Message message = new MessageImpl();
         conduit.send(message);
         verifySentMessage(conduit, message);
@@ -165,13 +160,11 @@
         endpointInfo = control.createMock(EndpointInfo.class);
         target = getEPR("bar/foo");
         connectionFactory = control.createMock(URLConnectionFactory.class);
-        config = control.createMock(HTTPConduitConfiguration.class);
-        config.getAddress();
+        endpointInfo.getAddress();
         EasyMock.expectLastCall().andReturn(NOWHERE + "bar/foo").times(2);
         if (send) {
-            proxy = control.createMock(Proxy.class);
-            config.getProxy();
-            EasyMock.expectLastCall().andReturn(proxy);
+            //proxy = control.createMock(Proxy.class);
+            proxy =  null;
             connection =
                 control.createMock(httpConnection ? HttpURLConnection.class : URLConnection.class);
             connectionFactory.createConnection(
@@ -185,26 +178,17 @@
                 ((HttpURLConnection)connection).setRequestMethod("POST");
             }
             
-            policy = new HTTPClientPolicy();
-            config.getPolicy();
-            EasyMock.expectLastCall().andReturn(policy).times(2);
-            policy.setConnectionTimeout(303030);
             connection.setConnectTimeout(303030);
             EasyMock.expectLastCall();
-            policy.setReceiveTimeout(404040);
             connection.setReadTimeout(404040);
             EasyMock.expectLastCall();
             connection.setUseCaches(false);
             EasyMock.expectLastCall();
 
             if (httpConnection) {
-                config.getPolicy();
-                EasyMock.expectLastCall().andReturn(policy).times(2);
-                policy.setAutoRedirect(autoRedirect);
                 ((HttpURLConnection)connection).setInstanceFollowRedirects(autoRedirect);
                 EasyMock.expectLastCall();
                 if (!autoRedirect) {
-                    policy.setAllowChunking(true);
                     ((HttpURLConnection)connection).setChunkedStreamingMode(2048);
                     EasyMock.expectLastCall();
                 }
@@ -222,8 +206,28 @@
                                               endpointInfo,
                                               null,
                                               connectionFactory,
-                                              decoupledEngine,
-                                              config);
+                                              decoupledEngine);
+
+        if (send) {
+            conduit.getClient().setConnectionTimeout(303030);
+            conduit.getClient().setReceiveTimeout(404040);
+            if (httpConnection) {
+                conduit.getClient().setAutoRedirect(autoRedirect);
+                if (!autoRedirect) {
+                    conduit.getClient().setAllowChunking(true);
+                } 
+            }
+        }
+
+        if (decoupled) {
+            URL decoupledURL = null;
+            if (decoupled) {
+                decoupledURL = new URL(NOWHERE + "response");
+                conduit.getClient().setDecoupledEndpoint(decoupledURL.toString());
+            } 
+        }
+       
+
         observer = new MessageObserver() {
             public void onMessage(Message m) {
                 inMessage = m;
@@ -261,13 +265,9 @@
         os.write(PAYLOAD.getBytes(), 0, PAYLOAD.length());
         EasyMock.expectLastCall();
 
-        config.getPolicy();
-        EasyMock.expectLastCall().andReturn(policy).times(decoupled ? 2 : 1);
-
         URL decoupledURL = null;
         if (decoupled) {
             decoupledURL = new URL(NOWHERE + "response");
-            policy.setDecoupledEndpoint(decoupledURL.toString());
         } 
         
         os.flush();

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=448255&r1=448254&r2=448255
==============================================================================
--- 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 Wed Sep 20 09:23:41 2006
@@ -73,7 +73,6 @@
     private EndpointReferenceType address;
     private EndpointReferenceType replyTo;
     private ServerEngine engine;
-    private HTTPDestinationConfiguration config;
     private HTTPServerPolicy policy;
     private JettyHTTPDestination destination;
     private TestHttpRequest request;
@@ -99,7 +98,6 @@
         address = null;
         replyTo = null;
         engine = null;
-        config = null;
         request = null;
         response = null;
         inMessage = null;
@@ -246,23 +244,19 @@
         conduitInitiator = control.createMock(ConduitInitiator.class);
         endpointInfo = control.createMock(EndpointInfo.class);
         engine = control.createMock(ServerEngine.class);
-        config = control.createMock(HTTPDestinationConfiguration.class);
-        config.getAddress();
+        endpointInfo.getAddress();
         EasyMock.expectLastCall().andReturn(NOWHERE + "bar/foo").times(3);
        
-        config.contextMatchOnStem();
-        EasyMock.expectLastCall().andReturn(contextMatchOnStem);
         engine.addServant(EasyMock.eq(new URL(NOWHERE + "bar/foo")),
                           EasyMock.isA(AbstractHttpHandler.class));
         
-        policy = new HTTPServerPolicy();   
         control.replay();
         
         JettyHTTPDestination dest = new JettyHTTPDestination(bus,
                                                              conduitInitiator,
                                                              endpointInfo,
-                                                             engine,
-                                                             config);
+                                                             engine);
+        policy = dest.getServer();
         observer = new MessageObserver() {
             public void onMessage(Message m) {
                 inMessage = m;
@@ -320,13 +314,8 @@
         request = new TestHttpRequest(method, is, "bar/foo", query);
         response = new TestHttpResponse(os);
         
-        config.getPolicy();
-        EasyMock.expectLastCall().andReturn(policy);
-
         if (setRedirectURL) {
             policy.setRedirectURL(NOWHERE + "foo/bar");
-            config.getPolicy();
-            EasyMock.expectLastCall().andReturn(policy);
             //response.sendRedirect(EasyMock.eq(NOWHERE + "foo/bar"));
             //EasyMock.expectLastCall();
             //response.commit();

Modified: incubator/cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/pom.xml?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/pom.xml (original)
+++ incubator/cxf/trunk/rt/transports/jms/pom.xml Wed Sep 20 09:23:41 2006
@@ -191,4 +191,92 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-common-xsd</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                            <xsdOptions>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+                                    <deleteDirs>
+                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                    </deleteDirs>
+                                </xsdOption>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/jms-conf.xsd</xsd>
+                                </xsdOption>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/jms-context.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms-context.xjb</bindingFile>
+                                </xsdOption>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/configuration/jms-conduit.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+                                    <extension>true</extension>
+                                    <extensionArgs>
+                                        <extensionArg>-Xcfg</extensionArg>
+                                    </extensionArgs>
+                                    <deleteDirs>
+                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                    </deleteDirs>
+                                </xsdOption>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/configuration/jms-destination.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+                                    <extension>true</extension>
+                                    <extensionArgs>
+                                        <extensionArg>-Xcfg</extensionArg>
+                                    </extensionArgs>
+                                    <deleteDirs>
+                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                    </deleteDirs>
+                                </xsdOption>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/configuration/jms-transport-base.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+                                    <extension>true</extension>
+                                    <extensionArgs>
+                                        <extensionArg>-Xcfg</extensionArg>
+                                    </extensionArgs>
+                                    <deleteDirs>
+                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                    </deleteDirs>
+                                </xsdOption>
+                            </xsdOptions>
+                        </configuration>
+                        <goals>
+                            <goal>xsdtojava</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-tools-xjc-cfg</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-tools-xjc-dv</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-common-utilities</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java Wed Sep 20 09:23:41 2006
@@ -25,6 +25,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -39,6 +41,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.ConfigurationProvider;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -47,57 +50,41 @@
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
-
-
+import org.apache.cxf.transport.jms.conduit.JMSConduitConfigBean;
+import org.apache.cxf.transports.jms.JMSClientBehaviorPolicyType;
 import org.apache.cxf.transports.jms.context.JMSMessageHeadersType;
-import org.apache.cxf.transports.jms.jms_conf.JMSSessionPoolConfigPolicy;
+import org.apache.cxf.transports.jms.jms_conf.JMSClientConfig;
+
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 
 public class JMSConduit extends JMSTransportBase implements Conduit {
     private static final Logger LOG = LogUtils.getL7dLogger(JMSConduit.class);
     
       
-    protected JMSSessionPoolConfigPolicy sessionPoolConfig;    
-    protected JMSConduitConfiguration jmsCondConf;   
+    protected JMSConduitConfigBean jmsConduitConfigBean;   
     
     private MessageObserver incomingObserver;
     private EndpointReferenceType target;
    
-    private boolean textPayload;    
-    
     public JMSConduit(Bus b, EndpointInfo endpointInfo) {
         this(b, endpointInfo, null);
     }
     
     public JMSConduit(Bus b,
                       EndpointInfo endpointInfo,
-                      EndpointReferenceType target) {
-        this(b, endpointInfo, target, 
-             new JMSConduitConfiguration(b, endpointInfo));
-    }
-    
-    public JMSConduit(Bus b,
-                      EndpointInfo endpointInfo,
-                      EndpointReferenceType target,
-                      JMSConduitConfiguration conf) {           
-        super(b, endpointInfo, false, conf);        
-        jmsCondConf = conf;          
-        queueDestinationStyle =
-            JMSConstants.JMS_QUEUE.equals(jmsAddressPolicy.getDestinationStyle().value());
-        jmsAddressPolicy = conf.getJmsAddressDetails();
-        textPayload = 
-            JMSConstants.TEXT_MESSAGE_TYPE.equals(
-                jmsCondConf.getJMSClientBehaviorPolicy().getMessageType().value());
-        
+                      EndpointReferenceType target) {           
+        super(b, endpointInfo, false);        
+
+        initConfig();
     } 
-     
-    // perpare the message for send out , not actually send out the message
+
+    // prepare the message for send out , not actually send out the message
     public void send(Message message) throws IOException {        
         LOG.log(Level.FINE, "JMSConduit send message");
 
         try {
             if (null == sessionFactory) {
-                JMSProviderHub.connect(this);
+                JMSProviderHub.connect(this, null);
             }
         } catch (JMSException jmsex) {
             LOG.log(Level.WARNING, "JMS connect failed with JMSException : ", jmsex);            
@@ -174,7 +161,7 @@
         
         Object result = null;
         
-        long timeout = jmsCondConf.getClientConfiguration().getClientReceiveTimeout();
+        long timeout = jmsConduitConfigBean.getClientConfig().getClientReceiveTimeout();
 
         Long receiveTimeout = (Long)outMessage.get(JMSConstants.JMS_CLIENT_RECEIVE_TIMEOUT);
 
@@ -200,6 +187,41 @@
             
         }
     }
+
+    private void initConfig() {
+        JMSConduitConfigBean bean = new JMSConduitConfigBean();
+        if (!bean.isSetClient()) {
+            bean.setClient(new JMSClientBehaviorPolicyType());
+        }
+        if (!bean.isSetClientConfig()) {
+            bean.setClientConfig(new JMSClientConfig());
+        }
+
+        ConfigurationProvider p = new ServiceModelJMSConfigurationProvider(endpointInfo);
+        List<ConfigurationProvider> providers = getOverwriteProviders();
+        if (null == providers) {
+            providers = new ArrayList<ConfigurationProvider>();
+        }
+        providers.add(p);
+        setOverwriteProviders(providers);
+        
+        // providers = bean.getFallbackProviders();
+        providers = bean.getOverwriteProviders();
+        if (null == providers) {
+            providers = new ArrayList<ConfigurationProvider>();
+        }
+        providers.add(p);
+        // bean.setFallbackProviders(providers);
+        bean.setOverwriteProviders(providers);
+
+        jmsConduitConfigBean = bean;
+
+    }
+
+    private boolean isTextPayload() {
+        return JMSConstants.TEXT_MESSAGE_TYPE.equals(
+            jmsConduitConfigBean.getClient().getMessageType().value());
+    }
     
     private class JMSOutputStream extends AbstractCachedOutputStream {
         private Message outMessage;
@@ -237,7 +259,7 @@
         private void commitOutputMessage() throws JMSException {
             Object request = null;            
             
-            if (textPayload) {
+            if (isTextPayload()) {
                 request = currentStream.toString();
             } else {
                 request = ((ByteArrayOutputStream)currentStream).toByteArray();
@@ -252,12 +274,12 @@
             //We don't want to send temp queue in
             //replyTo header for oneway calls
             if (isOneWay
-                && (jmsAddressPolicy.getJndiReplyDestinationName() == null)) {
+                && (getAddressPolicy().getJndiReplyDestinationName() == null)) {
                 replyTo = null;
             }
 
             jmsMessage = marshal(request, pooledSession.session(), replyTo,
-                jmsCondConf.getJMSClientBehaviorPolicy().getMessageType().value());
+                jmsConduitConfigBean.getClient().getMessageType().value());
             
             JMSMessageHeadersType headers =
                 (JMSMessageHeadersType)outMessage.get(JMSConstants.JMS_CLIENT_REQUEST_HEADERS);
@@ -267,7 +289,7 @@
             String correlationID = getCorrelationId(headers);
             long ttl = getTimeToLive(headers);
             if (ttl <= 0) {
-                ttl = jmsCondConf.getClientConfiguration().getMessageTimeToLive();
+                ttl = jmsConduitConfigBean.getClientConfig().getMessageTimeToLive();
             }
             
             setMessageProperties(headers, jmsMessage);           
@@ -295,7 +317,7 @@
 
             LOG.log(Level.FINE, "client sending request: ",  jmsMessage);
             //getting  Destination Style
-            if (queueDestinationStyle) {
+            if (isDestinationStyleQueue()) {
                 QueueSender sender = (QueueSender)pooledSession.producer();
                 sender.setTimeToLive(ttl);
                 sender.send((Queue)targetDestination, jmsMessage, deliveryMode, priority, ttl);
@@ -378,6 +400,5 @@
             return decoupledMessageObserver;
         }
     }     
-   
- 
+
 }

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java Wed Sep 20 09:23:41 2006
@@ -27,8 +27,10 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
+import java.util.List;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
 import java.util.concurrent.Executor;
@@ -46,6 +48,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.ConfigurationProvider;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.model.EndpointInfo;
@@ -54,7 +57,10 @@
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.jms.destination.JMSDestinationConfigBean;
+import org.apache.cxf.transports.jms.JMSServerBehaviorPolicyType;
 import org.apache.cxf.transports.jms.context.JMSMessageHeadersType;
+import org.apache.cxf.transports.jms.jms_conf.JMSServerConfig;
 import org.apache.cxf.workqueue.WorkQueueManager;
 import org.apache.cxf.ws.addressing.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
@@ -66,34 +72,24 @@
     final EndpointInfo endpointInfo;
     final EndpointReferenceType reference;
     final ConduitInitiator conduitInitiator;
-    final JMSDestinationConfiguration jmsDestConfig;
+    JMSDestinationConfigBean jmsDestinationConfigBean;
     PooledSession listenerSession;
     JMSListenerThread listenerThread;
     MessageObserver incomingObserver;
     
     public JMSDestination(Bus b,
                           ConduitInitiator ci,
-                          EndpointInfo endpointInfo) throws IOException {
-        this(b, ci, endpointInfo, new JMSDestinationConfiguration(b, endpointInfo));
-    }
-    
-    public JMSDestination(Bus b,
-                          ConduitInitiator ci,
-                          EndpointInfo info,
-                          JMSDestinationConfiguration cfg) throws IOException {
-        super(b, info, true, cfg);
+                          EndpointInfo info) throws IOException {
+        super(b, info, true);
         endpointInfo = info;
+        initConfig();
         conduitInitiator = ci;
-        jmsDestConfig = cfg;        
         reference = new EndpointReferenceType();
         AttributedURIType address = new AttributedURIType();
-        address.setValue(jmsDestConfig.getAddress());
+        address.setValue(endpointInfo.getAddress());
         reference.setAddress(address);        
     }
     
-    public final JMSDestinationConfiguration getJMSDestinationConfiguration() {
-        return jmsDestConfig;
-    }
     public EndpointReferenceType getAddress() {       
         return reference;
     }
@@ -157,7 +153,7 @@
 
         try {
             LOG.log(Level.FINE, "establishing JMS connection");
-            JMSProviderHub.connect(this);
+            JMSProviderHub.connect(this, jmsDestinationConfigBean);
             //Get a non-pooled session. 
             listenerSession = sessionFactory.get(targetDestination);
             listenerThread = new JMSListenerThread(listenerSession, this);
@@ -217,7 +213,7 @@
         
         if (correlationID == null
             || "".equals(correlationID)
-            && jmsDestConfig.getJMSServerBehaviorPolicy().isUseMessageIDAsCorrelationID()) {
+            && jmsDestinationConfigBean.getServer().isUseMessageIDAsCorrelationID()) {
             correlationID = request.getJMSMessageID();
         }
     
@@ -263,6 +259,33 @@
         } 
     }
     
+    private void initConfig() {
+        JMSDestinationConfigBean bean = new JMSDestinationConfigBean();
+        if (!bean.isSetServer()) {
+            bean.setServer(new JMSServerBehaviorPolicyType());
+        }
+        if (!bean.isSetServerConfig()) {
+            bean.setServerConfig(new JMSServerConfig());
+        }
+        
+        ConfigurationProvider p = new ServiceModelJMSConfigurationProvider(endpointInfo);
+        List<ConfigurationProvider> providers = getOverwriteProviders();
+        if (null == providers) {
+            providers = new ArrayList<ConfigurationProvider>();
+        }
+        providers.add(p);
+        setOverwriteProviders(providers);
+        
+        providers = bean.getOverwriteProviders();
+        if (null == providers) {
+            providers = new ArrayList<ConfigurationProvider>();
+        }
+        providers.add(p);
+        bean.setOverwriteProviders(providers);
+
+        jmsDestinationConfigBean = bean;
+    }
+
     class JMSListenerThread extends Thread {
         final JMSDestination jmsDestination;
         private final PooledSession listenSession;
@@ -434,7 +457,7 @@
             
             PooledSession replySession = null;          
             
-            if (jmsDestination.queueDestinationStyle) {
+            if (jmsDestination.isDestinationStyleQueue()) {
                 try {
                     //setup the reply message                
                     replyTo = getReplyToDestination(inMessage);
@@ -507,7 +530,7 @@
             long ttl = getTimeToLive(headers);
             
             if (ttl <= 0) {
-                ttl = jmsDestConfig.getServerConfiguration().getMessageTimeToLive();
+                ttl = jmsDestinationConfigBean.getServerConfig().getMessageTimeToLive();
             }
             
             long timeToLive = 0;

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java Wed Sep 20 09:23:41 2006
@@ -27,6 +27,7 @@
 import javax.naming.Context;
 import javax.naming.NamingException;
 
+import org.apache.cxf.transport.jms.destination.JMSDestinationConfigBean;
 import org.apache.cxf.transports.jms.JMSAddressPolicyType;
 
 
@@ -60,8 +61,11 @@
     }
 
   
-    protected static void connect(JMSTransportBase jmsTransport) throws JMSException, NamingException {
-        JMSAddressPolicyType  addrDetails = jmsTransport.getJmsAddressDetails();
+    protected static void connect(JMSTransportBase jmsTransport,
+                                  JMSDestinationConfigBean jmsDestConfigBean)
+        throws JMSException, NamingException {
+
+        JMSAddressPolicyType  addrDetails = jmsTransport.getAddressPolicy();
       
         // get JMS connection resources and destination
         //
@@ -88,10 +92,8 @@
             }
         }
         
-        if (jmsTransport instanceof JMSDestination) {
-            String clientID = null;
-            clientID = ((JMSDestination) jmsTransport).getJMSDestinationConfiguration().
-                getServerConfiguration().getDurableSubscriptionClientId();
+        if (null != jmsDestConfigBean) {
+            String clientID = jmsDestConfigBean.getServerConfig().getDurableSubscriptionClientId();
             
             if  (clientID != null) {
                 connection.setClientID(clientID);
@@ -112,8 +114,9 @@
         JMSSessionFactory sf =
             new JMSSessionFactory(connection,
                                   replyDestination,
-                                  jmsTransport.getJMSConfiguration(),
-                                  context);
+                                  context,
+                                  jmsTransport,
+                                  jmsDestConfigBean);
 
         // notify transport that connection is complete        
         jmsTransport.connected(requestDestination, replyDestination, sf);

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSSessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSSessionFactory.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSSessionFactory.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSSessionFactory.java Wed Sep 20 09:23:41 2006
@@ -42,8 +42,8 @@
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.AbstractTwoStageCache;
-import org.apache.cxf.transports.jms.JMSAddressPolicyType;
-import org.apache.cxf.transports.jms.JMSServerBehaviorPolicyType;
+import org.apache.cxf.transport.jms.base.JMSTransportBaseConfigBean;
+import org.apache.cxf.transport.jms.destination.JMSDestinationConfigBean;
 import org.apache.cxf.transports.jms.jms_conf.JMSSessionPoolConfigPolicy;
 
 
@@ -115,11 +115,9 @@
     private AbstractTwoStageCache<PooledSession> replyCapableSessionCache;
     private AbstractTwoStageCache<PooledSession> sendOnlySessionCache;
     private final Destination theReplyDestination;
-    private final boolean isQueueConnection;
+    private final JMSTransportBaseConfigBean jmsBaseConfigBean;
+    private final JMSDestinationConfigBean jmsDestConfigBean;
  
-    private final  JMSAddressPolicyType addressExtensor;
-    private final  JMSServerBehaviorPolicyType jmsServerPolicy;
-
     /**
      * Constructor.
      *
@@ -127,31 +125,25 @@
      */
     public JMSSessionFactory(Connection connection, 
                              Destination replyDestination,
-                             JMSConfiguration jmsConfiguration,
-                             Context context) {
+                             Context context,
+                             JMSTransportBaseConfigBean tbb,
+                             JMSDestinationConfigBean db) {
         theConnection = connection;
         theReplyDestination = replyDestination;
-        addressExtensor = jmsConfiguration.getJmsAddressDetails();
-        
-        // if the jmsConduit is client then retrun null
-        if (jmsConfiguration instanceof JMSDestinationConfiguration) {
-            jmsServerPolicy = ((JMSDestinationConfiguration)jmsConfiguration).getJMSServerBehaviorPolicy();
-        } else {
-            jmsServerPolicy = null;
-        }
-       
+        initialContext = context;
+        jmsBaseConfigBean = tbb;
+        jmsDestConfigBean = db;
         
-        JMSSessionPoolConfigPolicy sessionPoolConfig = jmsConfiguration.getSessionPoolConfig();
+        JMSSessionPoolConfigPolicy sessionPoolConfig = jmsBaseConfigBean.getSessionPoolConfig();
         
         lowWaterMark = sessionPoolConfig.getLowWaterMark();
         highWaterMark = sessionPoolConfig.getHighWaterMark();
          
-        isQueueConnection = addressExtensor.getDestinationStyle().value().equals(JMSConstants.JMS_QUEUE);
-        initialContext = context;
 
         // create session caches (REVISIT sizes should be configurable)
         //
-        if (isQueueConnection) {
+
+        if (isDestinationStyleQueue()) {
             // the reply capable cache is only required in the point-to-point
             // domain
             //
@@ -327,7 +319,7 @@
         // the destination is only specified on the server receive side,
         // in which case a new session is always created
         //
-        if (isQueueConnection) {
+        if (isDestinationStyleQueue()) {
             ret = createPointToPointServerSession(destination);
         } else {
             ret = createPubSubSession(false, true, destination);
@@ -456,7 +448,7 @@
         
         return new PooledSession(session, destination, session.createSender(null),
                                  session.createReceiver((Queue)destination, 
-                                 jmsServerPolicy.getMessageSelector()));
+                                 jmsDestConfigBean.getServer().getMessageSelector()));
     }
 
 
@@ -475,8 +467,8 @@
                                                                                    Session.AUTO_ACKNOWLEDGE);
         TopicSubscriber sub = null;
         if (consumer) {
-            String messageSelector =  jmsServerPolicy.getMessageSelector();
-            String durableName = jmsServerPolicy.getDurableSubscriberName();
+            String messageSelector =  jmsDestConfigBean.getServer().getMessageSelector();
+            String durableName = jmsDestConfigBean.getServer().getDurableSubscriberName();
             if (durableName != null) {
                 sub = session.createDurableSubscriber((Topic)destination,
                                                       durableName,
@@ -509,5 +501,10 @@
         return host + "_" 
             + System.getProperty("user.name") + "_" 
             + obj + time;    
+    }
+
+    private boolean isDestinationStyleQueue() {
+        return JMSConstants.JMS_QUEUE.equals(
+            jmsBaseConfigBean.getAddressPolicy().getDestinationStyle().value());
     }
 }

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java Wed Sep 20 09:23:41 2006
@@ -32,43 +32,35 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.jms.base.JMSTransportBaseConfigBean;
 import org.apache.cxf.transports.jms.JMSAddressPolicyType;
 import org.apache.cxf.transports.jms.context.JMSMessageHeadersType;
 import org.apache.cxf.transports.jms.context.JMSPropertyType;
+import org.apache.cxf.transports.jms.jms_conf.JMSSessionPoolConfigPolicy;
 
 
-public class JMSTransportBase {    
+public class JMSTransportBase extends JMSTransportBaseConfigBean {    
     
-    protected boolean queueDestinationStyle;
     protected Destination targetDestination;
     protected Destination replyDestination;
     protected JMSSessionFactory sessionFactory;    
-    protected JMSAddressPolicyType jmsAddressPolicy;
     protected Bus bus;
-    protected JMSConfiguration jmsConf;
     //protected EndpointReferenceType targetEndpoint;
     protected EndpointInfo endpointInfo;
     
     
     //--Constructors------------------------------------------------------------
-    public JMSTransportBase(Bus b, EndpointInfo endpoint, boolean isServer, JMSConfiguration conf) {
+    public JMSTransportBase(Bus b, EndpointInfo endpoint, boolean isServer) {
         bus = b;
-        jmsConf = conf;
-        jmsAddressPolicy = jmsConf.getJmsAddressDetails();
-        //sessionPoolConfig = getSessionPoolPolicy(configuration);
         endpointInfo = endpoint;
-        queueDestinationStyle =
-            JMSConstants.JMS_QUEUE.equals(jmsAddressPolicy.getDestinationStyle().value());
+        if (!isSetSessionPoolConfig()) {
+            setSessionPoolConfig(new JMSSessionPoolConfigPolicy());
+        }
+        if (!isSetAddressPolicy()) {
+            setAddressPolicy(new JMSAddressPolicyType());
+        }
     }
 
-    public final JMSAddressPolicyType  getJmsAddressDetails() {
-        return jmsAddressPolicy;
-    }
-    
-    public final JMSConfiguration getJMSConfiguration() {
-        return jmsConf;
-    }
-    
     /**
      * Callback from the JMSProviderHub indicating the ClientTransport has
      * been sucessfully connected.
@@ -212,6 +204,7 @@
     }
     
     protected String getAddrUriFromJMSAddrPolicy() {
+        JMSAddressPolicyType jmsAddressPolicy = getAddressPolicy();
         return "jms:" 
                         + jmsAddressPolicy.getJndiConnectionFactoryName() 
                         + "#"
@@ -219,10 +212,15 @@
     }
     
     protected String getReplyTotAddrUriFromJMSAddrPolicy() {
+        JMSAddressPolicyType jmsAddressPolicy = getAddressPolicy();
         return "jms:" 
                         + jmsAddressPolicy.getJndiConnectionFactoryName() 
                         + "#"
                         + jmsAddressPolicy.getJndiReplyDestinationName();
     }
 
+    protected boolean isDestinationStyleQueue() {
+        return JMSConstants.JMS_QUEUE.equals(
+            getAddressPolicy().getDestinationStyle().value());
+    }
 }

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ServiceModelJMSConfigurationProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ServiceModelJMSConfigurationProvider.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ServiceModelJMSConfigurationProvider.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ServiceModelJMSConfigurationProvider.java Wed Sep 20 09:23:41 2006
@@ -20,7 +20,7 @@
 package org.apache.cxf.transport.jms;
 
 
-import org.apache.cxf.oldcfg.ConfigurationProvider;
+import org.apache.cxf.configuration.ConfigurationProvider;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transports.jms.JMSAddressPolicyType;
 import org.apache.cxf.transports.jms.JMSClientBehaviorPolicyType;
@@ -36,20 +36,20 @@
     }
     
     public Object getObject(String name) {
-             
+
         if (null == info) {
             return null;
         }
 
-        if ("jmsServer".equals(name)) {
+        if ("server".equals(name)) {
             return info.getExtensor(JMSServerBehaviorPolicyType.class);
         }
         
-        if ("jmsClient".equals(name)) {
+        if ("client".equals(name)) {
             return info.getExtensor(JMSClientBehaviorPolicyType.class);
         }
         
-        if ("jmsAddress".equals(name)) {            
+        if ("addressPolicy".equals(name)) {            
             return info.getExtensor(JMSAddressPolicyType.class);
         }
 

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/jms/conduit" 
+           xmlns:tns="http://cxf.apache.org/transport/jms/conduit"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:jms="http://cxf.apache.org/transports/jms"
+           xmlns:jms-conf="http://cxf.apache.org/transports/jms/jms-conf"
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/jms" schemaLocation="../wsdl/jms.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/transports/jms/jms-conf" schemaLocation="../wsdl/jms-conf.xsd"/>
+
+    <xs:element name="clientConfig" type="jms-conf:JMSClientConfig"/>
+    <xs:element name="client" type="jms:JMSClientBehaviorPolicyType"/>
+
+    <xs:complexType name="JMSConduitConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:clientConfig" minOccurs="0"/>
+            <xs:element ref="tns:client" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/jms/destination" 
+           xmlns:tns="http://cxf.apache.org/transport/jms/destination"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:jms="http://cxf.apache.org/transports/jms"
+           xmlns:jms-conf="http://cxf.apache.org/transports/jms/jms-conf"
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/jms" schemaLocation="../wsdl/jms.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/transports/jms/jms-conf" schemaLocation="../wsdl/jms-conf.xsd"/>
+
+    <xs:element name="serverConfig" type="jms-conf:JMSServerConfig"/>
+    <xs:element name="server" type="jms:JMSServerBehaviorPolicyType"/>
+
+    <xs:complexType name="JMSDestinationConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:serverConfig" minOccurs="0"/>
+            <xs:element ref="tns:server" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd Wed Sep 20 09:23:41 2006
@@ -0,0 +1,51 @@
+<?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.
+-->
+
+<xs:schema targetNamespace="http://cxf.apache.org/transport/jms/base" 
+           xmlns:tns="http://cxf.apache.org/transport/jms/base"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:jms="http://cxf.apache.org/transports/jms"
+           xmlns:jms-conf="http://cxf.apache.org/transports/jms/jms-conf"
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           xmlns:cfg="http://cxf.apache.org/configuration/cfg"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           jaxb:extensionBindingPrefixes="cfg"
+           jaxb:version="2.0">
+
+    <xs:import namespace="http://cxf.apache.org/transports/jms" schemaLocation="../wsdl/jms.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/transports/jms/jms-conf" schemaLocation="../wsdl/jms-conf.xsd"/>
+
+    <xs:element name="sessionPoolConfig" type="jms-conf:JMSSessionPoolConfigPolicy"/>
+    <xs:element name="addressPolicy" type="jms:JMSAddressPolicyType"/>
+
+    <xs:complexType name="JMSTransportBaseConfigBean">        
+        <xs:annotation>
+            <xs:appinfo>                
+                <cfg:configurable/>
+            </xs:appinfo>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element ref="tns:sessionPoolConfig" minOccurs="0"/>
+            <xs:element ref="tns:addressPolicy" minOccurs="0"/>
+        </xs:sequence>
+    </xs:complexType>
+
+ </xs:schema>



Mime
View raw message