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 2006/08/25 15:17:37 UTC

svn commit: r436785 [3/18] - in /incubator/cxf/trunk: ./ api/ api/src/main/java/org/apache/cxf/buslifecycle/ api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/interceptor/ api/src/...

Propchange: incubator/cxf/trunk/api/src/main/resources/config-metadata/jms-server-config.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/configuration/security.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/configuration/std-types.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http-conf.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd (original)
+++ incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd Fri Aug 25 06:16:36 2006
@@ -1,77 +1,77 @@
-<?xml version="1.0" encoding="UTF-8" ?> 
-<!-- 
- 
-Copyright 2001 - 2005, International Business Machines Corporation and Microsoft Corporation
-All Rights Reserved
-
-License for WSDL Schema Files
-
-The Authors grant permission to copy and distribute the WSDL Schema 
-Files in any medium without fee or royalty as long as this notice and 
-license are distributed with them.  The originals of these files can 
-be located at:
-
-http://schemas.xmlsoap.org/wsdl/http/wsdl-http.xsd
-
-THESE SCHEMA FILES ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS 
-OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THESE FILES, INCLUDING, BUT NOT 
-LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 
-NON-INFRINGEMENT OR TITLE.  THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, 
-INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR 
-RELATING TO ANY USE OR DISTRIBUTION OF THESE FILES.
-
-The name and trademarks of the Authors may NOT be used in any manner, 
-including advertising or publicity pertaining to these files or any program 
-or service that uses these files, written prior permission.  Title to copyright 
-in these files will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
-
-
-
-  --> 
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
-        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
-        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-        targetNamespace="http://schemas.xmlsoap.org/wsdl/http/">
-
-	<import namespace = "http://schemas.xmlsoap.org/wsdl/" />
-
-   	<element name="address" type="http:addressType"/>
-
-   	<complexType name="addressType">
-		<complexContent>
-		<extension base="wsdl:tExtensibilityElement">
-			<sequence/>
-   			<attribute name="location" type="anyURI" use="required"/>
-		</extension>
-		</complexContent>
-   	</complexType>
-
-   	<element name="binding" type="http:bindingType"/>
-   	<complexType name="bindingType">
-		<complexContent>
-		<extension base="wsdl:tExtensibilityElement">
-			<sequence/>
-	      		<attribute name="verb" type="NMTOKEN" use="required"/>
-		</extension>
-		</complexContent>
-   	</complexType>
-
-   	<element name="operation" type="http:operationType"/>
-   	<complexType name="operationType">
-		<complexContent>
-		<extension base="wsdl:tExtensibilityElement">
-			<sequence/>
-	      		<attribute name="location" type="anyURI" use="required"/>
-		</extension>
-		</complexContent>
-	</complexType>
-
-   	<element name="urlEncoded">
-      		<complexType/>  		
-   	</element>
-   	<element name="urlReplacement">
-      		<complexType/>
-     	</element>
+<?xml version="1.0" encoding="UTF-8" ?> 
+<!-- 
+ 
+Copyright 2001 - 2005, International Business Machines Corporation and Microsoft Corporation
+All Rights Reserved
+
+License for WSDL Schema Files
+
+The Authors grant permission to copy and distribute the WSDL Schema 
+Files in any medium without fee or royalty as long as this notice and 
+license are distributed with them.  The originals of these files can 
+be located at:
+
+http://schemas.xmlsoap.org/wsdl/http/wsdl-http.xsd
+
+THESE SCHEMA FILES ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS 
+OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THESE FILES, INCLUDING, BUT NOT 
+LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 
+NON-INFRINGEMENT OR TITLE.  THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, 
+INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR 
+RELATING TO ANY USE OR DISTRIBUTION OF THESE FILES.
+
+The name and trademarks of the Authors may NOT be used in any manner, 
+including advertising or publicity pertaining to these files or any program 
+or service that uses these files, written prior permission.  Title to copyright 
+in these files will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+
+
+  --> 
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        targetNamespace="http://schemas.xmlsoap.org/wsdl/http/">
+
+	<import namespace = "http://schemas.xmlsoap.org/wsdl/" />
+
+   	<element name="address" type="http:addressType"/>
+
+   	<complexType name="addressType">
+		<complexContent>
+		<extension base="wsdl:tExtensibilityElement">
+			<sequence/>
+   			<attribute name="location" type="anyURI" use="required"/>
+		</extension>
+		</complexContent>
+   	</complexType>
+
+   	<element name="binding" type="http:bindingType"/>
+   	<complexType name="bindingType">
+		<complexContent>
+		<extension base="wsdl:tExtensibilityElement">
+			<sequence/>
+	      		<attribute name="verb" type="NMTOKEN" use="required"/>
+		</extension>
+		</complexContent>
+   	</complexType>
+
+   	<element name="operation" type="http:operationType"/>
+   	<complexType name="operationType">
+		<complexContent>
+		<extension base="wsdl:tExtensibilityElement">
+			<sequence/>
+	      		<attribute name="location" type="anyURI" use="required"/>
+		</extension>
+		</complexContent>
+	</complexType>
+
+   	<element name="urlEncoded">
+      		<complexType/>  		
+   	</element>
+   	<element name="urlReplacement">
+      		<complexType/>
+     	</element>
 </schema>

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/http.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/jms-conf.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/jms-context.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/jms.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/ws-addr-wsdl.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/ws-addr.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/api/src/main/resources/schemas/wsdl/wsdl.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java (original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java Fri Aug 25 06:16:36 2006
@@ -1,278 +1,278 @@
-package org.apache.cxf.phase;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.message.Message;
-import org.easymock.classextension.EasyMock;
-import org.easymock.classextension.IMocksControl;
-
-public class PhaseInterceptorChainTest extends TestCase {
-    
-    private IMocksControl control;
-    private PhaseInterceptorChain chain;
-    private Message message;
-    
-    public void setUp() {
-        
-        control = EasyMock.createNiceControl();
-        message = control.createMock(Message.class);
-        
-        Phase phase1 = new Phase("phase1", 1);
-        Phase phase2 = new Phase("phase2", 2);
-        Phase phase3 = new Phase("phase3", 3);
-        List<Phase> phases = new ArrayList<Phase>();
-        phases.add(phase1);
-        phases.add(phase2);
-        phases.add(phase3);
-        
-        chain = new PhaseInterceptorChain(phases);
-    }
-    
-    public void tearDown() {
-        control.verify();
-    }
-    
-    public void testAddOneInterceptor() {
-        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1"); 
-        control.replay();
-        chain.add(p);
-        Iterator<Interceptor<? extends Message>> it = chain.iterator();
-        assertSame(p, it.next());
-        assertTrue(!it.hasNext());
-    }
-    
-    @SuppressWarnings("unchecked")
-    public void testAddTwoInterceptorsSamePhase() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        Set<String> after = new HashSet<String>();
-        after.add("p1");
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2", after);
-        control.replay();
-        chain.add(p1);
-        chain.add(p2);
-        Iterator<Interceptor<? extends Message>> it = chain.iterator();
-       
-        assertSame("Unexpected interceptor at this position.", p1, it.next());
-        assertSame("Unexpected interceptor at this position.", p2, it.next());
-        assertTrue(!it.hasNext());
-    }
-   
-    
-    public void testSingleInterceptorPass() {
-        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p, false, false); 
-        control.replay();
-        chain.add(p);
-        chain.doIntercept(message);
-    }
-    
-    public void testSingleInterceptorFail() {
-        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p, true, true); 
-        control.replay();
-        chain.add(p);
-        chain.doIntercept(message);
-    }
-    
-    public void testTwoInterceptorsInSamePhasePass() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p1, false, false);
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
-        setUpPhaseInterceptorInvocations(p2, false, false);
-        control.replay();
-        chain.add(p2);
-        chain.add(p1);
-        chain.doIntercept(message);
-    }
-    
-    @SuppressWarnings("unchecked")
-    public void testThreeInterceptorsInSamePhaseSecondFail() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p1, false, true);
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
-        setUpPhaseInterceptorInvocations(p2, true, true);
-        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase1", "p3");
-        control.replay();
-        chain.add(p3);
-        chain.add(p2);
-        chain.add(p1);
-        chain.doIntercept(message);
-    }
-    
-    public void testTwoInterceptorsInSamePhaseSecondFail() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p1, false, true);
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
-        setUpPhaseInterceptorInvocations(p2, true, true);
-        control.replay();
-        chain.add(p2);
-        chain.add(p1);
-        chain.doIntercept(message);
-    }
-    
-    public void testTwoInterceptorsInDifferentPhasesPass() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p1, false, false);
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
-        setUpPhaseInterceptorInvocations(p2, false, false);
-        control.replay();
-        chain.add(p1);
-        chain.add(p2);
-        chain.doIntercept(message);
-    }
-    
-    public void testTwoInterceptorsInDifferentPhasesSecondFail() {
-        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
-        setUpPhaseInterceptorInvocations(p1, false, true);
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
-        setUpPhaseInterceptorInvocations(p2, true, true);
-        control.replay();
-        chain.add(p1);
-        chain.add(p2);
-        chain.doIntercept(message);
-    }
-    
-    public void testInsertionInDifferentPhasePass() {
-        
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
-        setUpPhaseInterceptorInvocations(p2, false, false);
-        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase3", "p3");
-        setUpPhaseInterceptorInvocations(p3, false, false);
-        InsertingPhaseInterceptor p1 = new InsertingPhaseInterceptor(chain, p2, "phase1", "p1");
-        control.replay();
-        chain.add(p3);
-        chain.add(p1);
-        chain.doIntercept(message);
-        assertEquals(1, p1.invoked);
-        assertEquals(0, p1.faultInvoked);
-    }
-    
-    public void testInsertionInSamePhasePass() {
-        
-        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
-        setUpPhaseInterceptorInvocations(p2, false, false);
-        Set<String> after3 = new HashSet<String>();
-        after3.add("p2");
-        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase1", "p3", after3);
-        setUpPhaseInterceptorInvocations(p3, false, false);
-        InsertingPhaseInterceptor p1 = new InsertingPhaseInterceptor(chain, p3, "phase1", "p1");
-        p1.addBefore("p2");
-        control.replay();   
-        chain.add(p1);
-        chain.add(p2);
-        chain.doIntercept(message);
-        assertEquals(1, p1.invoked);
-        assertEquals(0, p1.faultInvoked);
-    }
-    
-    public void testWrappedInvokation() throws Exception {
-        CountingPhaseInterceptor p1 = new CountingPhaseInterceptor("phase1", "p1");
-        WrapperingPhaseInterceptor p2 = new WrapperingPhaseInterceptor("phase2", "p2");
-        CountingPhaseInterceptor p3 = new CountingPhaseInterceptor("phase3", "p3");
-        
-        message.getInterceptorChain();
-        EasyMock.expectLastCall().andReturn(chain).anyTimes();
-        
-        control.replay();   
-        chain.add(p1);
-        chain.add(p2);
-        chain.add(p3);
-        chain.doIntercept(message);
-        assertEquals(1, p1.invoked);
-        assertEquals(1, p2.invoked);
-        assertEquals(1, p3.invoked);
-    }
-    
-    AbstractPhaseInterceptor setUpPhaseInterceptor(String phase, 
-                                                   String id) {
-        return setUpPhaseInterceptor(phase, id, null);     
-    }
-    
-    @SuppressWarnings("unchecked")
-    AbstractPhaseInterceptor setUpPhaseInterceptor(String phase, 
-                                                   String id,
-                                                   Set<String> a) {
-        AbstractPhaseInterceptor p = control.createMock(AbstractPhaseInterceptor.class);
-        EasyMock.expect(p.getPhase()).andReturn(phase).anyTimes();
-        EasyMock.expect(p.getId()).andReturn(id).anyTimes();
-        Set<String> before = new HashSet<String>();
-        Set<String> after = null == a ? new HashSet<String>() : a;
-        EasyMock.expect(p.getBefore()).andReturn(before).anyTimes();
-        EasyMock.expect(p.getAfter()).andReturn(after).anyTimes();
-        
-        return p;
-    }
-    
-    @SuppressWarnings("unchecked")
-    void setUpPhaseInterceptorInvocations(AbstractPhaseInterceptor p,
-                                          boolean fail,
-                                          boolean expectFault) {
-        p.handleMessage(message);
-        if (fail) {
-            EasyMock.expectLastCall().andThrow(new RuntimeException());
-            message.setContent(EasyMock.isA(Class.class), EasyMock.isA(Exception.class));
-            EasyMock.expectLastCall();
-        } else {
-            EasyMock.expectLastCall();
-        } 
-        if (expectFault) {
-            p.handleFault(message);     
-            EasyMock.expectLastCall();
-        } 
-    }
-    
-    public class InsertingPhaseInterceptor extends AbstractPhaseInterceptor<Message> {
-        int invoked;
-        int faultInvoked;
-        private final PhaseInterceptorChain insertionChain;
-        private final AbstractPhaseInterceptor insertionInterceptor;
-        
-        
-        public InsertingPhaseInterceptor(PhaseInterceptorChain c,
-                                         AbstractPhaseInterceptor i, 
-                                         String phase, 
-                                         String id) {
-            setPhase(phase);
-            setId(id);            
-            insertionChain = c;
-            insertionInterceptor = i;
-        }
-
-        public void handleMessage(Message m) {
-            insertionChain.add(insertionInterceptor);
-            invoked++;
-        }
-        
-        public void handleFault(Message m) {
-            faultInvoked++;
-        }
-    }
-    public class CountingPhaseInterceptor extends AbstractPhaseInterceptor<Message> {
-        int invoked;
-        public CountingPhaseInterceptor(String phase, 
-                                         String id) {
-            setPhase(phase);
-            setId(id);
-        }
-        public void handleMessage(Message m) {
-            invoked++;
-        }
-    }
-    public class WrapperingPhaseInterceptor extends CountingPhaseInterceptor {
-        public WrapperingPhaseInterceptor(String phase, 
-                                         String id) {
-            super(phase, id);
-        }
-        public void handleMessage(Message m) {
-            super.handleMessage(m);
-            m.getInterceptorChain().doIntercept(m);
-        }
-    }
-}
+package org.apache.cxf.phase;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
+import org.easymock.classextension.EasyMock;
+import org.easymock.classextension.IMocksControl;
+
+public class PhaseInterceptorChainTest extends TestCase {
+    
+    private IMocksControl control;
+    private PhaseInterceptorChain chain;
+    private Message message;
+    
+    public void setUp() {
+        
+        control = EasyMock.createNiceControl();
+        message = control.createMock(Message.class);
+        
+        Phase phase1 = new Phase("phase1", 1);
+        Phase phase2 = new Phase("phase2", 2);
+        Phase phase3 = new Phase("phase3", 3);
+        List<Phase> phases = new ArrayList<Phase>();
+        phases.add(phase1);
+        phases.add(phase2);
+        phases.add(phase3);
+        
+        chain = new PhaseInterceptorChain(phases);
+    }
+    
+    public void tearDown() {
+        control.verify();
+    }
+    
+    public void testAddOneInterceptor() {
+        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1"); 
+        control.replay();
+        chain.add(p);
+        Iterator<Interceptor<? extends Message>> it = chain.iterator();
+        assertSame(p, it.next());
+        assertTrue(!it.hasNext());
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void testAddTwoInterceptorsSamePhase() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        Set<String> after = new HashSet<String>();
+        after.add("p1");
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2", after);
+        control.replay();
+        chain.add(p1);
+        chain.add(p2);
+        Iterator<Interceptor<? extends Message>> it = chain.iterator();
+       
+        assertSame("Unexpected interceptor at this position.", p1, it.next());
+        assertSame("Unexpected interceptor at this position.", p2, it.next());
+        assertTrue(!it.hasNext());
+    }
+   
+    
+    public void testSingleInterceptorPass() {
+        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p, false, false); 
+        control.replay();
+        chain.add(p);
+        chain.doIntercept(message);
+    }
+    
+    public void testSingleInterceptorFail() {
+        AbstractPhaseInterceptor p = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p, true, true); 
+        control.replay();
+        chain.add(p);
+        chain.doIntercept(message);
+    }
+    
+    public void testTwoInterceptorsInSamePhasePass() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p1, false, false);
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
+        setUpPhaseInterceptorInvocations(p2, false, false);
+        control.replay();
+        chain.add(p2);
+        chain.add(p1);
+        chain.doIntercept(message);
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void testThreeInterceptorsInSamePhaseSecondFail() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p1, false, true);
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
+        setUpPhaseInterceptorInvocations(p2, true, true);
+        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase1", "p3");
+        control.replay();
+        chain.add(p3);
+        chain.add(p2);
+        chain.add(p1);
+        chain.doIntercept(message);
+    }
+    
+    public void testTwoInterceptorsInSamePhaseSecondFail() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p1, false, true);
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
+        setUpPhaseInterceptorInvocations(p2, true, true);
+        control.replay();
+        chain.add(p2);
+        chain.add(p1);
+        chain.doIntercept(message);
+    }
+    
+    public void testTwoInterceptorsInDifferentPhasesPass() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p1, false, false);
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
+        setUpPhaseInterceptorInvocations(p2, false, false);
+        control.replay();
+        chain.add(p1);
+        chain.add(p2);
+        chain.doIntercept(message);
+    }
+    
+    public void testTwoInterceptorsInDifferentPhasesSecondFail() {
+        AbstractPhaseInterceptor p1 = setUpPhaseInterceptor("phase1", "p1");
+        setUpPhaseInterceptorInvocations(p1, false, true);
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
+        setUpPhaseInterceptorInvocations(p2, true, true);
+        control.replay();
+        chain.add(p1);
+        chain.add(p2);
+        chain.doIntercept(message);
+    }
+    
+    public void testInsertionInDifferentPhasePass() {
+        
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase2", "p2");
+        setUpPhaseInterceptorInvocations(p2, false, false);
+        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase3", "p3");
+        setUpPhaseInterceptorInvocations(p3, false, false);
+        InsertingPhaseInterceptor p1 = new InsertingPhaseInterceptor(chain, p2, "phase1", "p1");
+        control.replay();
+        chain.add(p3);
+        chain.add(p1);
+        chain.doIntercept(message);
+        assertEquals(1, p1.invoked);
+        assertEquals(0, p1.faultInvoked);
+    }
+    
+    public void testInsertionInSamePhasePass() {
+        
+        AbstractPhaseInterceptor p2 = setUpPhaseInterceptor("phase1", "p2");
+        setUpPhaseInterceptorInvocations(p2, false, false);
+        Set<String> after3 = new HashSet<String>();
+        after3.add("p2");
+        AbstractPhaseInterceptor p3 = setUpPhaseInterceptor("phase1", "p3", after3);
+        setUpPhaseInterceptorInvocations(p3, false, false);
+        InsertingPhaseInterceptor p1 = new InsertingPhaseInterceptor(chain, p3, "phase1", "p1");
+        p1.addBefore("p2");
+        control.replay();   
+        chain.add(p1);
+        chain.add(p2);
+        chain.doIntercept(message);
+        assertEquals(1, p1.invoked);
+        assertEquals(0, p1.faultInvoked);
+    }
+    
+    public void testWrappedInvokation() throws Exception {
+        CountingPhaseInterceptor p1 = new CountingPhaseInterceptor("phase1", "p1");
+        WrapperingPhaseInterceptor p2 = new WrapperingPhaseInterceptor("phase2", "p2");
+        CountingPhaseInterceptor p3 = new CountingPhaseInterceptor("phase3", "p3");
+        
+        message.getInterceptorChain();
+        EasyMock.expectLastCall().andReturn(chain).anyTimes();
+        
+        control.replay();   
+        chain.add(p1);
+        chain.add(p2);
+        chain.add(p3);
+        chain.doIntercept(message);
+        assertEquals(1, p1.invoked);
+        assertEquals(1, p2.invoked);
+        assertEquals(1, p3.invoked);
+    }
+    
+    AbstractPhaseInterceptor setUpPhaseInterceptor(String phase, 
+                                                   String id) {
+        return setUpPhaseInterceptor(phase, id, null);     
+    }
+    
+    @SuppressWarnings("unchecked")
+    AbstractPhaseInterceptor setUpPhaseInterceptor(String phase, 
+                                                   String id,
+                                                   Set<String> a) {
+        AbstractPhaseInterceptor p = control.createMock(AbstractPhaseInterceptor.class);
+        EasyMock.expect(p.getPhase()).andReturn(phase).anyTimes();
+        EasyMock.expect(p.getId()).andReturn(id).anyTimes();
+        Set<String> before = new HashSet<String>();
+        Set<String> after = null == a ? new HashSet<String>() : a;
+        EasyMock.expect(p.getBefore()).andReturn(before).anyTimes();
+        EasyMock.expect(p.getAfter()).andReturn(after).anyTimes();
+        
+        return p;
+    }
+    
+    @SuppressWarnings("unchecked")
+    void setUpPhaseInterceptorInvocations(AbstractPhaseInterceptor p,
+                                          boolean fail,
+                                          boolean expectFault) {
+        p.handleMessage(message);
+        if (fail) {
+            EasyMock.expectLastCall().andThrow(new RuntimeException());
+            message.setContent(EasyMock.isA(Class.class), EasyMock.isA(Exception.class));
+            EasyMock.expectLastCall();
+        } else {
+            EasyMock.expectLastCall();
+        } 
+        if (expectFault) {
+            p.handleFault(message);     
+            EasyMock.expectLastCall();
+        } 
+    }
+    
+    public class InsertingPhaseInterceptor extends AbstractPhaseInterceptor<Message> {
+        int invoked;
+        int faultInvoked;
+        private final PhaseInterceptorChain insertionChain;
+        private final AbstractPhaseInterceptor insertionInterceptor;
+        
+        
+        public InsertingPhaseInterceptor(PhaseInterceptorChain c,
+                                         AbstractPhaseInterceptor i, 
+                                         String phase, 
+                                         String id) {
+            setPhase(phase);
+            setId(id);            
+            insertionChain = c;
+            insertionInterceptor = i;
+        }
+
+        public void handleMessage(Message m) {
+            insertionChain.add(insertionInterceptor);
+            invoked++;
+        }
+        
+        public void handleFault(Message m) {
+            faultInvoked++;
+        }
+    }
+    public class CountingPhaseInterceptor extends AbstractPhaseInterceptor<Message> {
+        int invoked;
+        public CountingPhaseInterceptor(String phase, 
+                                         String id) {
+            setPhase(phase);
+            setId(id);
+        }
+        public void handleMessage(Message m) {
+            invoked++;
+        }
+    }
+    public class WrapperingPhaseInterceptor extends CountingPhaseInterceptor {
+        public WrapperingPhaseInterceptor(String phase, 
+                                         String id) {
+            super(phase, id);
+        }
+        public void handleMessage(Message m) {
+            super.handleMessage(m);
+            m.getInterceptorChain().doIntercept(m);
+        }
+    }
+}

