cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1160869 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Date Tue, 23 Aug 2011 19:40:59 GMT
Author: dkulp
Date: Tue Aug 23 19:40:58 2011
New Revision: 1160869

URL: http://svn.apache.org/viewvc?rev=1160869&view=rev
Log:
Merged revisions 1160866 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1160866 | dkulp | 2011-08-23 15:37:23 -0400 (Tue, 23 Aug 2011) | 2 lines
  
  [CXF-3755] Check the bus  for the ws-addressing feature as well
  Patch from Jesse Pangburn applied.
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java?rev=1160869&r1=1160868&r2=1160869&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Tue Aug 23 19:40:58 2011
@@ -23,6 +23,8 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.StringWriter;
 import java.net.HttpURLConnection;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.logging.Logger;
@@ -51,7 +53,6 @@ import javax.xml.ws.http.HTTPBinding;
 import javax.xml.ws.http.HTTPException;
 import javax.xml.ws.soap.SOAPBinding;
 import javax.xml.ws.soap.SOAPFaultException;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -316,7 +317,19 @@ public class DispatchImpl<T> implements 
             
             //CXF-2836 : find the operation for the dispatched object 
             boolean wsaEnabled = false;
-            for (AbstractFeature feature : ((JaxWsClientEndpointImpl)client.getEndpoint()).getFeatures())
{
+            // the feature list to be searched is the endpoint and the bus's lists
+            List<AbstractFeature> endpointFeatures 
+                = ((JaxWsClientEndpointImpl)client.getEndpoint()).getFeatures();
+            List<AbstractFeature> allFeatures;
+            if (client.getBus().getFeatures() != null) {
+                allFeatures = new ArrayList<AbstractFeature>(endpointFeatures.size()

+                    + client.getBus().getFeatures().size());
+                allFeatures.addAll(endpointFeatures);
+                allFeatures.addAll(client.getBus().getFeatures());
+            } else {
+                allFeatures = endpointFeatures;
+            }
+            for (AbstractFeature feature : allFeatures) {
                 if (feature instanceof WSAddressingFeature) {
                     wsaEnabled = true; 
                 }
@@ -333,7 +346,7 @@ public class DispatchImpl<T> implements 
                         createdSource = new StaxSource(StaxUtils.createXMLStreamReader(document));
                         payloadElementName = getPayloadElementName(document.getDocumentElement());
                     } catch (Exception e) {                        
-                        // ignore, we are tring to get the operation name
+                        // ignore, we are trying to get the operation name
                     }
                 }
                 if (obj instanceof SOAPMessage) {



Mime
View raw message