cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r713355 [2/5] - in /cxf/sandbox/2.2.x-continuations: ./ api/ api/src/ api/src/main/ api/src/main/java/ api/src/main/java/org/ api/src/main/java/org/apache/ api/src/main/java/org/apache/cxf/ api/src/main/java/org/apache/cxf/continuations/ rt...
Date Wed, 12 Nov 2008 12:42:49 GMT
Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,74 @@
+/**
+ * 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 org.apache.cxf.service.invoker;
+
+import java.lang.reflect.Modifier;
+import java.util.ResourceBundle;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.injection.ResourceInjector;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.resource.ResourceManager;
+
+/**
+ * Creates a new instance of the service object for each call to create().
+ */
+public class PerRequestFactory implements Factory {
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(PerRequestFactory.class);
+
+    private final Class svcClass;
+
+    public PerRequestFactory(final Class svcClass) {
+        super();
+        this.svcClass = svcClass;
+    }
+
+    public Object create(Exchange ex) throws Throwable {
+        try {
+            if (svcClass.isInterface()) {
+                throw new Fault(new Message("SVC_CLASS_IS_INTERFACE", BUNDLE, svcClass.getName()));
+            }
+
+            if (Modifier.isAbstract(svcClass.getModifiers())) {
+                throw new Fault(new Message("SVC_CLASS_IS_ABSTRACT", BUNDLE, svcClass.getName()));
+            }
+            Object o = svcClass.newInstance();
+            Bus b = ex.get(Bus.class);
+            ResourceManager resourceManager = b.getExtension(ResourceManager.class);
+            if (resourceManager != null) {
+                ResourceInjector injector = new ResourceInjector(resourceManager);
+                injector.inject(o);
+                injector.construct(o);
+            }
+            return o;
+        } catch (InstantiationException e) {
+            throw new Fault(new Message("COULD_NOT_INSTANTIATE", BUNDLE), e);
+        } catch (IllegalAccessException e) {
+            throw new Fault(new Message("ILLEGAL_ACCESS", BUNDLE), e);
+        }
+    }
+
+    public void release(Exchange ex, Object o) {
+        //nothing to do
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PerRequestFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,114 @@
+/**
+ * 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 org.apache.cxf.service.invoker;
+
+import java.util.Collection;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+
+import org.apache.cxf.message.Exchange;
+
+/**
+ * Factory the maintains a pool of instances that are used.
+ * 
+ * Can optionally create more instances than the size of the queue
+ */
+public class PooledFactory implements Factory {
+    BlockingQueue<Object> pool;
+    Factory factory;
+    int count;
+    int max;
+    boolean createMore;
+
+    /**
+     * Pool of instances of the svcClass
+     * @param svcClass the class to create
+     * @param max the absolute maximum number to create and pool
+     */
+    public PooledFactory(final Class svcClass, int max) {
+        this(new PerRequestFactory(svcClass), max, false);
+    }
+    /**
+     * Pool of instances contructed from the given factory
+     * @param factory
+     * @param max the absolute maximum number to create and pool
+     */
+    public PooledFactory(final Factory factory, int max) {
+        this(factory, max, false);
+    }
+
+    /**
+     * Pool of instances contructed from the given factory
+     * @param factory
+     * @param max the absolute maximum number to create and pool
+     * @param createMore If the pool is empty, but max objects have already 
+     * been constructed, should more be constructed on a per-request basis (and 
+     * then discarded when done) or should requests block until instances are 
+     * released back into the pool. 
+     */
+    public PooledFactory(final Factory factory, int max, boolean createMore) {
+        this.factory = factory;
+        if (max < 1) {
+            max = 16;
+        }
+        pool = new ArrayBlockingQueue<Object>(max, true);
+        this.max = max;
+        this.count = 0;
+        this.createMore = createMore;
+    }
+    
+    /**
+     * Pool constructed from the give Collection of objects. 
+     * @param objs The collection of objects to pre-polulate the pool
+     */
+    public PooledFactory(Collection<Object> objs) {
+        pool = new ArrayBlockingQueue<Object>(objs.size(), true);
+        pool.addAll(objs);
+    }
+
+    /** {@inheritDoc}*/
+    public Object create(Exchange ex) throws Throwable {
+        if (factory == null 
+            || ((count >= max) && !createMore)) {
+            return pool.take();
+        }
+        Object o = pool.poll();
+        if (o == null) {
+            return createObject(ex);
+        }
+        return o;
+    }
+    protected synchronized Object createObject(Exchange e) throws Throwable {
+        //recheck the count/max stuff now that we're in a sync block
+        if (factory == null 
+            || ((count >= max) && !createMore)) {
+            return pool.take();
+        }
+        
+        count++;
+        return factory.create(e);        
+    }
+
+    /** {@inheritDoc}*/
+    public void release(Exchange ex, Object o) {
+        pool.offer(o);
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/PooledFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,59 @@
+/**
+ * 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 org.apache.cxf.service.invoker;
+
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.service.Service;
+
+/**
+ * Creates a new instance for each session.
+ * 
+ * This may have restrictions on what the bean can look like.   For example, 
+ * some session implementations require the beans to be Serializable
+ */
+public class SessionFactory implements Factory {
+    Factory factory;
+    public SessionFactory(Class<?> svcClass) {
+        this(new PerRequestFactory(svcClass));
+    }
+    public SessionFactory(Factory f) {
+        factory = f;
+    }
+
+    /** {@inheritDoc}*/
+    public Object create(Exchange e) throws Throwable {
+        Service serv = e.get(Service.class);
+        Object o = null;
+        synchronized (serv) {
+            o = e.getSession().get(serv.getName());
+            if (o == null) {
+                o = factory.create(e);
+                e.getSession().put(serv.getName(), o);
+            }
+        }
+        return o;
+    }
+
+    /** {@inheritDoc}*/
+    public void release(Exchange e, Object o) {
+        //nothing
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SessionFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,61 @@
+/**
+ * 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 org.apache.cxf.service.invoker;
+
+import org.apache.cxf.message.Exchange;
+
+/**
+ * Always returns a single instance of the bean.
+ * 
+ * This is generally the default.
+ */
+public class SingletonFactory implements Factory {
+    Object bean;
+    Factory factory;
+    public SingletonFactory(final Object bean) {
+        this.bean = bean;
+    }
+    public SingletonFactory(final Class<?> beanClass) {
+        this.factory = new PerRequestFactory(beanClass);
+    }
+    public SingletonFactory(final Factory f) {
+        this.factory = f;
+    }
+
+    /** {@inheritDoc}*/
+    public Object create(Exchange ex) throws Throwable {
+        if (bean == null && factory != null) {
+            createBean(ex);
+        }
+        return bean;
+    }
+
+    private synchronized void createBean(Exchange e) throws Throwable {
+        if (bean == null) {
+            bean = factory.create(e);
+        }
+    }
+    
+    /** {@inheritDoc}*/
+    public void release(Exchange ex, Object o) {
+        //nothing to do
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SingletonFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,58 @@
+/**
+ * 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 org.apache.cxf.service.invoker;
+
+import org.apache.cxf.message.Exchange;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+/**
+ * Factory that will query the Spring ApplicationContext for the 
+ * appropriate bean for each request.
+ * 
+ * This can be expensive.  If the bean is "prototype" or similar such that a 
+ * new instance is created each time, this could slow things down.  In that 
+ * case, it's recommended to use this in conjunction with the PooledFactory
+ * to pool the beans or the SessionFactory or similar.
+ */
+public class SpringBeanFactory implements Factory, ApplicationContextAware {
+    ApplicationContext ctx;
+    String beanName;
+    
+    public SpringBeanFactory(String name) {
+        beanName = name;
+    }
+    
+    /** {@inheritDoc}*/
+    public Object create(Exchange e) throws Throwable {
+        return ctx.getBean(beanName);
+    }
+
+    /** {@inheritDoc}*/
+    public void release(Exchange e, Object o) {
+        //nothing
+    }
+
+    public void setApplicationContext(ApplicationContext arg0) throws BeansException {
+        ctx = arg0;
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/service/invoker/SpringBeanFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,89 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.cxf.message.Message;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+
+/**
+ * Abstract base class factoring out common Conduit logic,
+ * allowing non-decoupled transports to be written without any
+ * regard for the decoupled back-channel or partial response logic.
+ */
+public abstract class AbstractConduit 
+    extends AbstractObservable implements Conduit {
+
+    protected final EndpointReferenceType target;
+
+    public AbstractConduit(EndpointReferenceType t) {
+        target = t;
+    }
+
+    /**
+     * @return the reference associated with the target Destination
+     */    
+    public EndpointReferenceType getTarget() {
+        return target;
+    }
+
+    /**
+     * Retrieve the back-channel Destination.
+     * 
+     * @return the backchannel Destination (or null if the backchannel is
+     * built-in)
+     */
+    public Destination getBackChannel() {
+        return null;
+    }
+
+    /**
+     * @param message for which content should be closed.
+     */    
+    public void close(Message msg) throws IOException {
+        OutputStream os = msg.getContent(OutputStream.class);
+        if (os != null) {
+            os.close();
+        }
+        InputStream in = msg.getContent(InputStream.class);
+        if (in != null) {
+            in.close();
+        }
+    }
+    
+    /**
+     * Close the conduit.
+     */
+    public void close() {
+        // nothing to do by default
+    }
+    
+    public String toString() {
+        return "conduit: " + this.getClass() + System.identityHashCode(this)
+               + "target: "
+               +  ((getTarget() != null
+                   && getTarget().getAddress() != null)
+                   ? getTarget().getAddress().getValue()
+                   : "null");
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,180 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.wsdl.EndpointReferenceUtils;
+
+/**
+ * Abstract base class factoring out common Destination logic, 
+ * allowing non-decoupled transports to be written without any
+ * regard for the decoupled back-channel or partial response logic.
+ */
+public abstract class AbstractDestination
+    extends AbstractObservable implements Destination, DestinationWithEndpoint {
+
+    protected final EndpointReferenceType reference;
+    protected final EndpointInfo endpointInfo;
+    protected final Bus bus;
+    
+    public AbstractDestination(EndpointReferenceType ref,
+                               EndpointInfo ei) {
+        this(null, ref, ei);
+    }
+    
+    public AbstractDestination(Bus b,
+                               EndpointReferenceType ref,
+                               EndpointInfo ei) {
+        reference = ref;
+        endpointInfo = ei;
+        bus = b;
+    }
+    
+    /**
+     * @return the reference associated with this Destination
+     */    
+    public EndpointReferenceType getAddress() {
+        return reference;
+    }
+
+    /**
+     * Retreive a back-channel Conduit, which must be policy-compatible
+     * with the current Message and associated Destination. For example
+     * compatible Quality of Protection must be asserted on the back-channel.
+     * This would generally only be an issue if the back-channel is decoupled.
+     * 
+     * @param inMessage the current inbound message (null to indicate a 
+     * disassociated back-channel)
+     * @param partialResponse in the decoupled case, this is expected to be the
+     * outbound Message to be sent over the in-built back-channel. 
+     * @param address the backchannel address (null to indicate anonymous)
+     * @return a suitable Conduit
+     */
+    public Conduit getBackChannel(Message inMessage,
+                                  Message partialResponse,
+                                  EndpointReferenceType address)
+        throws IOException {
+        Conduit backChannel = null;
+        Exchange ex = inMessage.getExchange();
+        EndpointReferenceType target = address != null
+                                       ? address
+                                       : ex.get(EndpointReferenceType.class);
+        if (target == null) {
+            backChannel = getInbuiltBackChannel(inMessage);
+        } else {
+            if (partialResponse != null) {
+                if (markPartialResponse(partialResponse, target)) {
+                    backChannel = getInbuiltBackChannel(inMessage);
+                }
+            } else {
+                ConduitInitiator conduitInitiator = getConduitInitiator();
+                if (conduitInitiator != null) {
+                    backChannel = conduitInitiator.getConduit(endpointInfo, target);
+                    // ensure decoupled back channel input stream is closed
+                    backChannel.setMessageObserver(new MessageObserver() {
+                        public void onMessage(Message m) {
+                            if (m.getContentFormats().contains(InputStream.class)) {
+                                InputStream is = m.getContent(InputStream.class);
+                                try {
+                                    is.close();
+                                } catch (Exception e) {
+                                    // ignore
+                                }
+                            }
+                        }
+                    });
+                }
+            }
+        }
+        return backChannel;
+    }
+        
+    /**
+     * Shutdown the Destination, i.e. stop accepting incoming messages.
+     */
+    public void shutdown() {
+        // nothing to do by default
+    }
+
+    /**
+     * Mark message as a partial message. Only required if decoupled
+     * mode is supported.
+     * 
+     * @param partialResponse the partial response message
+     * @param the decoupled target
+     * @return true iff partial responses are supported
+     */
+    protected boolean markPartialResponse(Message partialResponse,
+                                          EndpointReferenceType decoupledTarget) {
+        return false;
+    }
+    
+    /**
+     * @return the associated conduit initiator, or null if decoupled mode
+     * not supported.
+     */
+    protected ConduitInitiator getConduitInitiator() {
+        return null;
+    }
+    
+    /**
+     * @param inMessage the incoming message
+     * @return the inbuilt backchannel
+     */
+    protected abstract Conduit getInbuiltBackChannel(Message inMessage);
+    
+    /**
+     * Backchannel conduit.
+     */
+    protected abstract class AbstractBackChannelConduit extends AbstractConduit {
+
+        public AbstractBackChannelConduit() {
+            super(EndpointReferenceUtils.getAnonymousEndpointReference());
+        }
+
+        /**
+         * Register a message observer for incoming messages.
+         * 
+         * @param observer the observer to notify on receipt of incoming
+         */
+        public void setMessageObserver(MessageObserver observer) {
+            // shouldn't be called for a back channel conduit
+        }
+        
+        protected Logger getLogger() {
+            return AbstractDestination.this.getLogger();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public EndpointInfo getEndpointInfo() {
+        return endpointInfo;
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,105 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.ReferenceParametersType;
+import org.apache.cxf.wsdl.EndpointReferenceUtils;
+import static org.apache.cxf.ws.addressing.JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
+
+public abstract class AbstractMultiplexDestination extends AbstractDestination implements
+    MultiplexDestination {
+
+    private static final QName MULTIPLEX_ID_QNAME = new QName("http://multiplex.transport.cxf.apache.org",
+                                                              "id");
+
+    public AbstractMultiplexDestination(Bus b, EndpointReferenceType ref, EndpointInfo ei) {
+        super(b, ref, ei);
+    }
+
+    /**
+     * Builds an new endpoint reference using the current target reference as a template. 
+     * The supplied id is endcoded using a reference parameter.
+     * This requires the ws-a interceptors to propagate the reference parameters
+     * on subsequent invokes using the returned reference.
+     * @param the id to encode in the new reference
+     * @return the new reference with the id encoded as a reference parameter
+     * @see org.apache.cxf.transport.MultiplexDestination#getAddressWithId(java.lang.String)
+      
+     */
+    public EndpointReferenceType getAddressWithId(String id) {
+        EndpointReferenceType epr = EndpointReferenceUtils.duplicate(
+            EndpointReferenceUtils.mint(reference, bus));
+        ReferenceParametersType newParams = new org.apache.cxf.ws.addressing.ObjectFactory()
+            .createReferenceParametersType();
+        
+        ReferenceParametersType existingParams = epr.getReferenceParameters();
+        if (null != existingParams) {
+            newParams.getAny().addAll(existingParams.getAny());
+        }
+        
+        newParams.getAny().add(new JAXBElement<String>(MULTIPLEX_ID_QNAME, String.class, id));
+        epr.setReferenceParameters(newParams);
+        return epr;
+    }
+
+    /**
+     * Obtain id from reference parameters of the ws-a to address
+     * Requires the existance of ws-a interceptors on dispatch path to provide access 
+     * to the ws-a headers
+     * @param the current invocation or message context
+     * @return the id from the reference parameters of the  ws-a-to address or null if not found
+     * @see org.apache.cxf.transport.MultiplexDestination#getId(java.util.Map)
+     */
+    public String getId(Map contextMap) {
+        String markedParam = null;
+        AddressingProperties maps = (AddressingProperties)contextMap
+            .get(SERVER_ADDRESSING_PROPERTIES_INBOUND);
+        if (null != maps) {
+            EndpointReferenceType toEpr = maps.getToEndpointReference();
+            if (null != toEpr) {
+                markedParam = extractStringElementFromAny(MULTIPLEX_ID_QNAME, toEpr);
+            }
+        }
+        return markedParam;
+    }
+
+    private String extractStringElementFromAny(QName elementQName, EndpointReferenceType epr) {
+        String elementStringValue = null;
+        if (null != epr.getReferenceParameters()) {
+            for (Object o : epr.getReferenceParameters().getAny()) {
+                if (o instanceof JAXBElement) {
+                    JAXBElement el = (JAXBElement)o;
+                    if (el.getName().equals(elementQName)) {
+                        elementStringValue = (String)el.getValue();
+                    }
+                }
+            }
+        }
+        return elementStringValue;
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractMultiplexDestination.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,127 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.ws.addressing.AttributedURIType;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.wsdl.EndpointReferenceUtils;
+
+public abstract class AbstractObservable implements Observable {
+
+    protected MessageObserver incomingObserver;
+
+    /**
+     * Register a message observer for incoming messages.
+     * 
+     * @param observer the observer to notify on receipt of incoming
+     * message
+     */
+    public synchronized void setMessageObserver(MessageObserver observer) {
+        if (observer != incomingObserver) {
+            MessageObserver old = incomingObserver;
+            incomingObserver = observer;
+            if (observer != null) {
+                getLogger().fine("registering incoming observer: " + observer);
+                if (old == null) {
+                    try {
+                        activate();
+                    } catch (RuntimeException ex) {
+                        incomingObserver = null;
+                        throw ex;
+                    }
+                }
+            } else {
+                if (old != null) {
+                    getLogger().fine("unregistering incoming observer: " + old);
+                    deactivate();
+                }
+            }
+        }
+    }
+   
+    /**
+     * @return the observer to notify on receipt of incoming message
+     */
+    public MessageObserver getMessageObserver() {
+        return incomingObserver;
+    }
+
+    /**
+     * Get the target reference .
+     * 
+     * @param ei the corresponding EndpointInfo
+     * @return the actual target
+     */
+    protected static EndpointReferenceType getTargetReference(EndpointInfo ei, Bus bus) {
+        return getTargetReference(ei, null, bus);
+    }
+    
+    /**
+     * Get the target endpoint reference.
+     * 
+     * @param ei the corresponding EndpointInfo
+     * @param t the given target EPR if available
+     * @param bus the Bus
+     * @return the actual target
+     */
+    protected static EndpointReferenceType getTargetReference(EndpointInfo ei,
+                                                              EndpointReferenceType t,
+                                                              Bus bus) {
+        EndpointReferenceType ref = null;
+        if (null == t) {
+            ref = new EndpointReferenceType();
+            AttributedURIType address = new AttributedURIType();
+            address.setValue(ei.getAddress());
+            ref.setAddress(address);
+            if (ei.getService() != null) {
+                EndpointReferenceUtils.setServiceAndPortName(ref, 
+                                                             ei.getService().getName(), 
+                                                             ei.getName().getLocalPart());
+            }
+        } else {
+            ref = t;
+        }
+        return ref;
+    }
+    
+    /**
+     * Activate messages flow.
+     */
+    protected void activate() {
+        // nothing to do by default
+    }
+
+    /**
+     * Deactivate messages flow.
+     */
+    protected void deactivate() {
+        // nothing to do by default        
+    }
+    
+    /**
+     * @return the logger to use
+     */
+    protected abstract Logger getLogger();
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,44 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.cxf.helpers.CastUtils;
+
+/**
+ * Helper methods for {@link DestinationFactory}s and {@link ConduitInitiator}s.
+ */
+public abstract class AbstractTransportFactory {
+    private List<String> transportIds;
+
+    public List<String> getTransportIds() {
+        return transportIds;
+    }
+
+    public void setTransportIds(List<String> transportIds) {
+        this.transportIds = transportIds;
+    }
+
+    public Set<String> getUriPrefixes() {
+        return CastUtils.cast(Collections.EMPTY_SET);
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,138 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.binding.Binding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.InterceptorChain;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.PhaseChainCache;
+import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.phase.PhaseManager;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.ServiceImpl;
+import org.apache.cxf.service.model.EndpointInfo;
+
+public class ChainInitiationObserver implements MessageObserver {
+    protected Endpoint endpoint;
+    protected Bus bus;
+    
+    private PhaseChainCache chainCache = new PhaseChainCache();
+
+    public ChainInitiationObserver(Endpoint endpoint, Bus bus) {
+        super();
+        this.endpoint = endpoint;
+        this.bus = bus;
+    }
+
+    public void onMessage(Message m) {
+        Bus origBus = BusFactory.getThreadDefaultBus(false);
+        BusFactory.setThreadDefaultBus(bus);
+        try {
+            PhaseInterceptorChain phaseChain = null;
+            
+            if (m.getInterceptorChain() instanceof PhaseInterceptorChain) {
+                phaseChain = (PhaseInterceptorChain)m.getInterceptorChain();
+                if (phaseChain.getState() == InterceptorChain.State.PAUSED) {
+                    phaseChain.resume();
+                    return;
+                }
+            }
+            
+            Message message = getBinding().createMessage(m);
+            Exchange exchange = message.getExchange();
+            if (exchange == null) {
+                exchange = new ExchangeImpl();
+                exchange.setInMessage(message);
+            }
+            setExchangeProperties(exchange, message);
+    
+            // setup chain
+            phaseChain = chainCache.get(bus.getExtension(PhaseManager.class).getInPhases(),
+                                                         bus.getInInterceptors(),
+                                                         endpoint.getService().getInInterceptors(),
+                                                         endpoint.getInInterceptors(),
+                                                         getBinding().getInInterceptors());
+            
+            
+            message.setInterceptorChain(phaseChain);
+            
+            phaseChain.setFaultObserver(endpoint.getOutFaultObserver());
+           
+            phaseChain.doIntercept(message);
+        } finally {
+            BusFactory.setThreadDefaultBus(origBus);
+        }
+    }
+
+
+    protected Binding getBinding() {
+        return endpoint.getBinding();
+    }
+    
+    protected void setExchangeProperties(Exchange exchange, Message m) {
+        exchange.put(Endpoint.class, endpoint);
+        exchange.put(Service.class, endpoint.getService());
+        exchange.put(Binding.class, getBinding());
+        exchange.put(Bus.class, bus);
+        if (exchange.getDestination() == null) {
+            exchange.setDestination(m.getDestination());
+        }
+        if (endpoint != null && (endpoint.getService() instanceof ServiceImpl)) {
+
+            EndpointInfo endpointInfo = endpoint.getEndpointInfo();
+
+            QName serviceQName = endpointInfo.getService().getName();
+            exchange.put(Message.WSDL_SERVICE, serviceQName);
+
+            QName interfaceQName = endpointInfo.getService().getInterface().getName();
+            exchange.put(Message.WSDL_INTERFACE, interfaceQName);
+
+            QName portQName = endpointInfo.getName();
+            exchange.put(Message.WSDL_PORT, portQName);
+            URI wsdlDescription = endpointInfo.getProperty("URI", URI.class);
+            if (wsdlDescription == null) {
+                String address = endpointInfo.getAddress();
+                try {
+                    wsdlDescription = new URI(address + "?wsdl");
+                } catch (URISyntaxException e) {
+                    // do nothing
+                }
+                endpointInfo.setProperty("URI", wsdlDescription);
+            }
+            exchange.put(Message.WSDL_DESCRIPTION, wsdlDescription);
+        }  
+    }
+
+    public Endpoint getEndpoint() {
+        return endpoint;
+    }
+    
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,126 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.configuration.spring.MapProvider;
+
+public final class ConduitInitiatorManagerImpl implements ConduitInitiatorManager {
+
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(ConduitInitiatorManager.class);
+
+    Map<String, ConduitInitiator> conduitInitiators;
+    
+    private Bus bus;
+    public ConduitInitiatorManagerImpl() {
+        conduitInitiators = new ConcurrentHashMap<String, ConduitInitiator>();
+    }
+    
+
+    public ConduitInitiatorManagerImpl(MapProvider<String, ConduitInitiator> conduitInitiators) {
+        this.conduitInitiators = conduitInitiators.createMap();
+    }
+
+    public ConduitInitiatorManagerImpl(Map<String, ConduitInitiator> conduitInitiators) {
+        this.conduitInitiators = conduitInitiators;
+    }
+    
+    /**
+     * Spring is slow to resolve constructors. This accessor allows
+     * for initialization via a property.
+     * @param mapProvider
+     */
+    public void setMapProvider(MapProvider<String, ConduitInitiator> mapProvider) {
+        this.conduitInitiators = mapProvider.createMap();
+    }
+    
+    @Resource
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
+    @PostConstruct
+    public void register() {
+        if (null != bus) {
+            bus.setExtension(this, ConduitInitiatorManager.class);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.cxf.bus.ConduitInitiatorManager#registerConduitInitiator(java.lang.String,
+     *      org.apache.cxf.transports.ConduitInitiator)
+     */
+    public void registerConduitInitiator(String namespace, ConduitInitiator factory) {
+        conduitInitiators.put(namespace, factory);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.cxf.bus.ConduitInitiatorManager#deregisterConduitInitiator(java.lang.String)
+     */
+    public void deregisterConduitInitiator(String namespace) {
+        conduitInitiators.remove(namespace);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.cxf.bus.ConduitInitiatorManager#ConduitInitiator(java.lang.String)
+     */
+    /**
+     * Returns the conduit initiator for the given namespace, constructing it
+     * (and storing in the cache for future reference) if necessary, using its
+     * list of factory classname to namespace mappings.
+     * 
+     * @param namespace the namespace.
+     */
+    public ConduitInitiator getConduitInitiator(String namespace) throws BusException {
+        ConduitInitiator factory = conduitInitiators.get(namespace);
+        if (null == factory) {
+            throw new BusException(new Message("NO_CONDUIT_INITIATOR", BUNDLE, namespace));
+        }
+        return factory;
+    }
+
+    @PreDestroy
+    public void shutdown() {
+        // nothing to do
+    }
+
+    public ConduitInitiator getConduitInitiatorForUri(String uri) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,153 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.Map;
+import java.util.Properties;
+import java.util.ResourceBundle;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.bus.extension.DeferredMap;
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.configuration.spring.MapProvider;
+
+public final class DestinationFactoryManagerImpl implements DestinationFactoryManager {
+
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(DestinationFactoryManager.class);
+
+    Map<String, DestinationFactory> destinationFactories;
+    Properties factoryNamespaceMappings;
+
+    private Bus bus;
+
+    public DestinationFactoryManagerImpl() {
+        destinationFactories = new ConcurrentHashMap<String, DestinationFactory>();
+    }
+
+    public DestinationFactoryManagerImpl(Map<String, DestinationFactory> destinationFactories) {
+        this.destinationFactories = destinationFactories;
+    }
+    public DestinationFactoryManagerImpl(MapProvider<String, DestinationFactory> destinationFactories) {
+        this.destinationFactories = destinationFactories.createMap();
+    }
+
+    /**
+     * Spring is slow for constructors with arguments. This
+     * accessor permits initialization via a property.
+     * @param mapProvider
+     */
+    public void setMapProvider(MapProvider<String, DestinationFactory> mapProvider) {
+        this.destinationFactories = mapProvider.createMap();
+    }
+
+    @Resource
+    public void setBus(Bus b) {
+        bus = b;
+    }
+
+    @PostConstruct
+    public void register() {
+        if (null != bus) {
+            bus.setExtension(this, DestinationFactoryManager.class);
+        }
+    }
+
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.cxf.bus.DestinationFactoryManager#registerDestinationFactory(java.lang.String,
+     *      org.apache.cxf.transports.DestinationFactory)
+     */
+    public void registerDestinationFactory(String namespace, DestinationFactory factory) {
+        destinationFactories.put(namespace, factory);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.cxf.bus.DestinationFactoryManager#deregisterDestinationFactory(java.lang.String)
+     */
+    public void deregisterDestinationFactory(String namespace) {
+        destinationFactories.remove(namespace);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.cxf.bus.DestinationFactoryManager#DestinationFactory(java.lang.String)
+     */
+    /**
+     * Returns the conduit initiator for the given namespace, constructing it
+     * (and storing in the cache for future reference) if necessary, using its
+     * list of factory classname to namespace mappings.
+     *
+     * @param namespace the namespace.
+     */
+    public DestinationFactory getDestinationFactory(String namespace) throws BusException {
+        DestinationFactory factory = destinationFactories.get(namespace);
+        if (null == factory) {
+            throw new BusException(new Message("NO_DEST_FACTORY", BUNDLE, namespace));
+        }
+        return factory;
+    }
+
+    @PreDestroy
+    public void shutdown() {
+        // nothing to do
+    }
+
+    public DestinationFactory getDestinationFactoryForUri(String uri) {
+        //If the uri is related path or has no protocol prefix , we will set it to be http
+        if (uri.startsWith("/") || uri.indexOf(":") < 0) {
+            uri = "http://" + uri;
+        }
+        //first attempt the ones already registered
+        for (Map.Entry<String, DestinationFactory> df : destinationFactories.entrySet()) {
+            for (String prefix : df.getValue().getUriPrefixes()) {
+                if (uri.startsWith(prefix)) {
+                    return df.getValue();
+                }
+            }
+        }
+        //looks like we'll need to undefer everything so we can try again.
+        if (destinationFactories instanceof DeferredMap) {
+            ((DeferredMap)destinationFactories).undefer();
+            for (DestinationFactory df : destinationFactories.values()) {
+                for (String prefix : df.getUriPrefixes()) {
+                    if (uri.startsWith(prefix)) {
+                        return df;
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,48 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+public final class HttpUriMapper {
+    
+    private HttpUriMapper() {
+        // Util class doesn't need public constructor
+    }
+    
+    public static String getContextName(String path) {
+        String contextName = "";        
+        int idx = path.lastIndexOf('/');
+        if (idx >= 0) {
+            contextName = path.substring(0, idx);          
+        }
+        return contextName;
+    }
+    
+    public static String getResourceBase(String path) {
+        String servletMap = "";
+        int idx = path.lastIndexOf('/');
+        if (idx >= 0) {
+            servletMap = path.substring(idx);
+        }
+        if ("".equals(servletMap) || "".equals(path)) {
+            servletMap = "/";
+        } 
+        return servletMap;
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/HttpUriMapper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties Wed Nov 12 04:42:46 2008
@@ -0,0 +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.
+#
+#
+NO_CONDUIT_INITIATOR=No conduit initiator was found for the namespace {0}.
+NO_DEST_FACTORY=No DestinationFactory was found for the namespace {0}.

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,124 @@
+/**
+ * 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 org.apache.cxf.transport;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.phase.PhaseManager;
+
+/**
+ * This MessageObserver creates an Interceptor chain which adds in the interceptors
+ * set on this class and the global Bus interceptors. At somepoint, it is expected
+ * that these interceptors will resolve the appropriate Endpoint/Binding combination
+ * and continue setting up the chain.
+ *
+ */
+public class MultipleEndpointObserver implements MessageObserver {
+    
+    public static final String ENDPOINTS = "multipleEndpointObserver.endpoints";
+    
+    protected Bus bus;
+    protected List<Interceptor> bindingInterceptors = new CopyOnWriteArrayList<Interceptor>();
+    protected List<Interceptor> routingInterceptors = new CopyOnWriteArrayList<Interceptor>();
+    private Set<Endpoint> endpoints = new CopyOnWriteArraySet<Endpoint>();
+    
+    public MultipleEndpointObserver(Bus bus) {
+        super();
+        this.bus = bus;
+    }
+
+    public void onMessage(Message message) {
+        Bus origBus = BusFactory.getThreadDefaultBus(false);
+        BusFactory.setThreadDefaultBus(bus);
+        try {
+            message = createMessage(message);
+            Exchange exchange = message.getExchange();
+            if (exchange == null) {
+                exchange = new ExchangeImpl();
+                exchange.setInMessage(message);
+            }
+            setExchangeProperties(exchange, message);
+            
+            // setup chain
+            PhaseInterceptorChain chain = createChain();
+            
+            message.setInterceptorChain(chain);
+            
+            chain.add(bus.getInInterceptors());
+            if (bindingInterceptors != null) {
+                chain.add(bindingInterceptors);
+            }
+            if (routingInterceptors != null) {
+                chain.add(routingInterceptors);
+            }
+            
+            if (endpoints != null) {
+                exchange.put(ENDPOINTS, endpoints);
+            }
+            
+            chain.doIntercept(message);
+        } finally {
+            BusFactory.setThreadDefaultBus(origBus);
+        }
+    }
+
+    /**
+     * Give a chance for a Binding to customize their message
+     */
+    protected Message createMessage(Message message) {
+        return message;
+    }
+
+    protected PhaseInterceptorChain createChain() {
+        PhaseInterceptorChain chain = new PhaseInterceptorChain(bus.getExtension(PhaseManager.class)
+            .getInPhases());
+        return chain;
+    }
+    
+    protected void setExchangeProperties(Exchange exchange, Message m) {
+        exchange.put(Bus.class, bus);
+        if (exchange.getDestination() == null) {
+            exchange.setDestination(m.getDestination());
+        }
+    }
+
+    public List<Interceptor> getBindingInterceptors() {
+        return bindingInterceptors;
+    }
+
+    public List<Interceptor> getRoutingInterceptors() {
+        return routingInterceptors;
+    }
+
+    public Set<Endpoint> getEndpoints() {
+        return endpoints;
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/MultipleEndpointObserver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,87 @@
+/**
+ * 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 org.apache.cxf.transport.http;
+
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.transports.http.QueryHandler;
+import org.apache.cxf.transports.http.QueryHandlerRegistry;
+
+public class QueryHandlerRegistryImpl implements QueryHandlerRegistry {
+    
+    List<QueryHandler> queryHandlers;
+    Bus bus;
+    
+    
+    public QueryHandlerRegistryImpl() {
+    }
+    
+    public QueryHandlerRegistryImpl(Bus b, List<QueryHandler> handlers) {
+        bus = b;
+        queryHandlers = new CopyOnWriteArrayList<QueryHandler>(handlers);
+    }
+    
+    public void setQueryHandlers(List<QueryHandler> handlers) {
+        this.queryHandlers = new CopyOnWriteArrayList<QueryHandler>(handlers);
+    }
+
+    @PostConstruct
+    public void register() {
+        if (queryHandlers == null) {
+            queryHandlers = new CopyOnWriteArrayList<QueryHandler>();
+            if (bus != null) {
+                WSDLQueryHandler wsdlQueryHandler = new WSDLQueryHandler();
+                wsdlQueryHandler.setBus(bus);
+                queryHandlers.add(wsdlQueryHandler);
+            }
+        }
+        if (null != bus) {
+            bus.setExtension(this, QueryHandlerRegistry.class);
+        }
+    }
+
+    public List<QueryHandler> getHandlers() {
+        return queryHandlers;
+    }
+
+    public void registerHandler(QueryHandler handler) {
+        queryHandlers.add(handler);
+    }
+
+    public void registerHandler(QueryHandler handler, int position) {
+        queryHandlers.add(position, handler);
+    }
+    
+    @Resource
+    public void setBus(Bus b) {
+        bus = b;
+    }
+
+    public Bus getBus() {
+        return bus;
+    }
+
+}
+

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties Wed Nov 12 04:42:46 2008
@@ -0,0 +1,23 @@
+#
+#
+#    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.
+#
+#
+COULD_NOT_PROVIDE_WSDL = Exception occurred while trying to process {0}
+WSDL_NOT_FOUND = Could not find wsdl {0}
+SCHEMA_NOT_FOUND = Could not find xsd {0}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/QueryMessages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,71 @@
+/**
+ * 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 org.apache.cxf.transport.http;
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+/**
+ * Functions used to work with URLs in HTTP-related code. 
+ */
+public final class UrlUtilities {
+    
+    private UrlUtilities() {
+    }
+
+    /**
+     * Create a map from String to String that represents the contents of the query
+     * portion of a URL. For each x=y, x is the key and y is the value.
+     * @param s the query part of the URI.
+     * @return the map.
+     */
+    public static Map<String, String> parseQueryString(String s) {
+        Map<String, String> ht = new HashMap<String, String>();
+        StringTokenizer st = new StringTokenizer(s, "&");
+        while (st.hasMoreTokens()) {
+            String pair = (String)st.nextToken();
+            int pos = pair.indexOf('=');
+            if (pos == -1) {
+                ht.put(pair.toLowerCase(), "");
+            } else {
+                ht.put(pair.substring(0, pos).toLowerCase(),
+                       pair.substring(pos + 1));
+            }
+        }
+        return ht;
+    }
+    
+    /**
+     * Return everything in the path up to the last slash in a URI.
+     * @param baseURI
+     * @return the trailing 
+     */
+    public static String getStem(String baseURI) {
+        URI uri = URI.create(baseURI);
+        baseURI = uri.getRawPath();
+        int idx = baseURI.lastIndexOf('/');
+        if (idx != -1) {
+            baseURI = baseURI.substring(0, idx);
+        }
+        return URI.create(baseURI).getPath();
+    }
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/UrlUtilities.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java?rev=713355&view=auto
==============================================================================
--- cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java (added)
+++ cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java Wed Nov 12 04:42:46 2008
@@ -0,0 +1,30 @@
+/**
+ * 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 org.apache.cxf.transport.http;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.i18n.UncheckedException;
+
+public class WSDLQueryException extends UncheckedException {
+
+    public WSDLQueryException(Message msg, Throwable t) {
+        super(msg, t);
+    }
+
+}

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/2.2.x-continuations/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message