cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r437849 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/binding/ api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/interceptor/ api/src/main/java/org/apache/cxf/phase/ api/src/test/java/org/apache/cxf/i...
Date Mon, 28 Aug 2006 21:37:51 GMT
Author: dandiep
Date: Mon Aug 28 14:37:48 2006
New Revision: 437849

URL: http://svn.apache.org/viewvc?rev=437849&view=rev
Log:
o Start fault chain work. Not working quite yet though. This basically
  involves having an interceptor which handles faults which is invoked
  when a fault occurs in a chain.
o Seperate fault interceptors into in and out on InterceptorProvider.
o Have ReadHeadersInterceptor utilize a PartialXMLStreamReader.
o move soap interceptors into interceptor package.
o Add utility methods to StaxUtils for fault writing
o Remove two copies of wsdl/hello_world.wsdl. No reason to have 

Added:
    incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AbstractSoapInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AttachmentOutInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AttachmentOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Messages.properties
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Messages.properties
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MultipartMessageInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MustUnderstandInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCInInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ReadHeadersInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
      - copied, changed from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapOutInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultChainIntiatorInterceptor.java
    incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/
    incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl
Removed:
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/interceptors/
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AbstractSoapInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AttachmentOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Messages.properties
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MultipartMessageInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MustUnderstandInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCInInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ReadHeadersInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapOutInterceptor.java
    incubator/cxf/trunk/rt/core/src/test/resources/wsdl/
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/resources/wsdl/
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/binding/Binding.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoint.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorProvider.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
    incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxStreamFilter.java
    incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBus.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/binding/Binding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/binding/Binding.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/binding/Binding.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/binding/Binding.java Mon Aug 28 14:37:48 2006
@@ -1,5 +1,6 @@
 package org.apache.cxf.binding;
 
+import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.message.Message;
 
@@ -9,4 +10,7 @@
 
     Message createMessage(Message m);
     
+    Interceptor getOutFaultInterceptor();
+    
+    Interceptor getInFaultInterceptor();
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoint.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoint.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoint.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoint.java Mon Aug 28 14:37:48 2006
@@ -3,6 +3,7 @@
 import java.util.concurrent.Executor;
 
 import org.apache.cxf.binding.Binding;
+import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
@@ -22,4 +23,6 @@
     void setExecutor(Executor executor);
     
     Executor getExecutor();
+    
+    Interceptor getFaultInterceptor();
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java Mon Aug 28 14:37:48 2006
@@ -9,10 +9,15 @@
 
     private List<Interceptor> in = new ArrayList<Interceptor>();
     private List<Interceptor> out = new ArrayList<Interceptor>();
-    private List<Interceptor> fault  = new ArrayList<Interceptor>();
+    private List<Interceptor> outFault  = new ArrayList<Interceptor>();
+    private List<Interceptor> inFault  = new ArrayList<Interceptor>();
     
-    public List<Interceptor> getFaultInterceptors() {
-        return fault;
+    public List<Interceptor> getOutFaultInterceptors() {
+        return outFault;
+    }
+
+    public List<Interceptor> getInFaultInterceptors() {
+        return inFault;
     }
 
     public List<Interceptor> getInInterceptors() {
@@ -22,7 +27,4 @@
     public List<Interceptor> getOutInterceptors() {
         return out;
     }
-
-    
-
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractBasicInterceptorProvider.java Mon Aug 28 14:37:48 2006
@@ -7,10 +7,15 @@
 
     private List<Interceptor> in = new ArrayList<Interceptor>();
     private List<Interceptor> out = new ArrayList<Interceptor>();
-    private List<Interceptor> fault  = new ArrayList<Interceptor>();
+    private List<Interceptor> outFault  = new ArrayList<Interceptor>();
+    private List<Interceptor> inFault  = new ArrayList<Interceptor>();
     
-    public List<Interceptor> getFaultInterceptors() {
-        return fault;
+    public List<Interceptor> getOutFaultInterceptors() {
+        return outFault;
+    }
+
+    public List<Interceptor> getInFaultInterceptors() {
+        return inFault;
     }
 
     public List<Interceptor> getInInterceptors() {
@@ -20,7 +25,4 @@
     public List<Interceptor> getOutInterceptors() {
         return out;
     }
-
-    
-
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java Mon Aug 28 14:37:48 2006
@@ -19,4 +19,9 @@
     public Fault(Throwable t) {
         super(t);
     }
+
+    @SuppressWarnings("deprecation")
+    protected Fault(String message) {
+        super(message);
+    }
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorChain.java Mon Aug 28 14:37:48 2006
@@ -25,4 +25,7 @@
     
     ListIterator<Interceptor<? extends Message>> getIterator();
 
+    Interceptor getFaultInterceptor();
+    
+    void setFaultInterceptor(Interceptor i);
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorProvider.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorProvider.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/InterceptorProvider.java Mon Aug 28 14:37:48 2006
@@ -8,5 +8,7 @@
     
     List<Interceptor> getOutInterceptors();
     
-    List<Interceptor> getFaultInterceptors();
+    List<Interceptor> getOutFaultInterceptors();
+    
+    List<Interceptor> getInFaultInterceptors();
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java Mon Aug 28 14:37:48 2006
@@ -41,7 +41,7 @@
     private State state;
     private ListIterator<Interceptor<? extends Message>> iterator;
     private Message pausedMessage;
-    
+    private Interceptor faultInterceptor;
     
     public PhaseInterceptorChain(List<Phase> ps) {
         state = State.EXECUTING;
@@ -116,6 +116,10 @@
                 }
                 message.setContent(Exception.class, ex);
                 unwind(message);
+                
+                if (faultInterceptor != null) {
+                    faultInterceptor.handleMessage(message);
+                }
                 state = State.ABORTED;
             } 
         }
@@ -287,6 +291,12 @@
         
     }
 
+    public Interceptor getFaultInterceptor() {
+        return faultInterceptor;
+    }
 
+    public void setFaultInterceptor(Interceptor faultInterceptor) {
+        this.faultInterceptor = faultInterceptor;
+    }
 
 }

