You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/08/23 21:44:30 UTC
svn commit: r1160872 - in /cxf/branches/2.3.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Author: dkulp
Date: Tue Aug 23 19:44:29 2011
New Revision: 1160872
URL: http://svn.apache.org/viewvc?rev=1160872&view=rev
Log:
Merged revisions 1160869 via svnmerge from
https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................
r1160869 | dkulp | 2011-08-23 15:40:58 -0400 (Tue, 23 Aug 2011) | 10 lines
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.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java?rev=1160872&r1=1160871&r2=1160872&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java Tue Aug 23 19:44:29 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;
@@ -290,7 +291,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;
}
@@ -307,7 +320,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) {