You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by eg...@apache.org on 2007/03/09 17:39:29 UTC

svn commit: r516455 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/wsdl/ integration/jbi/src/main/java/org/apache/cxf/jbi/transport/ rt/core/src/main/java/org/apache/cxf/endpoint/ rt/core/src/main...

Author: eglynn
Date: Fri Mar  9 08:39:27 2007
New Revision: 516455

URL: http://svn.apache.org/viewvc?view=rev&rev=516455
Log:
Added EndpointResolverRegistry to allow logical endpoints to be resolved to their physical counterparts before use. 
To be used whenever EPRs need to be retrieved from an external repository, e.g. as the basis of a WS-Naming integration.

Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java   (with props)
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java   (with props)
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java   (with props)
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
    incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/transport/JBIDestination.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http2/src/main/resources/META-INF/cxf/cxf-servlet.xml
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java?view=auto&rev=516455
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java Fri Mar  9 08:39:27 2007
@@ -0,0 +1,55 @@
+/**
+ * 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.endpoint;
+
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+
+
+/**
+ * Implementations of this interface are responsible for mapping
+ * between abstract and concrete endpoint references, and/or
+ * renewing stale references.
+ * <p>
+ * An underlying mechanism in the style of the OGSA WS-Naming
+ * specification is assumed, where an EPR maybe be fully abstract,
+ * or concrete but with sufficient information embedded to enable
+ * its renewal if necessary.
+ */
+public interface EndpointResolver {
+    /**
+     * Retrieve a concrete EPR corresponding to the given abstract EPR,
+     * returning a cached reference if already resolved.
+     *
+     * @param logical the abstract EPR to resolve
+     * @return the resolved concrete EPR if appropriate, null otherwise
+     */
+    EndpointReferenceType resolve(EndpointReferenceType logical);
+
+    /**
+     * Force a fresh resolution of the given abstract EPR, discarding any
+     * previously cached reference.
+     *
+     * @param logical the previously resolved abstract EPR
+     * @param physical the concrete EPR to refresh
+     * @return the renewed concrete EPR if appropriate, null otherwise
+     */
+    EndpointReferenceType renew(EndpointReferenceType logical,
+                                EndpointReferenceType physical);
+}

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java?view=auto&rev=516455
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java Fri Mar  9 08:39:27 2007
@@ -0,0 +1,80 @@
+/**
+ * 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.endpoint;
+
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+
+/**
+ * Implementations of this interface are responsible for mediating
+ * access to registered EndpointResolvers, which themselves map
+ * between abstract and concrete endpoint references, and/or
+ * facilitate renewal of stale references.
+ * <p>
+ * An underlying mechanism in the style of the OGSA WS-Naming
+ * specification is assumed, where an EPR maybe be fully abstract,
+ * or concrete but with sufficient information embedded to enable
+ * its renewal if necessary.
+ */
+public interface EndpointResolverRegistry {
+    /**
+     * Register an endpoint resolver.
+     *
+     * @param resolver the EndpointResolver to add to the chain.
+     */
+    void register(EndpointResolver resolver);
+
+    /**
+     * Unregister an endpoint resolver.
+     *
+     * @param resolver the EndpointResolver to remove from the chain.
+     */
+    void unregister(EndpointResolver resolver);
+
+    /**
+     * Walk the list of registered EndpointResolvers, so as to
+     * retrieve a concrete EPR corresponding to the given abstract EPR,
+     * returning a cached reference if already resolved.
+     * <p>
+     * This API is used by any actor that requires a concrete EPR (e.g.
+     * a transport-level Conduit), and must be called each and every
+     * time the EPR content is to be accessed (e.g. before each connection
+     * establishment attempt). 
+     *
+     * @param logical the abstract EPR to resolve
+     */
+    EndpointReferenceType resolve(EndpointReferenceType logical);
+
+    /**
+     * Walk the list of registered EndpointResolvers, so as to force a fresh 
+     * resolution of the given abstract EPR, discarding any previously cached 
+     * reference.
+     * <p>
+     * This API may be used by say the transport-level Conduit when it
+     * detects a non-transient error on the outgoing connection, or
+     * by any other actor in the dispatch with the ability to infer
+     * server-side unavailability.
+     * 
+     * @param logical the previously resolved abstract EPR
+     * @param physical the concrete EPR to refresh
+     * @return the renewed concrete EPR if appropriate, null otherwise
+     */
+    EndpointReferenceType renew(EndpointReferenceType logical,
+                                EndpointReferenceType physical);
+}

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Fri Mar  9 08:39:27 2007
@@ -50,9 +50,11 @@
 
 import org.xml.sax.SAXException;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.endpoint.EndpointResolverRegistry;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.ws.addressing.AttributedURIType;
