You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/01/25 06:04:30 UTC

svn commit: r615110 - /servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Author: ffang
Date: Thu Jan 24 21:04:29 2008
New Revision: 615110

URL: http://svn.apache.org/viewvc?rev=615110&view=rev
Log:
[SM-1210] provide locationURI attribute for cxfbc:consumer endpoint so that customer can specify the address which will override the one in wsdl 

Modified:
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=615110&r1=615109&r2=615110&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Thu Jan 24 21:04:29 2008
@@ -125,6 +125,8 @@
     private Bus bus;
     
     private boolean mtomEnabled;
+    
+    private String locationURI;
 
     /**
      * @return the wsdl
@@ -173,10 +175,7 @@
         outFault = interceptors;
     }
 
-    @Override
-    public String getLocationURI() {
-        return null;
-    }
+   
 
     public void process(MessageExchange exchange) throws Exception {
         Message message = messages.remove(exchange.getExchangeId());
@@ -245,6 +244,11 @@
             if (endpoint == null) {
                 endpoint = ei.getName().getLocalPart();
             }
+            
+            if (locationURI != null) {
+                ei.setAddress(locationURI);
+            }
+            
             ei.getBinding().setProperty(
                     AbstractBindingFactory.DATABINDING_DISABLED, Boolean.TRUE);
             
@@ -304,7 +308,7 @@
                     getBus().getOutInterceptors());
             cxfService.getOutFaultInterceptors().addAll(
                     getBus().getOutFaultInterceptors());
-
+            
             
             chain = new JbiChainInitiationObserver(ep, getBus());
             server = new ServerImpl(getBus(), ep, null, chain);
@@ -329,6 +333,14 @@
         }
     }
 
+    public void setLocationURI(String locationURI) {
+        this.locationURI = locationURI;
+    }
+
+    public String getLocationURI() {
+        return locationURI;
+    }
+    
     protected class JbiChainInitiationObserver extends ChainInitiationObserver {
 
         public JbiChainInitiationObserver(Endpoint endpoint, Bus bus) {