Propchange: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/phase/PhaseInterceptorChainTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/checkstyle.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/BeanGenMojo.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/CodegenUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java (original)
+++ incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java Fri Aug 25 06:16:36 2006
@@ -1,184 +1,184 @@
-package org.apache.cxf.maven_plugin;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.cxf.tools.wsdl2java.WSDLToJava;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.tools.ant.ExitException;
-import org.apache.tools.ant.util.optional.NoExitSecurityManager;
-/**
- * @goal wsdl2java
- * @description CXF WSDL To Java Tool
- */
-public class WSDL2JavaMojo extends AbstractMojo {
-    /**
-     * @parameter
-     */
-    String testSourceRoot;
-    
-    /**
-     * @parameter  expression="${project.build.directory}/generated/src/main/java"
-     * @required
-     */
-    String sourceRoot;
-    
-    /**
-     * @parameter  expression="${project.build.outputDirectory}"
-     * @required
-     */
-    String classesDirectory;
-    
-    /**
-     * @parameter  expression="${project.compileClasspathElements}"
-     * @required
-     */
-    List classpathElements;
-
-    /**
-     * @parameter expression="${project}"
-     * @required
-     */
-    MavenProject project;
-    
-    
-    /**
-     * @parameter
-     */
-    WsdlOption wsdlOptions[];
-
-    public void execute() throws MojoExecutionException {
-        String outputDir = testSourceRoot == null ? sourceRoot : testSourceRoot;
-        File outputDirFile = new File(outputDir);
-        outputDirFile.mkdirs();
-        
-        File classesDir = new File(classesDirectory);
-        classesDir.mkdirs();
-
-        
-        if (wsdlOptions == null) {
-            throw new MojoExecutionException("Must specify wsdlOptions");           
-        }
-
-        StringBuffer buf = new StringBuffer();
-        Iterator it = classpathElements.iterator();
-        while (it.hasNext()) {
-            buf.append(it.next().toString());
-            buf.append(File.pathSeparatorChar);
-        }
-        String newCp = buf.toString();
-        
-        String cp = System.getProperty("java.class.path");
-        SecurityManager oldSm = System.getSecurityManager();
-        long timestamp = CodegenUtils.getCodegenTimestamp();
-        boolean result = true;
-        try {
-            System.setProperty("java.class.path", newCp);
-            System.setSecurityManager(new NoExitSecurityManager());
-        
-            for (int x = 0; x < wsdlOptions.length; x++) {
-                processWsdl(wsdlOptions[x], outputDirFile, timestamp);
-
-                File dirs[] = wsdlOptions[x].getDeleteDirs();
-                if (dirs != null) {
-                    for (int idx = 0; idx < dirs.length; ++idx) {
-                        result = result && deleteDir(dirs[idx]);
-                    }
-                }
-            }
-        } finally {
-            System.setSecurityManager(oldSm);
-            System.setProperty("java.class.path", cp);
-        }        
-        if (project != null && sourceRoot != null) {
-            project.addCompileSourceRoot(sourceRoot);
-        }
-        if (project != null && testSourceRoot != null) {
-            project.addTestCompileSourceRoot(testSourceRoot);
-        }        
-    }
-    
-    private void processWsdl(WsdlOption wsdlOption,
-                             File outputDirFile,
-                             long cgtimestamp) throws MojoExecutionException {
-        File file = new File(wsdlOption.getWsdl());
-        File doneFile = new File(outputDirFile, "." + file.getName() + ".DONE");
-        boolean doWork = cgtimestamp > doneFile.lastModified();
-        if (!doneFile.exists()) {
-            doWork = true;
-        } else if (file.lastModified() > doneFile.lastModified()) {
-            doWork = true;
-        } else {
-            File files[] = wsdlOption.getDependencies();
-            if (files != null) {
-                for (int z = 0; z < files.length; ++z) {
-                    if (files[z].lastModified() > doneFile.lastModified()) {
-                        doWork = true;
-                    }
-                }
-            }
-        }            
-        
-        if (doWork) {
-            
-            List list = new ArrayList();
-            if (wsdlOption.getPackagenames() != null) {
-                Iterator it = wsdlOption.getPackagenames().iterator();
-                while (it.hasNext()) {
-                    list.add("-p");
-                    list.add(it.next().toString());
-                }
-            }
-            // -d specify the dir for generated source code
-            //list.add("-verbose");
-            list.add("-d");
-            list.add(outputDirFile.toString());
-            
-            if (wsdlOption.getExtraargs() != null) {
-                Iterator it = wsdlOption.getExtraargs().iterator();
-                while (it.hasNext()) {
-                    list.add(it.next().toString());
-                }
-            }            
-            list.add(wsdlOption.getWsdl());            
-            
-            
-            try {
-                try {
-                    WSDLToJava.main((String[])list.toArray(new String[list.size()]));
-                    doneFile.delete();
-                    doneFile.createNewFile();
-                } catch (ExitException e) {
-                    if (e.getStatus() == 0) {
-                        doneFile.delete();
-                        doneFile.createNewFile();
-                    } else {
-                        throw e;
-                    }
-                }
-            } catch (Throwable e) {
-                e.printStackTrace();
-                throw new MojoExecutionException(e.getMessage(), e);
-            }
-        }
-    }
-
-    private boolean deleteDir(File f) {
-        if (f.isDirectory()) {
-            File files[] = f.listFiles();
-            for (int idx = 0; idx < files.length; ++idx) {
-                deleteDir(files[idx]);
-            }
-        }
-        
-        if (f.exists()) {
-            return f.delete();
-        }
-        
-        return true;
-    }
-}
+package org.apache.cxf.maven_plugin;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.cxf.tools.wsdl2java.WSDLToJava;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.tools.ant.ExitException;
+import org.apache.tools.ant.util.optional.NoExitSecurityManager;
+/**
+ * @goal wsdl2java
+ * @description CXF WSDL To Java Tool
+ */
+public class WSDL2JavaMojo extends AbstractMojo {
+    /**
+     * @parameter
+     */
+    String testSourceRoot;
+    
+    /**
+     * @parameter  expression="${project.build.directory}/generated/src/main/java"
+     * @required
+     */
+    String sourceRoot;
+    
+    /**
+     * @parameter  expression="${project.build.outputDirectory}"
+     * @required
+     */
+    String classesDirectory;
+    
+    /**
+     * @parameter  expression="${project.compileClasspathElements}"
+     * @required
+     */
+    List classpathElements;
+
+    /**
+     * @parameter expression="${project}"
+     * @required
+     */
+    MavenProject project;
+    
+    
+    /**
+     * @parameter
+     */
+    WsdlOption wsdlOptions[];
+
+    public void execute() throws MojoExecutionException {
+        String outputDir = testSourceRoot == null ? sourceRoot : testSourceRoot;
+        File outputDirFile = new File(outputDir);
+        outputDirFile.mkdirs();
+        
+        File classesDir = new File(classesDirectory);
+        classesDir.mkdirs();
+
+        
+        if (wsdlOptions == null) {
+            throw new MojoExecutionException("Must specify wsdlOptions");           
+        }
+
+        StringBuffer buf = new StringBuffer();
+        Iterator it = classpathElements.iterator();
+        while (it.hasNext()) {
+            buf.append(it.next().toString());
+            buf.append(File.pathSeparatorChar);
+        }
+        String newCp = buf.toString();
+        
+        String cp = System.getProperty("java.class.path");
+        SecurityManager oldSm = System.getSecurityManager();
+        long timestamp = CodegenUtils.getCodegenTimestamp();
+        boolean result = true;
+        try {
+            System.setProperty("java.class.path", newCp);
+            System.setSecurityManager(new NoExitSecurityManager());
+        
+            for (int x = 0; x < wsdlOptions.length; x++) {
+                processWsdl(wsdlOptions[x], outputDirFile, timestamp);
+
+                File dirs[] = wsdlOptions[x].getDeleteDirs();
+                if (dirs != null) {
+                    for (int idx = 0; idx < dirs.length; ++idx) {
+                        result = result && deleteDir(dirs[idx]);
+                    }
+                }
+            }
+        } finally {
+            System.setSecurityManager(oldSm);
+            System.setProperty("java.class.path", cp);
+        }        
+        if (project != null && sourceRoot != null) {
+            project.addCompileSourceRoot(sourceRoot);
+        }
+        if (project != null && testSourceRoot != null) {
+            project.addTestCompileSourceRoot(testSourceRoot);
+        }        
+    }
+    
+    private void processWsdl(WsdlOption wsdlOption,
+                             File outputDirFile,
+                             long cgtimestamp) throws MojoExecutionException {
+        File file = new File(wsdlOption.getWsdl());
+        File doneFile = new File(outputDirFile, "." + file.getName() + ".DONE");
+        boolean doWork = cgtimestamp > doneFile.lastModified();
+        if (!doneFile.exists()) {
+            doWork = true;
+        } else if (file.lastModified() > doneFile.lastModified()) {
+            doWork = true;
+        } else {
+            File files[] = wsdlOption.getDependencies();
+            if (files != null) {
+                for (int z = 0; z < files.length; ++z) {
+                    if (files[z].lastModified() > doneFile.lastModified()) {
+                        doWork = true;
+                    }
+                }
+            }
+        }            
+        
+        if (doWork) {
+            
+            List list = new ArrayList();
+            if (wsdlOption.getPackagenames() != null) {
+                Iterator it = wsdlOption.getPackagenames().iterator();
+                while (it.hasNext()) {
+                    list.add("-p");
+                    list.add(it.next().toString());
+                }
+            }
+            // -d specify the dir for generated source code
+            //list.add("-verbose");
+            list.add("-d");
+            list.add(outputDirFile.toString());
+            
+            if (wsdlOption.getExtraargs() != null) {
+                Iterator it = wsdlOption.getExtraargs().iterator();
+                while (it.hasNext()) {
+                    list.add(it.next().toString());
+                }
+            }            
+            list.add(wsdlOption.getWsdl());            
+            
+            
+            try {
+                try {
+                    WSDLToJava.main((String[])list.toArray(new String[list.size()]));
+                    doneFile.delete();
+                    doneFile.createNewFile();
+                } catch (ExitException e) {
+                    if (e.getStatus() == 0) {
+                        doneFile.delete();
+                        doneFile.createNewFile();
+                    } else {
+                        throw e;
+                    }
+                }
+            } catch (Throwable e) {
+                e.printStackTrace();
+                throw new MojoExecutionException(e.getMessage(), e);
+            }
+        }
+    }
+
+    private boolean deleteDir(File f) {
+        if (f.isDirectory()) {
+            File files[] = f.listFiles();
+            for (int idx = 0; idx < files.length; ++idx) {
+                deleteDir(files[idx]);
+            }
+        }
+        
+        if (f.exists()) {
+            return f.delete();
+        }
+        
+        return true;
+    }
+}

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlOption.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/XSDToJavaMojo.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/XsdOption.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AnnotationProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AnnotationProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AnnotationVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/AnnotationVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/annotation/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/classloader/FireWallClassLoader.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/commands/ForkedCommand.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/commands/ForkedCommandException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/commands/JavaHelper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/commands/Message.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/commands/ResultBufferedCommand.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/i18n/BundleUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/i18n/Exception.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/i18n/Message.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/injection/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/injection/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/injection/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/logging/LogUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/AbstractTwoStageCache.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/Base64Exception.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/Base64Utility.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PackageUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java Fri Aug 25 06:16:36 2006
@@ -1,79 +1,79 @@
-package org.apache.cxf.common.util;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-
-import org.springframework.core.io.UrlResource;
-
-/**
- * Replace by org.springframework.core.io.support.PropertiesLoaderUtils
- * when moving to Spring 2.0.
- *
- */
-    
-public final class PropertiesLoaderUtils {
-    
-    /**
-     * Prevents instantiation.
-     */
-    private PropertiesLoaderUtils() {        
-    }
-
-    /**
-     * Load all properties from the given class path resource, using the given
-     * class loader.
-     * <p>
-     * Merges properties if more than one resource of the same name found in the
-     * class path.
-     * 
-     * @param resourceName the name of the class path resource
-     * @param classLoader the ClassLoader to use for loading (or
-     *            <code>null</code> to use the default class loader)
-     * @return the populated Properties instance
-     * @throws IOException if loading failed
-     */
-    public static Properties loadAllProperties(String resourceName, ClassLoader classLoader)
-        throws IOException {
-
-        
-        Properties properties = new Properties();
-        Enumeration<URL> urls = classLoader.getResources(resourceName);
-
-        while (urls.hasMoreElements()) {
-            URL url = urls.nextElement();
-            // TODO: May need a log here, instead of the system.out
-            InputStream is = null;
-            try {
-                UrlResource ur = new UrlResource(url);
-                is = ur.getInputStream();
-                properties.loadFromXML(new BufferedInputStream(is));
-            } finally {
-                if (is != null) {
-                    is.close();
-                }
-            }
-        }
-        return properties;
-    }
-
-    /**
-     * Retrieves the names of all properties that bind to the specified value.
-     * 
-     * @param properties the properties to search
-     * @param value the property value 
-     * @return the list of property names
-     */
-    public static Collection<String> getPropertyNames(Properties properties, String value) {
-        Collection<String> names = new ArrayList<String>();
-        Enumeration<?> e = properties.propertyNames();
-        while (e.hasMoreElements()) {
-            String name = (String)e.nextElement();
-            if (value.equals(properties.getProperty(name))) {
-                names.add(name);
-            }            
-        }
-        return names;
-    }
-
-}
+package org.apache.cxf.common.util;
+
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+
+import org.springframework.core.io.UrlResource;
+
+/**
+ * Replace by org.springframework.core.io.support.PropertiesLoaderUtils
+ * when moving to Spring 2.0.
+ *
+ */
+    
+public final class PropertiesLoaderUtils {
+    
+    /**
+     * Prevents instantiation.
+     */
+    private PropertiesLoaderUtils() {        
+    }
+
+    /**
+     * Load all properties from the given class path resource, using the given
+     * class loader.
+     * <p>
+     * Merges properties if more than one resource of the same name found in the
+     * class path.
+     * 
+     * @param resourceName the name of the class path resource
+     * @param classLoader the ClassLoader to use for loading (or
+     *            <code>null</code> to use the default class loader)
+     * @return the populated Properties instance
+     * @throws IOException if loading failed
+     */
+    public static Properties loadAllProperties(String resourceName, ClassLoader classLoader)
+        throws IOException {
+
+        
+        Properties properties = new Properties();
+        Enumeration<URL> urls = classLoader.getResources(resourceName);
+
+        while (urls.hasMoreElements()) {
+            URL url = urls.nextElement();
+            // TODO: May need a log here, instead of the system.out
+            InputStream is = null;
+            try {
+                UrlResource ur = new UrlResource(url);
+                is = ur.getInputStream();
+                properties.loadFromXML(new BufferedInputStream(is));
+            } finally {
+                if (is != null) {
+                    is.close();
+                }
+            }
+        }
+        return properties;
+    }
+
+    /**
+     * Retrieves the names of all properties that bind to the specified value.
+     * 
+     * @param properties the properties to search
+     * @param value the property value 
+     * @return the list of property names
+     */
+    public static Collection<String> getPropertyNames(Properties properties, String value) {
+        Collection<String> names = new ArrayList<String>();
+        Enumeration<?> e = properties.propertyNames();
+        while (e.hasMoreElements()) {
+            String name = (String)e.nextElement();
+            if (value.equals(properties.getProperty(name))) {
+                names.add(name);
+            }            
+        }
+        return names;
+    }
+
+}

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/PropertiesLoaderUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java Fri Aug 25 06:16:36 2006
@@ -1,64 +1,64 @@
-package org.apache.cxf.common.util;
-
-import java.io.*;
-import java.net.*;
-
-public final class StringUtils {
-
-    private StringUtils() {
-    }
-
-    public static String extract(String string, String startToken, String endToken) {
-        int start = string.indexOf(startToken) + startToken.length();
-        int end = string.lastIndexOf(endToken);
-
-        if (start == -1 || end == -1) {
-            return null;
-        }
-
-        return string.substring(start, end);
-    }
-
-    public static String wrapper(String string, String startToken, String endToken) {
-        StringBuffer sb = new StringBuffer();
-        sb.append(startToken);
-        sb.append(string);
-        sb.append(endToken);
-        return sb.toString();
-    }
-
-    public static boolean isFileExist(String file) {
-        return new File(file).exists() && new File(file).isFile();
-    }
-
-    public static boolean isFileAbsolute(String file) {
-        return isFileExist(file) && new File(file).isAbsolute();
-    }
-
-    public static URL getURL(String spec) throws MalformedURLException {
-        try {
-            return new URL(spec);
-        } catch (MalformedURLException e) {
-            return new File(spec).toURL();
-        }
-    }
-
-    public static boolean isEmpty(String str) {
-        if (str != null && str.trim().length() > 0) {
-            return false;
-        }
-        return true;
-    }
-
-    public static boolean isEqualUri(String uri1, String uri2) {
-
-        if (uri1.substring(uri1.length() - 1).equals("/") && !uri2.substring(uri2.length() - 1).equals("/")) {
-            return uri1.substring(0, uri1.length() - 1).equals(uri2);
-        } else if (uri2.substring(uri2.length() - 1).equals("/")
-                   && !uri1.substring(uri1.length() - 1).equals("/")) {
-            return uri2.substring(0, uri2.length() - 1).equals(uri1);
-        } else {
-            return uri1.equals(uri2);
-        }
-    }
-}
+package org.apache.cxf.common.util;
+
+import java.io.*;
+import java.net.*;
+
+public final class StringUtils {
+
+    private StringUtils() {
+    }
+
+    public static String extract(String string, String startToken, String endToken) {
+        int start = string.indexOf(startToken) + startToken.length();
+        int end = string.lastIndexOf(endToken);
+
+        if (start == -1 || end == -1) {
+            return null;
+        }
+
+        return string.substring(start, end);
+    }
+
+    public static String wrapper(String string, String startToken, String endToken) {
+        StringBuffer sb = new StringBuffer();
+        sb.append(startToken);
+        sb.append(string);
+        sb.append(endToken);
+        return sb.toString();
+    }
+
+    public static boolean isFileExist(String file) {
+        return new File(file).exists() && new File(file).isFile();
+    }
+
+    public static boolean isFileAbsolute(String file) {
+        return isFileExist(file) && new File(file).isAbsolute();
+    }
+
+    public static URL getURL(String spec) throws MalformedURLException {
+        try {
+            return new URL(spec);
+        } catch (MalformedURLException e) {
+            return new File(spec).toURL();
+        }
+    }
+
+    public static boolean isEmpty(String str) {
+        if (str != null && str.trim().length() > 0) {
+            return false;
+        }
+        return true;
+    }
+
+    public static boolean isEqualUri(String uri1, String uri2) {
+
+        if (uri1.substring(uri1.length() - 1).equals("/") && !uri2.substring(uri2.length() - 1).equals("/")) {
+            return uri1.substring(0, uri1.length() - 1).equals(uri2);
+        } else if (uri2.substring(uri2.length() - 1).equals("/")
+                   && !uri1.substring(uri1.length() - 1).equals("/")) {
+            return uri2.substring(0, uri2.length() - 1).equals(uri1);
+        } else {
+            return uri1.equals(uri2);
+        }
+    }
+}

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/AbstractCommandLineConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/CommandLineOption.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/CommandlineConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/Configuration.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/ConfigurationBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/ConfigurationException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/ConfigurationItemMetadata.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/ConfigurationMetadata.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/ConfigurationProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationBuilderImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationItemMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationMetadataBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationMetadataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/ConfigurationMetadataUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/DefaultConfigurationProviderFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/InMemoryProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/TypeSchema.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/configuration/impl/TypeSchemaHelper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/event/Event.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/event/EventCache.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/event/EventFilter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/event/EventListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java?rev=436785&r1=436784&r2=436785&view=diff
==============================================================================
--- incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java (original)
+++ incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java Fri Aug 25 06:16:36 2006
@@ -1,65 +1,65 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cxf.helpers;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-public final class JavaUtils {
-
-    /** Use this character as suffix */
-    static final char KEYWORD_PREFIX = '_';
-
-    /**
-     * These are java keywords as specified at the following URL.
-     * http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#229308
-     * Note that false, true, and null are not strictly keywords; they are
-     * literal values, but for the purposes of this array, they can be treated
-     * as literals.
-     */
-    private static final Set<String> KEYWORDS = new HashSet<String>(Arrays.asList(
-        "abstract", "assert", "boolean", "break", "byte", "case", "catch",
-        "char", "class", "const", "continue", "default", "do", "double",
-        "else", "enum", "extends", "false", "final", "finally", "float", "for", "goto",
-        "if", "implements", "import", "instanceof", "int", "interface", "long",
-        "native", "new", "null", "package", "private", "protected", "public",
-        "return", "short", "static", "strictfp", "super", "switch",
-        "synchronized", "this", "throw", "throws", "transient", "true", "try",
-        "void", "volatile", "while"
-    ));
-
-    private JavaUtils() {
-    }
-    
-    /**
-     * checks if the input string is a valid java keyword.
-     * 
-     * @return boolean true/false
-     */
-    public static boolean isJavaKeyword(String keyword) {
-        return KEYWORDS.contains(keyword); 
-    }
-
-    /**
-     * Turn a java keyword string into a non-Java keyword string. (Right now
-     * this simply means appending an underscore.)
-     */
-    public static String makeNonJavaKeyword(String keyword) {
-        return KEYWORD_PREFIX + keyword;
-    }
-
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cxf.helpers;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public final class JavaUtils {
+
+    /** Use this character as suffix */
+    static final char KEYWORD_PREFIX = '_';
+
+    /**
+     * These are java keywords as specified at the following URL.
+     * http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#229308
+     * Note that false, true, and null are not strictly keywords; they are
+     * literal values, but for the purposes of this array, they can be treated
+     * as literals.
+     */
+    private static final Set<String> KEYWORDS = new HashSet<String>(Arrays.asList(
+        "abstract", "assert", "boolean", "break", "byte", "case", "catch",
+        "char", "class", "const", "continue", "default", "do", "double",
+        "else", "enum", "extends", "false", "final", "finally", "float", "for", "goto",
+        "if", "implements", "import", "instanceof", "int", "interface", "long",
+        "native", "new", "null", "package", "private", "protected", "public",
+        "return", "short", "static", "strictfp", "super", "switch",
+        "synchronized", "this", "throw", "throws", "transient", "true", "try",
+        "void", "volatile", "while"
+    ));
+
+    private JavaUtils() {
+    }
+    
+    /**
+     * checks if the input string is a valid java keyword.
+     * 
+     * @return boolean true/false
+     */
+    public static boolean isJavaKeyword(String keyword) {
+        return KEYWORDS.contains(keyword); 
+    }
+
+    /**
+     * Turn a java keyword string into a non-Java keyword string. (Right now
+     * this simply means appending an underscore.)
+     */
+    public static String makeNonJavaKeyword(String keyword) {
+        return KEYWORD_PREFIX + keyword;
+    }
+
+}

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/JavaUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/MethodComparator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/MethodComparator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/NSDecl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/NSStack.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/NodeUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/src/main/java/org/apache/cxf/helpers/ServiceUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date