@@ -585,6 +587,24 @@
         return getEndpointReference(manager, implementor.getClass());
     }
     
+    /**
+     * Resolve logical endpoint reference via the Bus EndpointResolverRegistry.
+     * 
+     * @param logical the abstract EPR to resolve
+     * @return the resolved concrete EPR if appropriate, null otherwise
+     */
+    public static EndpointReferenceType resolve(EndpointReferenceType logical, Bus bus) {
+        EndpointReferenceType physical = null;
+        if (bus != null) {
+            EndpointResolverRegistry registry =
+                bus.getExtension(EndpointResolverRegistry.class);
+            if (registry != null) {
+                physical = registry.resolve(logical);
+            }
+        }
+        return physical != null ? physical : logical;
+    }
+                                             
     private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
         if (namespaceURI == null) {
             namespaceURI =  node.lookupNamespaceURI(content.substring(0, 

Modified: incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/transport/JBIDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/transport/JBIDestination.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/transport/JBIDestination.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/transport/JBIDestination.java Fri Mar  9 08:39:27 2007
@@ -59,7 +59,7 @@
                           EndpointInfo info,
                           DeliveryChannel dc,
                           CXFServiceUnitManager sum) {
-        super(getTargetReference(info.getAddress()), info);
+        super(getTargetReference(info, null), info);
         this.conduitInitiator = ci;
         this.channel = dc;
         this.suManager = sum;

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java?view=auto&rev=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java Fri Mar  9 08:39:27 2007
@@ -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.endpoint;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+
+/**
+ * This implementation class is responsible for mediating
+ * access to registered EndpointResolvers, which themselves map
+ * between abstract and concrete endpoint references, and/or
+ * facilitate renewal of stale references.
+ * <p>
+ * An underlying mechanism in the style of the OGSA WS-Naming
+ * specification is assumed, where an EPR maybe be fully abstract,
+ * or concrete but with sufficient information embedded to enable
+ * its renewal if necessary.
+ */
+public class EndpointResolverRegistryImpl implements EndpointResolverRegistry {
+
+    private Bus bus;
+    private List<EndpointResolver> resolvers;
+    
+    /**
+     * Initialize registry, and expose as Bus extension.
+     */
+    @PostConstruct
+    public void init() {
+        resolvers = new ArrayList<EndpointResolver>();
+        if (bus != null) {
+            bus.setExtension(this, EndpointResolverRegistry.class);
+        }
+    }
+    
+    /**
+     * Register an endpoint resolver.
+     *
+     * @param resolver the EndpointResolver to add to the chain.
+     */
+    public synchronized void register(EndpointResolver resolver) {
+        resolvers.add(resolver);
+    }
+    
+    /**
+     * Unregister an endpoint resolver.
+     *
+     * @param resolver the EndpointResolver to remove from the chain.
+     */
+    public synchronized void unregister(EndpointResolver resolver) {
+        resolvers.remove(resolver);
+    }
+
+    /**
+     * Walk the list of registered EndpointResolvers, so as to
+     * retrieve a concrete EPR corresponding to the given abstract EPR,
+     * returning a cached reference if already resolved.
+     * <p>
+     * This API is used by any actor that requires a concrete EPR (e.g.
+     * a transport-level Conduit), and must be called each and every
+     * time the EPR content is to be accessed (e.g. before each connection
+     * establishment attempt). 
+     *
+     * @param logical the abstract EPR to resolve
+     * @return the resolved concrete EPR if appropriate, null otherwise
+     */
+    public synchronized EndpointReferenceType resolve(EndpointReferenceType logical) {
+        EndpointReferenceType physical = null;
+        for (EndpointResolver resolver : resolvers) {
+            physical = resolver.resolve(logical);
+            if (physical != null) {
+                break;
+            }
+        }
+        return physical;
+    }
+    
+    /**
+     * Walk the list of registered EndpointResolvers, so as to force a fresh 
+     * resolution of the given abstract EPR, discarding any previously cached 
+     * reference.
+     * <p>
+     * This API may be used by say the transport-level Conduit when it
+     * detects a non-transient error on the outgoing connection, or
+     * by any other actor in the dispatch with the ability to infer
+     * server-side unavailability.
+     * 
+     * @param logical the previously resolved abstract EPR
+     * @param physical the concrete EPR to refresh
+     * @return the renewed concrete EPR if appropriate, null otherwise
+     */
+    public EndpointReferenceType renew(EndpointReferenceType logical,
+                                       EndpointReferenceType physical) {
+        EndpointReferenceType fresh = null;
+        for (EndpointResolver resolver : resolvers) {
+            fresh = resolver.renew(logical, physical);
+            if (fresh != null) {
+                break;
+            }
+        }
+        return fresh;
+    }
+    
+    /**
+     * @return the encapsulated list of registered resolvers
+     */
+    protected List<EndpointResolver> getResolvers() {
+        return resolvers;
+    }
+    
+    /**
+     * @param b Bus to encapsulate
+     */
+    public void setBus(Bus b) {
+        bus = b;
+    }
+}

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointResolverRegistryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractConduit.java Fri Mar  9 08:39:27 2007
@@ -21,8 +21,6 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
@@ -32,10 +30,10 @@
  * allowing non-decoupled transports to be written without any
  * regard for the decoupled back-channel or partial response logic.
  */
-public abstract class AbstractConduit implements Conduit {
+public abstract class AbstractConduit 
+    extends AbstractObservable implements Conduit {
 
     protected final EndpointReferenceType target;
-    protected MessageObserver incomingObserver;
 
     public AbstractConduit(EndpointReferenceType t) {
         target = t;
@@ -71,30 +69,4 @@
     public void close() {
         // nothing to do by default
     }
-
-    /**
-     * Register a message observer for incoming messages.
-     * 
-     * @param observer the observer to notify on receipt of incoming
-     * message
-     */
-    public void setMessageObserver(MessageObserver observer) {
-        incomingObserver = observer;
-        if (getLogger().isLoggable(Level.FINE)) {
-            getLogger().fine("registering incoming observer: " + incomingObserver);
-        }
-    }
-    
-    /**
-     * @return the observer to notify on receipt of incoming message
-     */
-    public MessageObserver getMessageObserver() {
-        return incomingObserver;
-    }
-
-    /**
-     * @return the logger to use
-     */
-    protected abstract Logger getLogger();
-
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractDestination.java Fri Mar  9 08:39:27 2007
@@ -26,7 +26,6 @@
 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.AttributedURIType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 
@@ -35,11 +34,11 @@
  * allowing non-decoupled transports to be written without any
  * regard for the decoupled back-channel or partial response logic.
  */
-public abstract class AbstractDestination implements Destination {
+public abstract class AbstractDestination
+    extends AbstractObservable implements Destination {
 
     protected final EndpointReferenceType reference;
     protected final EndpointInfo endpointInfo;
-    protected MessageObserver incomingObserver;
     
     public AbstractDestination(EndpointReferenceType ref,
                                EndpointInfo ei) {
@@ -105,37 +104,7 @@
         }
         return backChannel;
     }
-
-    /**
-     * Register a message observer for incoming messages.
-     * 
-     * @param observer the observer to notify on receipt of incoming
-     */
-    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) {
-                    activate();
-                }
-            } else {
-                getLogger().fine("unregistering incoming observer: " + incomingObserver);
-                if (old != null) {
-                    deactivate();
-                }
-            }
-        }
-    }
-    
-    /**
-     * @return the observer to notify on receipt of incoming message
-     */
-    public MessageObserver getMessageObserver() {
-        return incomingObserver;
-    }
-    
+        
     /**
      * Shutdown the Destination, i.e. stop accepting incoming messages.
      */
@@ -163,40 +132,7 @@
     protected ConduitInitiator getConduitInitiator() {
         return null;
     }
-
-    /**
-     * Activate receipt of incoming messages.
-     */
-    protected void activate() {
-        // nothing to do by default
-    }
-
-    /**
-     * Deactivate receipt of incoming messages.
-     */
-    protected void deactivate() {
-        // nothing to do by default        
-    }
     
-    /**
-     * Get the exposed reference.
-     * 
-     * @param address the corresponding EndpointInfo
-     * @return the actual reference
-     */
-    protected static EndpointReferenceType getTargetReference(String addr) {
-        EndpointReferenceType ref = new EndpointReferenceType();
-        AttributedURIType address = new AttributedURIType();
-        address.setValue(addr);
-        ref.setAddress(address);        
-        return ref;
-    }
-    
-    /**
-     * @return the logger to use
-     */
-    protected abstract Logger getLogger();
-
     /**
      * @param inMessage the incoming message
      * @return the inbuilt backchannel

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java?view=auto&rev=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java Fri Mar  9 08:39:27 2007
@@ -0,0 +1,118 @@
+/**
+ * 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) {
+                    activate();
+                }
+            } 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 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);
+        } else {
+            ref = t;
+        }
+        return EndpointReferenceUtils.resolve(ref, bus);
+        //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: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/AbstractObservable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml Fri Mar  9 08:39:27 2007
@@ -37,5 +37,7 @@
        	   interface="org.apache.cxf.endpoint.ServerRegistry"/>
     <extension class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl"
        	   interface="org.apache.cxf.transports.http.QueryHandlerRegistry"/> 
+    <extension class="org.apache.cxf.endpoint.EndpointResolverRegistryImpl"
+       	   interface="org.apache.cxf.endpoint.EndpointResolverRegistry"/>
            
-</extensions>
\ No newline at end of file
+</extensions>

Modified: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml (original)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml Fri Mar  9 08:39:27 2007
@@ -218,5 +218,9 @@
     <bean id="org.apache.cxf.transports.http.QueryHandlerRegistry" class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl">
         <property name="bus" ref="cxf"/>
     </bean>
+
+    <bean id="org.apache.cxf.endpoint.EndpointResolverRegistry" class="org.apache.cxf.endpoint.EndpointResolverRegistryImpl">
+        <property name="bus" ref="cxf"/>
+    </bean>
     
 </beans>

Added: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java?view=auto&rev=516455
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java (added)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java Fri Mar  9 08:39:27 2007
@@ -0,0 +1,197 @@
+/**
+ * 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.endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.easymock.classextension.EasyMock;
+import org.easymock.classextension.IMocksControl;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class EndpointResolverRegistryImplTest extends Assert {
+
+    private EndpointResolverRegistryImpl registry;
+    private EndpointResolver resolver1;
+    private EndpointResolver resolver2;
+    private EndpointReferenceType logical;
+    private EndpointReferenceType physical;
+    private EndpointReferenceType fresh;
+    private IMocksControl control;
+
+    @Before
+    public void setUp() {
+        registry = new EndpointResolverRegistryImpl();
+        control = EasyMock.createNiceControl();
+        resolver1 = control.createMock(EndpointResolver.class);
+        resolver2 = control.createMock(EndpointResolver.class);
+        logical = control.createMock(EndpointReferenceType.class);
+        physical = control.createMock(EndpointReferenceType.class);
+        fresh = control.createMock(EndpointReferenceType.class);
+    }
+    
+    @After
+    public void tearDown() {
+        resolver1 = null;
+        resolver2 = null;
+        logical = null;
+        physical = null;
+    }
+
+    @Test
+    public void testInit() {
+        assertNull("unexpected resolvers list", registry.getResolvers());
+        Bus bus = control.createMock(Bus.class);
+        registry.setBus(bus);
+        bus.setExtension(registry, EndpointResolverRegistry.class);
+        control.replay();
+        
+        registry.init();
+        
+        assertNotNull("expected resolvers list", registry.getResolvers());
+        control.verify();
+    }
+    
+    @Test
+    public void testRegister() {
+        registry.init();
+        assertEquals("unexpected resolver count",
+                     0,
+                     registry.getResolvers().size());
+        
+        registry.register(resolver1);
+        
+        assertEquals("unexpected resolver count",
+                     1,
+                     registry.getResolvers().size());
+        assertTrue("expected resolver to be registered",
+                   registry.getResolvers().contains(resolver1));
+        
+        registry.unregister(resolver1);
+        
+        assertEquals("unexpected resolver count",
+                     0,
+                     registry.getResolvers().size());
+        assertFalse("expected resolver to be registered",
+                    registry.getResolvers().contains(resolver1));
+        
+        registry.register(resolver2);
+        registry.register(resolver1);
+        
+        assertEquals("unexpected resolver count",
+                     2,
+                     registry.getResolvers().size());
+        assertTrue("expected resolver to be registered",
+                   registry.getResolvers().contains(resolver1));
+        assertTrue("expected resolver to be registered",
+                   registry.getResolvers().contains(resolver2));
+        
+        registry.unregister(resolver2);
+        
+        assertEquals("unexpected resolver count",
+                     1,
+                     registry.getResolvers().size());
+        assertTrue("expected resolver to be registered",
+                   registry.getResolvers().contains(resolver1));
+        assertFalse("expected resolver to be registered",
+                    registry.getResolvers().contains(resolver2));
+    }
+    
+    @Test
+    public void testResolve() {
+        registry.init();
+        registry.register(resolver1);
+        registry.register(resolver2);
+        resolver1.resolve(logical);
+        EasyMock.expectLastCall().andReturn(physical);
+        control.replay();
+     
+        EndpointReferenceType resolved = registry.resolve(logical);
+        
+        control.verify();
+        assertSame("unexpected physical EPR", physical, resolved);
+        
+        control.reset();
+        resolver1.resolve(logical);
+        EasyMock.expectLastCall().andReturn(null);
+        resolver2.resolve(logical);
+        EasyMock.expectLastCall().andReturn(physical);
+        control.replay();
+        
+        resolved = registry.resolve(logical);
+        
+        control.verify();
+        assertSame("unexpected physical EPR", physical, resolved);
+
+        control.reset();
+        resolver1.resolve(logical);
+        EasyMock.expectLastCall().andReturn(null);
+        resolver2.resolve(logical);
+        EasyMock.expectLastCall().andReturn(null);
+        control.replay();
+
+        resolved = registry.resolve(logical);
+
+        control.verify();
+        assertNull("unexpected physical EPR", resolved);
+    }
+    
+    @Test
+    public void testRenew() {
+        registry.init();
+        registry.register(resolver1);
+        registry.register(resolver2);
+        resolver1.renew(logical, physical);
+        EasyMock.expectLastCall().andReturn(fresh);
+        control.replay();
+        
+        EndpointReferenceType renewed = registry.renew(logical, physical);
+        
+        control.verify();
+        assertSame("unexpected physical EPR", fresh, renewed);
+        
+        control.reset();
+        resolver1.renew(logical, physical);
+        EasyMock.expectLastCall().andReturn(null);
+        resolver2.renew(logical, physical);
+        EasyMock.expectLastCall().andReturn(physical);
+        control.replay();
+        
+        renewed = registry.renew(logical, physical);
+        
+        control.verify();
+        assertSame("unexpected physical EPR", physical, renewed);
+
+        control.reset();
+        resolver1.renew(logical, physical);
+        EasyMock.expectLastCall().andReturn(null);
+        resolver2.renew(logical, physical);
+        EasyMock.expectLastCall().andReturn(null);
+        control.replay();
+
+        renewed = registry.renew(logical, physical);
+
+        control.verify();
+        assertNull("unexpected physical EPR", renewed);
+    }
+}

Propchange: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/endpoint/EndpointResolverRegistryImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Fri Mar  9 08:39:27 2007
@@ -76,13 +76,13 @@
                                    EndpointInfo ei,
                                    boolean dp)
         throws IOException {
-        super(getTargetReference(getAddressValue(ei, dp)), ei);  
+        super(getTargetReference(getAddressValue(ei, dp), b), ei);  
         bus = b;
         conduitInitiator = ci;
         
         initConfig();
  
-        nurl = new URL(getAddressValue(ei, dp));
+        nurl = new URL(ei.getAddress());
         name = nurl.getPath();
     }
     
@@ -150,16 +150,15 @@
     protected abstract void copyRequestHeaders(Message message,
                                                Map<String, List<String>> headers);
 
-    protected static String getAddressValue(EndpointInfo ei) {       
+    protected static EndpointInfo getAddressValue(EndpointInfo ei) {       
         return getAddressValue(ei, true);
     } 
     
-    protected static String getAddressValue(EndpointInfo ei, boolean dp) {       
+    protected static EndpointInfo getAddressValue(EndpointInfo ei, boolean dp) {       
         if (dp) {
-            return StringUtils.addDefaultPortIfMissing(ei.getAddress());
-        } else {
-            return ei.getAddress();
+            ei.setAddress(StringUtils.addDefaultPortIfMissing(ei.getAddress()));
         }
+        return ei;
     }  
     
     /**

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=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Mar  9 08:39:27 2007
@@ -55,7 +55,6 @@
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.transport.MessageObserver;
 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;
 
@@ -129,7 +128,7 @@
                        EndpointInfo ei,
                        EndpointReferenceType t,
                        URLConnectionFactory factory) throws IOException {
-        super(getTargetReference(ei, t));
+        super(getTargetReference(ei, t, b));
         bus = b;
         endpointInfo = ei;
         alternateConnectionFactory = factory;
@@ -259,27 +258,6 @@
      */
     protected URL getURL() {
         return url;
-    }
-    
-    /**
-     * Get the target reference .
-     * 
-     * @param ei the corresponding EndpointInfo
-     * @param t the constructor-provider target
-     * @return the actual target
-     */
-    private static EndpointReferenceType getTargetReference(EndpointInfo ei,
-                                                            EndpointReferenceType t) {
-        EndpointReferenceType ref = null;
-        if (null == t) {
-            ref = new EndpointReferenceType();
-            AttributedURIType address = new AttributedURIType();
-            address.setValue(ei.getAddress());
-            ref.setAddress(address);
-        } else {
-            ref = t;
-        }
-        return ref;
     }
 
     /**

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=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java Fri Mar  9 08:39:27 2007
@@ -109,7 +109,7 @@
     protected void activate() {
         LOG.log(Level.FINE, "Activating receipt of incoming messages");
         try {
-            URL url = new URL(getAddressValue(endpointInfo));
+            URL url = new URL(endpointInfo.getAddress());
             if (contextMatchOnExact()) {
                 engine.addServant(url, new AbstractHttpHandler() {
                     public void handle(String pathInContext, String pathParams, HttpRequest req,
@@ -252,8 +252,8 @@
             inMessage.put(Message.PATH_INFO, req.getPath());
             inMessage.put(Message.QUERY_STRING, req.getQuery());
             inMessage.put(Message.CONTENT_TYPE, req.getContentType());
-            if (!StringUtils.isEmpty(getAddressValue(endpointInfo))) {
-                inMessage.put(Message.BASE_PATH, new URL(getAddressValue(endpointInfo)).getPath());
+            if (!StringUtils.isEmpty(endpointInfo.getAddress())) {
+                inMessage.put(Message.BASE_PATH, new URL(endpointInfo.getAddress()).getPath());
             }
             inMessage.put(Message.FIXED_PARAMETER_ORDER, isFixedParameterOrder());
             inMessage.put(Message.ASYNC_POST_RESPONSE_DISPATCH, Boolean.TRUE); 

Modified: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-servlet.xml Fri Mar  9 08:39:27 2007
@@ -35,14 +35,4 @@
             </set>
         </property>
     </bean>
-    
-    <!-- bean id="org.apache.cxf.transports.http.QueryHandlerRegistry" class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl">
-        <property name="bus" ref="cxf"/>
-        <property name="queryHandlerNames">
-        	<list>
-                <value>org.apache.cxf.transport.http.WSDLQueryHandler</value>                
-            </list>    
-        </property>
-    </bean-->
-     
 </beans>

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Fri Mar  9 08:39:27 2007
@@ -93,13 +93,13 @@
                                    EndpointInfo ei,
                                    boolean dp)
         throws IOException {
-        super(getTargetReference(getAddressValue(ei, dp)), ei);  
+        super(getTargetReference(getAddressValue(ei, dp), b), ei);  
         bus = b;
         conduitInitiator = ci;
         
         initConfig();
  
-        nurl = new URL(getAddressValue(ei, dp));
+        nurl = new URL(ei.getAddress());
         name = nurl.getPath();
     }
     
@@ -209,16 +209,15 @@
         }
     }
     
-    protected static String getAddressValue(EndpointInfo ei) {       
+    protected static EndpointInfo getAddressValue(EndpointInfo ei) {       
         return getAddressValue(ei, true);
     } 
     
-    protected static String getAddressValue(EndpointInfo ei, boolean dp) {       
+    protected static EndpointInfo getAddressValue(EndpointInfo ei, boolean dp) {       
         if (dp) {
-            return StringUtils.addDefaultPortIfMissing(ei.getAddress());
-        } else {
-            return ei.getAddress();
-        }
+            ei.setAddress(StringUtils.addDefaultPortIfMissing(ei.getAddress()));
+        } 
+        return ei;
     }
     
     /**

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Mar  9 08:39:27 2007
@@ -55,7 +55,6 @@
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.transport.MessageObserver;
 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;
 
@@ -128,7 +127,7 @@
                        EndpointInfo ei,
                        EndpointReferenceType t,
                        URLConnectionFactory factory) throws IOException {
-        super(getTargetReference(ei, t));
+        super(getTargetReference(ei, t, b));
         bus = b;
         endpointInfo = ei;
         alternateConnectionFactory = factory;
@@ -254,27 +253,6 @@
      */
     protected URL getURL() {
         return url;
-    }
-    
-    /**
-     * Get the target reference.
-     * 
-     * @param ei the corresponding EndpointInfo
-     * @param t the constructor-provider target
-     * @return the actual target
-     */
-    private static EndpointReferenceType getTargetReference(EndpointInfo ei,
-                                                            EndpointReferenceType t) {
-        EndpointReferenceType ref = null;
-        if (null == t) {
-            ref = new EndpointReferenceType();
-            AttributedURIType address = new AttributedURIType();
-            address.setValue(ei.getAddress());
-            ref.setAddress(address);
-        } else {
-            ref = t;
-        }
-        return ref;
     }
 
     /**

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java Fri Mar  9 08:39:27 2007
@@ -101,7 +101,7 @@
     protected void activate() {
         LOG.log(Level.FINE, "Activating receipt of incoming messages");
         try {
-            URL url = new URL(getAddressValue(endpointInfo));
+            URL url = new URL(endpointInfo.getAddress());
             //The handler is bind with the context, 
             //TODO we need to set the things on on context
             if (contextMatchOnExact()) {
@@ -193,8 +193,8 @@
             inMessage.put(Message.QUERY_STRING, req.getQueryString());
             inMessage.put(Message.CONTENT_TYPE, req.getContentType());
             inMessage.setContent(InputStream.class, req.getInputStream());
-            if (!StringUtils.isEmpty(getAddressValue(endpointInfo))) {
-                inMessage.put(Message.BASE_PATH, new URL(getAddressValue(endpointInfo)).getPath());
+            if (!StringUtils.isEmpty(endpointInfo.getAddress())) {
+                inMessage.put(Message.BASE_PATH, new URL(endpointInfo.getAddress()).getPath());
             }
             inMessage.put(Message.FIXED_PARAMETER_ORDER, isFixedParameterOrder());
             inMessage.put(Message.ASYNC_POST_RESPONSE_DISPATCH, Boolean.TRUE); 

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/resources/META-INF/cxf/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/resources/META-INF/cxf/cxf-servlet.xml?view=diff&rev=516455&r1=516454&r2=516455
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/resources/META-INF/cxf/cxf-servlet.xml (original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/resources/META-INF/cxf/cxf-servlet.xml Fri Mar  9 08:39:27 2007
@@ -35,14 +35,4 @@
             </set>
         </property>
     </bean>
-    
-    <!-- bean id="org.apache.cxf.transports.http.QueryHandlerRegistry" class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl">
-        <property name="bus" ref="cxf"/>
-        <property name="queryHandlerNames">
-        	<list>
-                <value>org.apache.cxf.transport.http.WSDLQueryHandler</value>                
-            </list>    
-        </property>
-    </bean-->
-     
 </beans>

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=516455&r1=516454&r2=516455
==============================================================================
--- 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 Fri Mar  9 08:39:27 2007
@@ -79,7 +79,7 @@
     public JMSDestination(Bus b,
                           ConduitInitiator ci,
                           EndpointInfo info) throws IOException {
-        super(getTargetReference(info.getAddress()), info);    
+        super(getTargetReference(info, b), info);    
         
         base = new JMSTransportBase(b, endpointInfo, true, BASE_BEAN_NAME_SUFFIX, this);