Author: dkulp
Date: Mon Jun 9 15:43:32 2008
New Revision: 665927
URL: http://svn.apache.org/viewvc?rev=665927&view=rev
Log:
Update the chain creations to use consistent ordering
Fix problem where WS-Addressing wouldn't have used the correct action if
wrapper classes aren't used.
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/InFaultChainInitiatorObserver.java
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutFaultChainInitiatorObserver.java
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Mon
Jun 9 15:43:32 2008
@@ -414,13 +414,13 @@
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by bus: " + i1);
}
- List<Interceptor> i2 = endpoint.getInInterceptors();
+ List<Interceptor> i2 = getInInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by endpoint: " + i2);
+ LOG.fine("Interceptors contributed by client: " + i2);
}
- List<Interceptor> i3 = getInInterceptors();
+ List<Interceptor> i3 = endpoint.getInInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by client: " + i3);
+ LOG.fine("Interceptors contributed by endpoint: " + i2);
}
List<Interceptor> i4 = endpoint.getBinding().getInInterceptors();
if (LOG.isLoggable(Level.FINE)) {
@@ -500,6 +500,7 @@
exchange.put(MessageObserver.class, this);
exchange.put(Retryable.class, this);
+ exchange.put(Client.class, this);
exchange.put(Bus.class, bus);
if (endpoint != null && boi != null) {
@@ -537,13 +538,13 @@
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by bus: " + i1);
}
- List<Interceptor> i2 = endpoint.getOutInterceptors();
+ List<Interceptor> i2 = getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by endpoint: " + i2);
+ LOG.fine("Interceptors contributed by client: " + i2);
}
- List<Interceptor> i3 = getOutInterceptors();
+ List<Interceptor> i3 = endpoint.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by client: " + i3);
+ LOG.fine("Interceptors contributed by endpoint: " + i3);
}
List<Interceptor> i4 = endpoint.getBinding().getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/InFaultChainInitiatorObserver.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/InFaultChainInitiatorObserver.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
---
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/InFaultChainInitiatorObserver.java
(original)
+++
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/InFaultChainInitiatorObserver.java
Mon Jun 9 15:43:32 2008
@@ -21,6 +21,7 @@
import java.util.SortedSet;
import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.phase.Phase;
@@ -35,11 +36,15 @@
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain
chain) {
Endpoint e = ex.get(Endpoint.class);
+ Client c = ex.get(Client.class);
+ chain.add(getBus().getInFaultInterceptors());
+ if (c != null) {
+ chain.add(c.getInFaultInterceptors());
+ }
+ chain.add(e.getService().getInFaultInterceptors());
chain.add(e.getInFaultInterceptors());
chain.add(e.getBinding().getInFaultInterceptors());
- chain.add(e.getService().getInFaultInterceptors());
- chain.add(getBus().getInFaultInterceptors());
}
protected SortedSet<Phase> getPhases() {
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutFaultChainInitiatorObserver.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutFaultChainInitiatorObserver.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
---
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutFaultChainInitiatorObserver.java
(original)
+++
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutFaultChainInitiatorObserver.java
Mon Jun 9 15:43:32 2008
@@ -21,6 +21,7 @@
import java.util.SortedSet;
import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.phase.Phase;
@@ -35,11 +36,15 @@
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain
chain) {
Endpoint e = ex.get(Endpoint.class);
-
+ Client c = ex.get(Client.class);
+
+ chain.add(getBus().getOutFaultInterceptors());
+ if (c != null) {
+ chain.add(c.getOutFaultInterceptors());
+ }
+ chain.add(e.getService().getOutFaultInterceptors());
chain.add(e.getOutFaultInterceptors());
chain.add(e.getBinding().getOutFaultInterceptors());
- chain.add(e.getService().getOutFaultInterceptors());
- chain.add(getBus().getOutFaultInterceptors());
}
protected SortedSet<Phase> getPhases() {
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
---
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
(original)
+++
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
Mon Jun 9 15:43:32 2008
@@ -133,17 +133,17 @@
Endpoint ep = ex.get(Endpoint.class);
- List<Interceptor> i1 = ep.getOutInterceptors();
+ List<Interceptor> i1 = bus.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by endpoint: " + i1);
+ LOG.fine("Interceptors contributed by bus: " + i1);
}
List<Interceptor> i2 = ep.getService().getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Interceptors contributed by service: " + i2);
}
- List<Interceptor> i3 = bus.getOutInterceptors();
+ List<Interceptor> i3 = ep.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Interceptors contributed by bus: " + i3);
+ LOG.fine("Interceptors contributed by endpoint: " + i3);
}
List<Interceptor> i4 = null;
PhaseInterceptorChain chain;
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
---
cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
(original)
+++
cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
Mon Jun 9 15:43:32 2008
@@ -66,9 +66,9 @@
// setup chain
PhaseInterceptorChain chain =
chainCache.get(bus.getExtension(PhaseManager.class).getInPhases(),
bus.getInInterceptors(),
+
endpoint.getService().getInInterceptors(),
endpoint.getInInterceptors(),
-
getBinding().getInInterceptors(),
-
endpoint.getService().getInInterceptors());
+
getBinding().getInInterceptors());
message.setInterceptorChain(chain);
Modified:
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=665927&r1=665926&r2=665927&view=diff
==============================================================================
---
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
(original)
+++
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Mon Jun 9 15:43:32 2008
@@ -50,6 +50,7 @@
import org.apache.cxf.service.model.FaultInfo;
import org.apache.cxf.service.model.MessageInfo;
import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.UnwrappedOperationInfo;
import org.apache.cxf.transport.Conduit;
import org.apache.cxf.transport.Destination;
import org.apache.cxf.ws.addressing.policy.MetadataConstants;
@@ -507,6 +508,9 @@
return null;
}
OperationInfo op = bop.getOperationInfo();
+ if (op.isUnwrapped()) {
+ op = ((UnwrappedOperationInfo)op).getWrappedOperation();
+ }
String actionUri = (String)
message.get(SoapBindingConstants.SOAP_ACTION);
if (actionUri != null) {