Added: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java?rev=437849&view=auto
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java (added)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/PartialXMLStreamReader.java Mon Aug 28 14:37:48 2006
@@ -0,0 +1,52 @@
+package org.apache.cxf.staxutils;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+public class PartialXMLStreamReader extends DepthXMLStreamReader {
+    private QName endTag;
+    private boolean foundEnd;
+    private int endDepth;
+    private int currentEvent;
+    
+    public PartialXMLStreamReader(XMLStreamReader r, QName endTag) {
+        super(r);
+        this.endTag = endTag;
+        currentEvent = r.getEventType();
+    }
+
+    @Override
+    public int next() throws XMLStreamException {
+        if (!foundEnd) { 
+            currentEvent = super.next();
+
+            if (currentEvent == START_ELEMENT && getName().equals(endTag)) {
+                foundEnd = true;
+                endDepth = getDepth();
+                return END_ELEMENT;
+            }
+            
+            return currentEvent;
+        } else if (endDepth > 0) {
+            endDepth--;
+            currentEvent = END_ELEMENT;
+        } else {
+            currentEvent = END_DOCUMENT;
+        }
+        
+        return currentEvent;
+    }
+
+    @Override
+    public int getEventType() {
+        return currentEvent;
+    }
+
+    @Override
+    public boolean hasNext() {
+        return currentEvent != END_DOCUMENT;
+    }
+    
+    
+}

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxStreamFilter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxStreamFilter.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxStreamFilter.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxStreamFilter.java Mon Aug 28 14:37:48 2006
@@ -7,12 +7,11 @@
 public class StaxStreamFilter implements StreamFilter {
     private QName[] tags;
 
-    public StaxStreamFilter(QName[] eventsToReject) {
+    public StaxStreamFilter(QName... eventsToReject) {
         tags = eventsToReject;
     }
 
     public boolean accept(XMLStreamReader reader) {
-
         if (reader.isStartElement()) {
             QName elName = reader.getName();
             for (QName tag : tags) {

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Aug 28 14:37:48 2006
@@ -15,13 +15,15 @@
 
 import org.w3c.dom.*;
 
+import org.apache.cxf.helpers.DOMUtils;
+
 public final class StaxUtils {
 
     private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance();
     private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance();
 
     private static final String XML_NS = "http://www.w3.org/2000/xmlns/";
-
+    
     private StaxUtils() {
     }
 
@@ -382,11 +384,17 @@
         }
     }
 
-    public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing,
-                                QName stopAt) throws XMLStreamException {
+    public static Document read(XMLStreamReader reader) throws XMLStreamException {
+        Document doc = DOMUtils.createDocument();
+        readDocElements(doc, reader, true);
+        return doc;
+    }
+    
+    public static Document read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing) 
+        throws XMLStreamException {
         Document doc = builder.newDocument();
 
-        readDocElements(doc, reader, repairing, stopAt);
+        readDocElements(doc, reader, repairing);
 
         return doc;
     }
@@ -405,17 +413,11 @@
      * @return
      * @throws XMLStreamException
      */
-    private static Element startElement(Node parent, XMLStreamReader reader, boolean repairing, QName stopAt)
+    private static Element startElement(Node parent, XMLStreamReader reader, boolean repairing)
         throws XMLStreamException {
         Document doc = getDocument(parent);
 
-        if (stopAt != null && stopAt.getNamespaceURI().equals(reader.getNamespaceURI())
-            && stopAt.getLocalPart().equals(reader.getLocalName())) {
-            return null;
-        }
-
         Element e = doc.createElementNS(reader.getNamespaceURI(), reader.getLocalName());
-
         if (reader.getPrefix() != null) {
             e.setPrefix(reader.getPrefix());
         }
@@ -443,7 +445,7 @@
 
         reader.next();
 
-        readDocElements(e, reader, repairing, stopAt);
+        readDocElements(e, reader, repairing);
 
         if (repairing && !isDeclared(e, reader.getNamespaceURI(), reader.getPrefix())) {
             declare(e, reader.getNamespaceURI(), reader.getPrefix());
@@ -476,22 +478,21 @@
      * @param reader
      * @throws XMLStreamException
      */
-    public static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing, QName stopAt)
+    private static void readDocElements(Node parent, XMLStreamReader reader, boolean repairing)
         throws XMLStreamException {
         Document doc = getDocument(parent);
 
         int event = reader.getEventType();
-
         while (reader.hasNext()) {
             switch (event) {
             case XMLStreamConstants.START_ELEMENT:
-                if (startElement(parent, reader, repairing, stopAt) == null) {
-                    return;
-                }
-                if (parent instanceof Document && stopAt != null) {
+                startElement(parent, reader, repairing);
+                
+                if (parent instanceof Document) {
                     if (reader.hasNext()) {
                         reader.next();
                     }
+                    
                     return;
                 }
                 break;
@@ -589,4 +590,67 @@
         }
     }
 
+    /**
+     * Reads a QName from the element text. Reader must be positioned at the
+     * start tag.
+     */
+    public static QName readQName(XMLStreamReader reader) throws XMLStreamException {
+        String value = reader.getElementText();
+        if (value == null) {
+            return null;
+        }
+        
+        int index = value.indexOf(":");
+
+        if (index == -1) {
+            return new QName(value);
+        }
+
+        String prefix = value.substring(0, index);
+        String localName = value.substring(index + 1);
+        String ns = reader.getNamespaceURI(prefix);
+
+        if (ns == null || localName == null) {
+            throw new RuntimeException("Invalid QName in mapping: " + value);
+        }
+
+        return new QName(ns, localName, prefix);
+    }
+    
+
+    /**
+     * Create a unique namespace uri/prefix combination.
+     * 
+     * @param nsUri
+     * @return The namespace with the specified URI. If one doesn't exist, one
+     *         is created.
+     * @throws XMLStreamException
+     */
+    public static String getUniquePrefix(XMLStreamWriter writer, String namespaceURI, boolean declare)
+        throws XMLStreamException {
+        String prefix = writer.getPrefix(namespaceURI);
+        if (prefix == null) {
+            prefix = getUniquePrefix(writer);
+
+            if (declare) {
+                writer.setPrefix(prefix, namespaceURI);
+                writer.writeNamespace(prefix, namespaceURI);
+            }
+        }
+        return prefix;
+    }
+
+    public static String getUniquePrefix(XMLStreamWriter writer) {
+        int n = 1;
+
+        while (true) {
+            String nsPrefix = "ns" + n;
+
+            if (writer.getNamespaceContext().getNamespaceURI(nsPrefix) == null) {
+                return nsPrefix;
+            }
+
+            n++;
+        }
+    }
 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java Mon Aug 28 14:37:48 2006
@@ -4,20 +4,28 @@
 import java.util.List;
 
 import org.apache.cxf.binding.Binding;
+import org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor;
+import org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor;
+import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 
-public class SoapBinding implements Binding {
+public class SoapBinding extends AbstractBasicInterceptorProvider implements Binding {
 
     private List<Interceptor> in;
     private List<Interceptor> out;
     private List<Interceptor> fault;
+    private Interceptor outFaultInterceptor;
+    private Interceptor inFaultInterceptor;
     
     public SoapBinding() {
         in = new ArrayList<Interceptor>();
         out = new ArrayList<Interceptor>();
-        fault = new ArrayList<Interceptor>();     
+        fault = new ArrayList<Interceptor>();
+        
+        outFaultInterceptor = new Soap11FaultOutInterceptor();
+        inFaultInterceptor = new Soap11FaultInInterceptor();
     }
     
     public Message createMessage() {
@@ -40,4 +48,11 @@
         return out;
     }
 
+    public Interceptor getInFaultInterceptor() {
+        return inFaultInterceptor;
+    }
+
+    public Interceptor getOutFaultInterceptor() {
+        return outFaultInterceptor;
+    }
 }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Mon Aug 28 14:37:48 2006
@@ -20,6 +20,13 @@
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
 import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.binding.soap.interceptor.MultipartMessageInterceptor;
+import org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor;
+import org.apache.cxf.binding.soap.interceptor.RPCInInterceptor;
+import org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor;
+import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
+import org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor;
+import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapBodyInfo;
 import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
@@ -74,10 +81,13 @@
         sb.getInInterceptors().add(new MustUnderstandInterceptor());
         sb.getInInterceptors().add(new StaxInInterceptor());
 
-        sb.getOutInterceptors().add(new AttachmentOutInterceptor());
         sb.getOutInterceptors().add(new StaxOutInterceptor());
         sb.getOutInterceptors().add(new SoapOutInterceptor());
 
+        sb.getOutFaultInterceptors().add(new StaxOutInterceptor());
+        sb.getOutFaultInterceptors().add(new SoapOutInterceptor());
+        sb.getOutFaultInterceptors().add(new Soap11FaultOutInterceptor());
+
         if (SoapConstants.STYLE_RPC.equalsIgnoreCase(sbi.getStyle())) {
             sb.getInInterceptors().add(new RPCInInterceptor());
             sb.getOutInterceptors().add(new RPCOutInterceptor());
@@ -88,7 +98,8 @@
             sb.getInInterceptors().add(new WrappedInInterceptor());
             sb.getOutInterceptors().add(new WrappedOutInterceptor());
             sb.getOutInterceptors().add(new BareOutInterceptor());
-        }
+        }        
+        
                 
         return sb;
     }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java Mon Aug 28 14:37:48 2006
@@ -1,5 +1,8 @@
 package org.apache.cxf.binding.soap;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.Element;
@@ -38,7 +41,8 @@
     private QName subCode;
     private String role;
     private Element detail;
-
+    private Map<String, String> namespaces = new HashMap<String, String>();
+    
     public SoapFault(Message message, Throwable throwable, QName type) {
         super(message, throwable);
         this.faultCode = type;
@@ -49,6 +53,11 @@
         this.faultCode = faultCode;
     }
 
+    public SoapFault(String message, QName faultCode) {
+        super(message);
+        this.faultCode = faultCode;
+    }
+    
     /**
      * Returns the detail node. If no detail node has been set, an empty
      * <code>&lt;detail&gt;</code> is created.
@@ -134,5 +143,13 @@
      */
     public boolean hasDetails() {
         return detail == null ? false : true;
+    }
+
+    public Map<String, String> getNamespaces() {
+        return namespaces;
+    }
+
+    public void setNamespaces(Map<String, String> namespaces) {
+        this.namespaces = namespaces;
     }
 }

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AbstractSoapInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AbstractSoapInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AbstractSoapInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.net.URI;
 import java.util.Collections;
@@ -6,6 +6,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 
 public abstract class AbstractSoapInterceptor extends AbstractPhaseInterceptor<SoapMessage> 

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AttachmentOutInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AttachmentOutInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AttachmentOutInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AttachmentOutInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AttachmentOutInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/AttachmentOutInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AttachmentOutInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -6,6 +6,8 @@
 import java.util.ResourceBundle;
 
 import org.apache.cxf.binding.attachment.CachedOutputStream;
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.interceptor.Fault;

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Messages.properties (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Messages.properties)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Messages.properties?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Messages.properties&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Messages.properties&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Messages.properties (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Messages.properties Mon Aug 28 14:37:48 2006
@@ -1,4 +1,5 @@
 XML_STREAM_EXC=Error reading XMLStreamReader.
+XML_WRITE_EXC=Error writing to XMLStreamWriter.
 MUST_UNDERSTAND=Can not understand QNames: {0}
 PARSER_EXC=Could not create DOM DocumentBuilder.
 NO_OPERATION=No such operation: {0}

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MultipartMessageInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MultipartMessageInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MultipartMessageInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MultipartMessageInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import org.apache.cxf.jaxb.attachment.AttachmentDeserializer;
 import org.apache.cxf.message.Message;

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MustUnderstandInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MustUnderstandInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/MustUnderstandInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -12,6 +12,9 @@
 
 import org.w3c.dom.Element;
 
+import org.apache.cxf.binding.soap.HeaderUtil;
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Interceptor;

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCInInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCInInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import org.apache.cxf.interceptor.WrappedInInterceptor;
 

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCOutInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCOutInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/RPCOutInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import org.apache.cxf.interceptor.WrappedOutInterceptor;
 

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ReadHeadersInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ReadHeadersInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ReadHeadersInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,11 +1,8 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.io.InputStream;
 import java.util.ResourceBundle;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
@@ -13,9 +10,14 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
+import org.apache.cxf.binding.soap.SoapVersionFactory;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.phase.Phase;
+import org.apache.cxf.staxutils.PartialXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 
 public class ReadHeadersInterceptor extends AbstractSoapInterceptor {
@@ -35,20 +37,18 @@
             }
             xmlReader = StaxUtils.createXMLStreamReader(in);
         }
-        DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
-        DocumentBuilder builder;
-        try {
-            builder = builderFactory.newDocumentBuilder();
-        } catch (ParserConfigurationException e) {
-            throw new SoapFault(new Message("PARSER_EXC", BUNDLE), e, SoapFault.SENDER);
-        }
-        Document doc = builder.newDocument();
+
         try {
             if (xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT) {
                 String ns = xmlReader.getNamespaceURI();
                 SoapVersion soapVersion = SoapVersionFactory.getInstance().getSoapVersion(ns);
                 message.setVersion(soapVersion);
-                StaxUtils.readDocElements(doc, xmlReader, true, message.getVersion().getBody());
+                
+                XMLStreamReader filteredReader = 
+                    new PartialXMLStreamReader(xmlReader, message.getVersion().getBody());
+                
+                Document doc = StaxUtils.read(filteredReader);
+                
                 Element envelop = (Element)doc.getChildNodes().item(0);
                 String header = soapVersion.getHeader().getLocalPart();
                 for (int i = 0; i < envelop.getChildNodes().getLength(); i++) {
@@ -59,6 +59,9 @@
                         }
                     }
                 }
+                
+                // advance just past body.
+                xmlReader.next();
             }
         } catch (XMLStreamException e) {
             throw new SoapFault(new Message("XML_STREAM_EXC", BUNDLE), e, SoapFault.SENDER);

Added: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java?rev=437849&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java (added)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java Mon Aug 28 14:37:48 2006
@@ -0,0 +1,61 @@
+package org.apache.cxf.binding.soap.interceptor;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.staxutils.FragmentStreamReader;
+import org.apache.cxf.staxutils.StaxUtils;
+
+public class Soap11FaultInInterceptor extends AbstractSoapInterceptor {
+
+    public void handleMessage(SoapMessage message) throws Fault {
+        String exMessage = null;
+        QName faultCode = null;
+        String role = null;
+        Element detail = null;
+
+        XMLStreamReader reader = message.getContent(XMLStreamReader.class);
+
+        try {
+            boolean end = false;
+            while (!end && reader.hasNext()) {
+                int event = reader.next();
+                switch (event) {
+                case XMLStreamReader.END_DOCUMENT:
+                    end = true;
+                    break;
+                case XMLStreamReader.END_ELEMENT:
+                    break;
+                case XMLStreamReader.START_ELEMENT:
+                    if (reader.getLocalName().equals("faultcode")) {
+                        faultCode = StaxUtils.readQName(reader);
+                    } else if (reader.getLocalName().equals("faultstring")) {
+                        exMessage = reader.getElementText();
+                    } else if (reader.getLocalName().equals("faultactor")) {
+                        role = reader.getElementText();
+                    } else if (reader.getLocalName().equals("detail")) {
+                        detail = StaxUtils.read(new FragmentStreamReader(reader)).getDocumentElement();
+                    }
+                    break;
+                default:
+                    break;
+                }
+            }
+        } catch (XMLStreamException e) {
+            throw new SoapFault("Could not parse message.", SoapFault.SENDER);
+        }
+
+        SoapFault fault = new SoapFault(exMessage, faultCode);
+        fault.setDetail(detail);
+        fault.setRole(role);
+
+        message.setContent(Exception.class, fault);
+    }
+
+}

Added: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java?rev=437849&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java (added)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java Mon Aug 28 14:37:48 2006
@@ -0,0 +1,95 @@
+package org.apache.cxf.binding.soap.interceptor;
+
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.staxutils.StaxUtils;
+
+public class Soap11FaultOutInterceptor extends AbstractSoapInterceptor {
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(Soap11FaultOutInterceptor.class);
+
+    public void handleMessage(SoapMessage message) throws Fault {
+        XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
+        SoapFault fault = (SoapFault) message.getContent(Exception.class);
+
+        try {
+            Map<String, String> namespaces = fault.getNamespaces();
+            for (Map.Entry<String, String> e : namespaces.entrySet()) {
+                writer.writeNamespace(e.getKey(), e.getValue());
+            }
+
+            String prefix = message.getVersion().getPrefix();
+            
+            writer.writeStartElement(prefix, "Fault");
+
+            writer.writeStartElement("faultcode");
+
+            QName faultCode = fault.getFaultCode();
+            String codeString;
+            if (faultCode.equals(SoapFault.RECEIVER)) {
+                codeString = prefix + ":Server";
+            } else if (faultCode.equals(SoapFault.SENDER)) {
+                codeString = prefix + ":Client";
+            } else if (faultCode.equals(SoapFault.VERSION_MISMATCH)) {
+                codeString = prefix + ":VersionMismatch";
+            } else if (faultCode.equals(SoapFault.MUST_UNDERSTAND)) {
+                codeString = prefix + ":MustUnderstand";
+            } else if (faultCode.equals(SoapFault.DATA_ENCODING_UNKNOWN)) {
+                codeString = prefix + ":Client";
+            } else {
+                String ns = faultCode.getNamespaceURI();
+                String codePrefix = "";
+                if (ns.length() > 0) {
+                    codePrefix = StaxUtils.getUniquePrefix(writer, ns, true) + ":";
+                }
+
+                codeString = codePrefix + faultCode.getLocalPart();
+            }
+
+            writer.writeCharacters(codeString);
+            writer.writeEndElement();
+
+            writer.writeStartElement("faultstring");
+            writer.writeCharacters(fault.getMessage());
+            writer.writeEndElement();
+
+            if (fault.hasDetails()) {
+                Element detail = fault.getDetail();
+
+                writer.writeStartElement("detail");
+
+                NodeList details = detail.getChildNodes();
+                for (int i = 0; i < details.getLength(); i++) {
+                    StaxUtils.writeNode(details.item(i), writer, true);
+                }
+
+                // Details
+                writer.writeEndElement();
+            }
+
+            if (fault.getRole() != null) {
+                writer.writeStartElement("faultactor");
+                writer.writeCharacters(fault.getRole());
+                writer.writeEndElement();
+            }
+
+            // Fault
+            writer.writeEndElement();
+        } catch (XMLStreamException xe) {
+            throw new Fault(new Message("XML_WRITE_EXC", BUNDLE), xe);
+        }
+    }
+
+}

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,10 +1,11 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.net.URI;
 import java.util.Set;
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.interceptor.Interceptor;
 
 public interface SoapInterceptor extends Interceptor<SoapMessage> {

Copied: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java (from r437808, incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapOutInterceptor.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?p2=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java&p1=incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapOutInterceptor.java&r1=437808&r2=437849&rev=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapOutInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java Mon Aug 28 14:37:48 2006
@@ -1,4 +1,4 @@
-package org.apache.cxf.binding.soap;
+package org.apache.cxf.binding.soap.interceptor;
 
 import java.util.ResourceBundle;
 
@@ -7,6 +7,10 @@
 
 import org.w3c.dom.Element;
 
+import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.binding.soap.SoapFault;
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.phase.Phase;

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java Mon Aug 28 14:37:48 2006
@@ -12,6 +12,9 @@
 
 import org.apache.cxf.binding.attachment.AttachmentImpl;
 import org.apache.cxf.binding.attachment.AttachmentUtil;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor;
+import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java Mon Aug 28 14:37:48 2006
@@ -12,6 +12,7 @@
 
 import org.apache.cxf.binding.attachment.AttachmentImpl;
 import org.apache.cxf.binding.attachment.AttachmentUtil;
+import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.message.Attachment;
 
@@ -45,6 +46,7 @@
                 headerChilds.add(element);
             }
         }
+
         assertEquals(2, headerChilds.size());
         for (int i = 0; i < headerChilds.size(); i++) {
             Element ele = headerChilds.get(i);

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java Mon Aug 28 14:37:48 2006
@@ -12,7 +12,6 @@
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
-
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java Mon Aug 28 14:37:48 2006
@@ -11,6 +11,8 @@
 
 import org.w3c.dom.Element;
 
+import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
+import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.staxutils.StaxUtils;
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/attachments/AttachmentTest.java Mon Aug 28 14:37:48 2006
@@ -27,12 +27,12 @@
 import javax.xml.ws.handler.MessageContext;
 
 import org.apache.cxf.binding.attachment.CachedOutputStream;
-import org.apache.cxf.binding.soap.MultipartMessageInterceptor;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.TestBase;
 import org.apache.cxf.binding.soap.TestUtil;
+import org.apache.cxf.binding.soap.interceptor.MultipartMessageInterceptor;
 import org.apache.cxf.bindings.soap.attachments.types.DetailType;
 import org.apache.cxf.jaxb.attachment.AttachmentDeserializer;
 import org.apache.cxf.jaxb.attachment.AttachmentSerializer;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBus.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBus.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBus.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBus.java Mon Aug 28 14:37:48 2006
@@ -2,7 +2,6 @@
 
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
@@ -10,35 +9,26 @@
 import org.apache.cxf.configuration.ConfigurationBuilder;
 import org.apache.cxf.configuration.impl.ConfigurationBuilderImpl;
 import org.apache.cxf.extension.ExtensionManagerImpl;
-import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.resource.DefaultResourceManager;
 import org.apache.cxf.resource.PropertiesResolver;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.resource.ResourceResolver;
 import org.apache.cxf.resource.SinglePropertyResolver;
 
-public class CXFBus implements Bus {
+public class CXFBus extends AbstractBasicInterceptorProvider implements Bus {
     
     public static final String BUS_PROPERTY_NAME = "bus";
     
     private static final String BUS_EXTENSION_RESOURCE = "META-INF/bus-extensions.xml";
     
     enum State { INITIAL, RUNNING, SHUTDOWN };
-    
-    
-    
-    
-    
-    private List<Interceptor> inInterceptors;
-    private List<Interceptor> outInterceptors;
-    private List<Interceptor> faultInterceptors;
+
     private Map<Class, Object> extensions;
     private Configuration configuration;
     private String id;
     private State state;
     
-    
-    
     protected CXFBus() {
         this(new HashMap<Class, Object>());
     }
@@ -85,18 +75,7 @@
         state = State.INITIAL;
 
     }
-    
-    public List<Interceptor> getFaultInterceptors() {
-        return faultInterceptors;
-    }
 
-    public List<Interceptor> getInInterceptors() {
-        return inInterceptors;
-    }    
-
-    public List<Interceptor> getOutInterceptors() {
-        return outInterceptors;
-    }
       
     public <T> T getExtension(Class<T> extensionType) {
         Object obj = extensions.get(extensionType);
@@ -148,7 +127,4 @@
     protected State getState() {
         return state;
     }
-    
-    
-    
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/EndpointImpl.java Mon Aug 28 14:37:48 2006
@@ -14,6 +14,7 @@
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
+import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.EndpointInfo;
@@ -28,12 +29,21 @@
     private EndpointInfo endpointInfo;
     private Executor executor;
     private Bus bus;
+    private Interceptor faultInterceptor;
     
     public EndpointImpl(Bus bus, Service s, EndpointInfo ei) {
         this.bus = bus;
         service = s;
         endpointInfo = ei;
         createBinding(endpointInfo.getBinding());
+    }
+
+    public Interceptor getFaultInterceptor() {
+        return faultInterceptor;
+    }
+
+    public void setFaultInterceptor(Interceptor faultInterceptor) {
+        this.faultInterceptor = faultInterceptor;
     }
 
     public EndpointInfo getEndpointInfo() {

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultChainIntiatorInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultChainIntiatorInterceptor.java?rev=437849&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultChainIntiatorInterceptor.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultChainIntiatorInterceptor.java Mon Aug 28 14:37:48 2006
@@ -0,0 +1,49 @@
+package org.apache.cxf.interceptor;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.Binding;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.PhaseInterceptorChain;
+import org.apache.cxf.phase.PhaseManager;
+import org.apache.cxf.service.Service;
+
+public class FaultChainIntiatorInterceptor implements Interceptor<Message> {
+    Endpoint endpoint;
+    Bus bus;
+
+    public FaultChainIntiatorInterceptor(Endpoint endpoint, Bus bus) {
+        super();
+        this.endpoint = endpoint;
+        this.bus = bus;
+    }
+
+    public void handleMessage(Message m) {
+        Message message = endpoint.getBinding().createMessage(m);
+        Exchange exchange = new ExchangeImpl();
+        exchange.setInMessage(message);
+        message.setExchange(exchange);
+        
+        exchange.put(Endpoint.class, endpoint);
+        exchange.put(Service.class, endpoint.getService());
+        exchange.put(Binding.class, endpoint.getBinding());
+        exchange.put(Bus.class, bus);
+        exchange.setDestination(m.getDestination());
+        
+        // setup chain
+        PhaseInterceptorChain chain = new PhaseInterceptorChain(bus.getExtension(PhaseManager.class)
+            .getInPhases());
+        chain.add(bus.getOutFaultInterceptors());
+        chain.add(endpoint.getOutFaultInterceptors());
+        chain.add(endpoint.getBinding().getOutFaultInterceptors());
+        chain.add(endpoint.getService().getOutFaultInterceptors());
+
+        chain.doIntercept(message);        
+    }
+
+    public void handleFault(Message message) {
+    }
+   
+}

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/WrappedInInterceptor.java Mon Aug 28 14:37:48 2006
@@ -4,7 +4,6 @@
 import java.util.List;
 import java.util.ResourceBundle;
 
-import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -33,8 +32,7 @@
         DepthXMLStreamReader xmlReader = getXMLStreamReader(message);
 
         // Trying to find the operation name from the XML.
-        if (xmlReader.getEventType() != XMLStreamConstants.START_ELEMENT
-            && !StaxUtils.toNextElement(xmlReader)) {
+        if (!StaxUtils.toNextElement(xmlReader)) {
             throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION_ELEMENT", BUNDLE));
         }
         BindingOperationInfo operation = message.getExchange().get(BindingOperationInfo.class);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ChainInitiationObserver.java Mon Aug 28 14:37:48 2006
@@ -39,7 +39,8 @@
         chain.add(endpoint.getInInterceptors());
         chain.add(endpoint.getBinding().getInInterceptors());
         chain.add(endpoint.getService().getInInterceptors());
-
+        chain.setFaultInterceptor(endpoint.getFaultInterceptor());
+        
         chain.doIntercept(message);        
     }
 }

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/ServiceWSDLBuilderTest.java Mon Aug 28 14:37:48 2006
@@ -34,7 +34,7 @@
 public class ServiceWSDLBuilderTest extends TestCase {
 
     private static final Logger LOG = Logger.getLogger(ServiceWSDLBuilderTest.class.getName());
-    private static final String WSDL_PATH = "/wsdl/hello_world.wsdl";
+    private static final String WSDL_PATH = "hello_world.wsdl";
     
     private Definition def;
     private Definition newDef;

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java Mon Aug 28 14:37:48 2006
@@ -30,7 +30,7 @@
 public class WSDLServiceBuilderTest extends TestCase {
 
     private static final Logger LOG = Logger.getLogger(WSDLServiceBuilderTest.class.getName());
-    private static final String WSDL_PATH = "/wsdl/hello_world.wsdl";
+    private static final String WSDL_PATH = "hello_world.wsdl";
     private Definition def;
     private Service service;
     private ServiceInfo serviceInfo;

Added: incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl?rev=437849&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl (added)
+++ incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl Mon Aug 28 14:37:48 2006
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://apache.org/hello_world_soap_http/types"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <wsdl:types>
+        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
+            elementFormDefault="qualified">
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+            <element name="sayHi">
+                <complexType/>
+            </element>
+            <element name="sayHiResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="tns:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="pingMe">
+                <complexType/>
+            </element>
+            <element name="pingMeResponse">
+                <complexType/>
+            </element>
+            <element name="faultDetail">
+                <complexType>
+                    <sequence>
+                        <element name="minor" type="short"/>
+                        <element name="major" type="short"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part element="x1:sayHi" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="x1:sayHiResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeRequest">
+        <wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+        <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="Greeter">
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+        </wsdl:operation>
+
+        <wsdl:operation name="pingMe">
+            <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+            <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+            <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
+    </wsdl:portType>
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="sayHiRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+
+        <wsdl:operation name="pingMe">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="pingMeFault">
+                <soap:fault name="pingMeFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        
+    </wsdl:binding>
+    <wsdl:service name="SOAPService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+            <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptor.java Mon Aug 28 14:37:48 2006
@@ -10,8 +10,8 @@
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.soap.SOAPHandler;
 
-import org.apache.cxf.binding.soap.SoapInterceptor;
 import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.SoapInterceptor;
 import org.apache.cxf.jaxws.handler.AbstractProtocolHandlerInterceptor;
 import org.apache.cxf.message.Message;
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java?rev=437849&r1=437848&r2=437849&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxwsEndpointImpl.java Mon Aug 28 14:37:48 2006
@@ -47,7 +47,7 @@
         }
         handlerInterceptors.add(new StreamHandlerInterceptor(binding));
         
-        List<Interceptor> fault = super.getFaultInterceptors();
+        List<Interceptor> fault = super.getOutFaultInterceptors();
         fault.addAll(handlerInterceptors);
         List<Interceptor> in = super.getInInterceptors();
         in.addAll(handlerInterceptors);



Mime
View raw message