You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jl...@apache.org on 2007/10/25 19:10:56 UTC

svn commit: r588283 [12/18] - in /incubator/cxf/branches/jliu: ./ api/ api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/io/ api/src/main/java/org/apache/cxf/message/ api/src/main/java/org/apache/cxf/phase/ api/src/main/jav...

Modified: incubator/cxf/branches/jliu/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/pom.xml?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/pom.xml (original)
+++ incubator/cxf/branches/jliu/systests/pom.xml Thu Oct 25 10:09:20 2007
@@ -38,18 +38,28 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${basedir}/src/test/generated</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-codegen-plugin</artifactId>
                 <version>${project.version}</version>
-                <!-- this dependency seems only work in the systest module, not work in the top level-->
-                <dependencies>
-                  <dependency>
-                    <groupId>org.apache.cxf</groupId>
-                    <artifactId>cxf-rt-bindings-soap</artifactId>
-                    <version>${project.version}</version>
-                  </dependency>
-                </dependencies>
-
                 <executions>
                     <execution>
                         <id>generate-test-sources</id>
@@ -59,12 +69,20 @@
                             <wsdlOptions>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/test/resources/wsdl/pizza_service.wsdl</wsdl>
-                                    <!--extraargs>
-                                      <extraarg>-exsh</extraarg>
-                                      <extraarg>true</extraarg>
-                                      <extraarg>-V</extraarg>
-                                    </extraargs-->
+                                    <extraargs>
+                                        <extraarg>-exsh</extraarg>
+                                        <extraarg>true</extraarg>
+                                    </extraargs>
                                 </wsdlOption>
+
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/test/resources/wsdl/cxf-993.wsdl</wsdl>
+                                </wsdlOption>
+
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/test/resources/wsdl/mtom.wsdl</wsdl>
+                                </wsdlOption>
+
                             </wsdlOptions>
                         </configuration>
                         <goals>
@@ -179,11 +197,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-tools-java2wsdl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-tools-validator</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -407,12 +420,5 @@
     <properties>
         <surefire.fork.mode>pertest</surefire.fork.mode>
     </properties>
-
-    <repositories>
-        <repository>
-            <id>apache-incubator</id>
-            <url>http://people.apache.org/repo/m2-incubating-repository</url>
-        </repository>
-    </repositories>
 
 </project>

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -20,20 +20,26 @@
 package org.apache.cxf.systest.aegis;
 
 
+import java.net.URL;
 import java.util.List;
 import java.util.logging.Logger;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.authservice.AuthService;
 import org.apache.cxf.authservice.Authenticate;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.test.TestUtilities;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AegisClientServerTest extends AbstractBusClientServerTestBase {
-    static final Logger LOG = Logger.getLogger(AegisClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(AegisClientServerTest.class);
     
     @BeforeClass
     public static void startServers() throws Exception {
@@ -50,9 +56,17 @@
         AuthService service = (AuthService) proxyFactory.create();
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
+        assertTrue(service.authenticate("Joe", null, "123"));
         List<String> list = service.getRoles("Joe");
-        assertEquals(1, list.size());
+        assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));
+        assertEquals("Joe-1", list.get(1));
+        assertEquals("Joe-2", list.get(2));
+        String roles[] = service.getRolesAsArray("Joe");
+        assertEquals(2, roles.length);
+        assertEquals("Joe", roles[0]);
+        assertEquals("Joe-1", roles[1]);
+        
         assertEquals("get Joe", service.getAuthentication("Joe"));
         Authenticate au = new Authenticate();
         au.setSid("ffang");
@@ -72,9 +86,23 @@
         AuthService service = (AuthService) proxyFactory.create();
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
+        assertTrue(service.authenticate("Joe", null, "123"));
         List<String> list = service.getRoles("Joe");
-        assertEquals(1, list.size());
+        assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));
+        assertEquals("Joe-1", list.get(1));
+        assertEquals("Joe-2", list.get(2));
+        String roles[] = service.getRolesAsArray("Joe");
+        assertEquals(2, roles.length);
+        assertEquals("Joe", roles[0]);
+        assertEquals("Joe-1", roles[1]);
+        
+        roles = service.getRolesAsArray("null");
+        assertNull(roles);
+        
+        roles = service.getRolesAsArray("0");
+        assertEquals(0, roles.length);
+        
         assertEquals("get Joe", service.getAuthentication("Joe"));
         Authenticate au = new Authenticate();
         au.setSid("ffang");
@@ -82,5 +110,21 @@
         assertTrue(service.authenticate(au));
         au.setUid("ffang1");
         assertFalse(service.authenticate(au));
+    }
+    
+    @Test
+    public void testWSDL() throws Exception {
+        URL url = new URL("http://localhost:9002/jaxwsAndAegis?wsdl");
+        Document dom = XMLUtils.parse(url.openStream());
+        TestUtilities util = new TestUtilities(this.getClass());
+        util.addDefaultNamespaces();
+        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
+                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+                           + "xsd:sequence/xsd:element[@maxOccurs]",
+                           dom);
+        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
+                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
+                           + "xsd:sequence/xsd:element[@nillable='true']",
+                           dom);
     }
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -98,6 +98,20 @@
             }
         }
     }
+    
+    @Test
+    public void testNillableParameter() throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl");
+        assertNotNull("WSDL is null", wsdl);
+
+        SOAPService service = new SOAPService(wsdl, serviceName);
+        assertNotNull("Service is null", service);
+
+        PutLastTradedPricePortType port = service.getPort(portName,
+                                                          PutLastTradedPricePortType.class);
+        String result = port.nillableParameter(null);
+        assertNull(result);
+    } 
 
 
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/PutLastTradedPriceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/PutLastTradedPriceImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/PutLastTradedPriceImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/PutLastTradedPriceImpl.java Thu Oct 25 10:09:20 2007
@@ -18,6 +18,8 @@
  */
 
 package org.apache.cxf.systest.basicDOCBare;
+import java.math.BigDecimal;
+
 import javax.xml.ws.Holder;
 
 import org.apache.hello_world_doc_lit_bare.PutLastTradedPricePortType;
@@ -43,6 +45,9 @@
     
     public String bareNoParam() {
         return "testResponse";
+    }
+    public String nillableParameter(BigDecimal theRequest) {
+        return null;
     }
    
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/ControlImpl.java Thu Oct 25 10:09:20 2007
@@ -30,6 +30,7 @@
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Response;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.greeter_control.Control;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.types.FaultLocation;
@@ -43,7 +44,7 @@
             targetNamespace = "http://cxf.apache.org/greeter_control")
 public class ControlImpl implements Control {
     
-    private static final Logger LOG = Logger.getLogger(ControlImpl.class.getName());
+    private static final Logger LOG = LogUtils.getLogger(ControlImpl.class);
     
     private Map<String, Greeter> implementors; 
     private Map<String, Endpoint> endpoints;

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java Thu Oct 25 10:09:20 2007
@@ -30,6 +30,7 @@
 import org.apache.cxf.clustering.FailoverTargetSelector;
 import org.apache.cxf.clustering.RandomStrategy;
 import org.apache.cxf.clustering.SequentialStrategy;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.frontend.ClientProxy;
@@ -62,7 +63,7 @@
     protected static final String REPLICA_D =
         "http://localhost:9054/SoapContext/ReplicatedPortD"; 
     private static final Logger LOG =
-        Logger.getLogger(FailoverTest.class.getName());
+        LogUtils.getLogger(FailoverTest.class);
     private static final String FAILOVER_CONFIG =
         "org/apache/cxf/systest/clustering/failover.xml";
 
@@ -138,7 +139,8 @@
             // java.net.ConnectionException on the unavailable 
             // replica A
             //
-            assertTrue("should revert to original exception when no failover",
+            assertTrue("should revert to original exception when no failover: " 
+                       + cause,
                        cause instanceof ConnectException);
             
             // similarly the current endpoint referenced by the client 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -41,6 +41,8 @@
 import org.xml.sax.InputSource;
 
 
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -311,7 +313,13 @@
 
     @Test
     public void testJAXBObjectPAYLOADWithFeature() throws Exception {
-        createBus("org/apache/cxf/systest/dispatch/client-config.xml");
+        bus = BusFactory.getDefaultBus(false);
+        bus.shutdown(true);
+        
+        this.configFileName = "org/apache/cxf/systest/dispatch/client-config.xml";
+        SpringBusFactory bf = (SpringBusFactory)SpringBusFactory.newInstance();
+        bus = bf.createBus(configFileName, false);
+        
         URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(wsdl);
 
@@ -566,7 +574,7 @@
                 SOAPMessage reply = response.get();
                 replyBuffer = reply.getSOAPBody().getTextContent();
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
             }
         }
 
@@ -575,6 +583,7 @@
         }
     }
 
+    // REVISIT: Exception handling?
     class TestDOMSourceHandler implements AsyncHandler<DOMSource> {
 
         String replyBuffer;
@@ -584,7 +593,7 @@
                 DOMSource reply = response.get();
                 replyBuffer = DOMUtils.getChild(reply.getNode(), Node.ELEMENT_NODE).getTextContent();
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
             }
         }
 
@@ -593,6 +602,7 @@
         }
     }
 
+    // REVISIT: Exception handling?
     class TestJAXBHandler implements AsyncHandler<Object> {
 
         Object reply;
@@ -601,7 +611,7 @@
             try {
                 reply = response.get();
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
             }
         }
 
@@ -610,6 +620,7 @@
         }
     }
 
+    // REVISIT: Exception handling?
     class TestSAXSourceHandler implements AsyncHandler<SAXSource> {
 
         SAXSource reply;
@@ -628,6 +639,7 @@
         }
     }
 
+    // REVISIT: Exception handling?
     class TestStreamSourceHandler implements AsyncHandler<StreamSource> {
 
         StreamSource reply;
@@ -637,7 +649,7 @@
                 reply = response.get();
 
             } catch (Exception e) {
-                e.printStackTrace();
+                //e.printStackTrace();
             }
         }
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml Thu Oct 25 10:09:20 2007
@@ -1,3 +1,21 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you 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.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:jaxws="http://cxf.apache.org/jaxws"
@@ -5,7 +23,12 @@
 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
 
-     <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapDispatchPort" createdFromAPI="true">
+
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+	<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+
+    <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapDispatchPort" createdFromAPI="true">
          <jaxws:features>
              <bean class="org.apache.cxf.systest.dispatch.TestDispatchFeature"/>
          </jaxws:features>

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -20,9 +20,12 @@
 package org.apache.cxf.systest.factory_pattern;
 
 
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
 import java.net.URL;
+import java.net.URLConnection;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -75,7 +78,7 @@
         Map<String, String> props = new HashMap<String, String>();    
         props.put("cxf.config.file", "org/apache/cxf/systest/factory_pattern/cxf.xml");
         assertTrue("server did not launch correctly",
-                   launchServer(Server.class, props, null));
+                   launchServer(Server.class, props, null, false));
     }
 
     
@@ -124,5 +127,42 @@
         firstChar = new URL(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT 
                                 + "103?wsdl").openStream().read();
         assertTrue("firstChar :" + String.valueOf(firstChar), firstChar == '<');
+    }
+    
+    @Test
+    public void testSoapAddressLocation() throws Exception {
+        
+        assertTrue("Should have received the soap:address location " 
+                   + NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT, 
+                   checkSoapAddressLocation(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT));
+        assertTrue("Should have received the soap:address location " 
+                   + NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "20", 
+                   checkSoapAddressLocation(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "20"));
+        assertTrue("Should have received the soap:address location " 
+                   + NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "22", 
+                   checkSoapAddressLocation(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "22"));
+        assertTrue("Should have received the soap:address location " 
+                   + NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "20", 
+                   checkSoapAddressLocation(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "20"));
+        assertTrue("Should have received the soap:address location " 
+                   + NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT, 
+                   checkSoapAddressLocation(NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT));
+    }
+    
+    private boolean checkSoapAddressLocation(String address) 
+        throws Exception {
+        URL url = new URL(address + "?wsdl");
+        
+        URLConnection urlConn = url.openConnection();
+        BufferedReader br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
+        
+        while (br.ready()) {
+            String str = br.readLine();
+            if (str.contains("soap:address") 
+                && str.contains("location=" + "\"" + address + "\"")) {
+                return  true;
+            }
+        }
+        return false;
     }
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java Thu Oct 25 10:09:20 2007
@@ -262,8 +262,8 @@
         try {
             disp.invoke(ds);
             fail("Did not get expected exception");
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (HTTPException e) {
+            //expected
         }
     }
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/TestHandlerBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/TestHandlerBase.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/TestHandlerBase.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/handlers/TestHandlerBase.java Thu Oct 25 10:09:20 2007
@@ -27,6 +27,7 @@
 
 import javax.xml.ws.handler.MessageContext;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.handler_test.PingException;
 
@@ -41,7 +42,7 @@
  */
 public abstract class TestHandlerBase {
    
-    private static final Logger LOG = Logger.getLogger(TestHandlerBase.class.getName());
+    private static final Logger LOG = LogUtils.getLogger(TestHandlerBase.class);
 
     private static int sid;
     private static int sinvokedOrder;

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterImpl.java Thu Oct 25 10:09:20 2007
@@ -23,6 +23,7 @@
 
 import javax.jws.WebService;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.hello_world.Greeter;
 
 
@@ -32,7 +33,9 @@
 public class GreeterImpl implements Greeter {
 
     private static final Logger LOG = 
-        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+        LogUtils.getLogger(GreeterImpl.class,
+                           null,
+                           GreeterImpl.class.getPackage().getName());
     private String myName;
     
     public GreeterImpl() {

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java Thu Oct 25 10:09:20 2007
@@ -31,6 +31,7 @@
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.MessageContext;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.types.GreetMeResponse;
 import org.apache.cxf.greeter_control.types.PingMeResponse;
@@ -42,7 +43,9 @@
             targetNamespace = "http://cxf.apache.org/greeter_control")
 public class GreeterSessionImpl implements Greeter {
     private static final Logger LOG = 
-        Logger.getLogger(GreeterSessionImpl.class.getPackage().getName());
+        LogUtils.getLogger(GreeterSessionImpl.class,
+                           null,
+                           GreeterSessionImpl.class.getPackage().getName());
     
     @Resource
     private WebServiceContext context;

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java Thu Oct 25 10:09:20 2007
@@ -36,6 +36,7 @@
 import javax.net.ssl.TrustManagerFactory;
 import javax.xml.namespace.QName;
 
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.BusApplicationContext;
@@ -61,9 +62,11 @@
 import org.apache.hello_world.Greeter;
 import org.apache.hello_world.services.SOAPService;
 
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
+import org.springframework.context.ApplicationContext;
+
 /**
  * This class tests several issues and Conduit policies based 
  * on a set up of redirecting servers.
@@ -193,13 +196,13 @@
         return server;
     }
     
-    @Before
-    public void setUp() {
+    @BeforeClass
+    public static void setProps() {
         // TODO: Do I need this?
         System.setProperty("org.apache.cxf.bus.factory", 
             "org.apache.cxf.bus.CXFBusFactory");
     }
-
+        
     public static KeyStore getKeyStore(String ksType, String file, String ksPassword)
         throws GeneralSecurityException,
                IOException {
@@ -413,17 +416,14 @@
     @Test
     public void testGetClientFromSpringContext() throws Exception {
         startServer("Bethal");        
-        // The http conduit configuration file , it supports wildcard 
-        URL config = getClass().getResource("resources/BethalClientConfig.cxf");
+        
+        BusFactory.setDefaultBus(null);
         // The client bean configuration file
         URL beans = getClass().getResource("resources/BethalClientBeans.xml");
         // We go through the back door, setting the default bus.
-        new DefaultBusFactory().createBus(config);
-        // Init the context which contains the client bean, 
-        // and we use the already loaded bus to set the configuration
-        // The false parameter means we just use the default bus 
-        // which just set by the DefaultBusFactory
-        BusApplicationContext context = new BusApplicationContext(beans, false);
+        Bus bus = new DefaultBusFactory().createBus(beans);
+        
+        ApplicationContext context = bus.getExtension(BusApplicationContext.class);
         Greeter bethal = (Greeter)context.getBean("Bethal");        
         // verify the client side's setting
         verifyBethalClient(bethal);         

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java Thu Oct 25 10:09:20 2007
@@ -106,4 +106,10 @@
         testSuccessfulCall("resources/jaxws-publish.xml",
                            "https://localhost:9001/SoapContext/HttpsPort");
     }
+    
+    @Test
+    public final void testPKCS12Endpoint() throws Exception {
+        testSuccessfulCall("resources/pkcs12.xml",
+                           "https://localhost:9003/SoapContext/HttpsPort");
+    }
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml Thu Oct 25 10:09:20 2007
@@ -34,6 +34,9 @@
               http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
  
+
+	<import resource="classpath:org/apache/cxf/systest/http/resources/BethalClientConfig.cxf" />
+    
     <jaxws:client id="Bethal" 
     serviceClass="org.apache.hello_world.Greeter"
     serviceName="s:SOAPService"

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/genkeys.sh
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/genkeys.sh?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/genkeys.sh (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/http/resources/genkeys.sh Thu Oct 25 10:09:20 2007
@@ -25,6 +25,7 @@
 # Start with a clean slate. Remove all keystores.
 #
 rm -f *.jks
+rm -f Truststore.pem
 
 #
 # This function generates a key/self-signed certificate with the following DN.
@@ -47,5 +48,6 @@
 for name in Bethal Gordy Tarpin Poltim Morpit
 do
    genkey $name $name
+   keytool -export -keystore Truststore.jks -storepass password -alias $i -rfc >> Truststore.pem
 done
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java Thu Oct 25 10:09:20 2007
@@ -33,6 +33,7 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.Control;
@@ -60,7 +61,7 @@
  * 
  */
 public class InterceptorFaultTest extends AbstractBusClientServerTestBase {
-    private static final Logger LOG = Logger.getLogger(InterceptorFaultTest.class.getName());
+    private static final Logger LOG = LogUtils.getLogger(InterceptorFaultTest.class);
 
     private static final QName SOAP_FAULT_CODE = new QName("http://schemas.xmlsoap.org/soap/envelope/",
                                                            "Server");

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java Thu Oct 25 10:09:20 2007
@@ -19,9 +19,19 @@
 package org.apache.cxf.systest.jaxb;
 
 
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.systest.jaxb.model.ExtendedWidget;
 import org.apache.cxf.systest.jaxb.model.Widget;
 import org.apache.cxf.systest.jaxb.service.TestService;
+import org.apache.cxf.test.TestUtilities;
 import org.junit.Test;
 import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
 
@@ -29,21 +39,43 @@
 public class TestServiceTest extends AbstractDependencyInjectionSpringContextTests {
 
     private TestService testClient;
+    private TestUtilities testUtilities;
 
     public TestServiceTest() {
         setAutowireMode(AbstractDependencyInjectionSpringContextTests.AUTOWIRE_BY_NAME);
+        testUtilities = new TestUtilities(getClass());
     }
 
-
     @Test
     public void testExtraSubClassWithJaxb() throws Throwable {
-
         Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
 
         Widget widgetFromService = testClient.getWidgetById((long)42);
 
         assertEquals(expected, widgetFromService);
-
+    }
+    
+    @Test
+    public void testSchema() throws Exception {
+        URL url = new URL("http://localhost:7081/service/TestService?wsdl");
+        String s = IOUtils.toString(url.openStream());
+        assertTrue(s, s.contains("application/octet-stream"));
+    }
+    
+    @Test
+    public void testAutoFaultBeanProperties() throws Exception {
+        testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
+        testUtilities.addDefaultNamespaces();
+        testUtilities.addNamespace("ts", "http://cxf.org.apache/service");
+        Server s = testUtilities.getServerForService(new QName("http://cxf.org.apache/service", 
+                                                               "TestServiceService"));
+        Document wsdl = testUtilities.getWSDLDocument(s);
+        testUtilities.assertInvalid("//xsd:complexType[@name='TestServiceException']"
+                                    + "/xsd:sequence/xsd:element[@name='serialVersionUID']", wsdl);
+        testUtilities.assertInvalid("//xsd:complexType[@name='TestServiceException']"
+                                    + "/xsd:sequence/xsd:element[@name='privateInt']", wsdl);
+        testUtilities.assertValid("//xsd:complexType[@name='TestServiceException']"
+                                    + "/xsd:sequence/xsd:element[@name='publicString']", wsdl);
     }
 
     /*
@@ -69,5 +101,4 @@
     public void setTestClient(TestService testClient) {
         this.testClient = testClient;
     }
-
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/model/jaxb.index Thu Oct 25 10:09:20 2007
@@ -1,2 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
 Widget
-ExtendedWidget
\ No newline at end of file
+ExtendedWidget
+ExtendedWidgetWithMime
\ No newline at end of file

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestService.java Thu Oct 25 10:09:20 2007
@@ -31,5 +31,8 @@
     @WebMethod(operationName = "getWidgetById")
     Widget getWidgetById(@WebParam(name = "id")
                          long id);
+    
+    @WebMethod
+    void testExceptionMarshalling() throws TestServiceException;
 
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxb/service/TestServiceImpl.java Thu Oct 25 10:09:20 2007
@@ -33,6 +33,10 @@
         return new ExtendedWidget(id, "blah", "blah", true, true);
     }
 
+    public void testExceptionMarshalling() throws TestServiceException {
+        throw new TestServiceException("Your hovercraft is full of eels.");
+    }
+
     
 
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/AnyClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/AnyClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/AnyClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/AnyClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -32,6 +32,7 @@
 
 
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.hello_world_soap_http.any.Greeter;
@@ -43,7 +44,7 @@
 
 public final class AnyClientServerTest extends AbstractBusClientServerTestBase {
 
-    static final Logger LOG = Logger.getLogger(AnyClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(AnyClientServerTest.class);
     private final QName serviceName = new QName("http://apache.org/hello_world_soap_http/any", 
                                                 "SOAPService");
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Thu Oct 25 10:09:20 2007
@@ -58,7 +58,7 @@
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(ServerMisc.class, true));
+        assertTrue("server did not launch correctly", launchServer(ServerMisc.class));
     }
     
     @Test
@@ -226,6 +226,8 @@
     }
     
     private void runDocLitTest(DocLitWrappedCodeFirstService port) throws Exception {
+        assertEquals(24, port.echoIntDifferentWrapperName(24));
+        
         String echoMsg = port.echo("Hello");
         assertEquals("Hello", echoMsg);
         
@@ -308,6 +310,13 @@
             fail("Expected exception not found");
         } catch (ServiceTestFault ex) {
             assertEquals(10, ex.getFaultInfo().getId());
+        }
+        // CXF-1131 testcase
+        try {
+            port.throwException(-1);
+            fail("Expected exception not found");
+        } catch (ServiceTestFault ex) {
+            assertNull(ex.getFaultInfo());
         }
     }
     

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -53,6 +53,7 @@
 
 //import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
@@ -77,14 +78,14 @@
 
 public class ClientServerTest extends AbstractBusClientServerTestBase {
   
-    static final Logger LOG = Logger.getLogger(ClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(ClientServerTest.class);
     private final QName serviceName = new QName("http://apache.org/hello_world_soap_http",
                                                 "SOAPService");    
     private final QName portName = new QName("http://apache.org/hello_world_soap_http",
                                              "SoapPort");
     
     private final QName fakePortName = new QName("http://apache.org/hello_world_soap_http",
-                                                 "FackPort");
+                                                 "FakePort");
     
     
     private final QName portName1  = new QName("http://apache.org/hello_world_soap_http",
@@ -842,7 +843,6 @@
             client.invoke("greetMe", "test");        
             Object[] result = client.invoke("sayHi");
             assertNotNull("no response received from service", result);
-            System.out.println(result[0]);
             assertEquals("Bonjour", result[0]);
         } catch (Exception e) {            
             e.printStackTrace();

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java Thu Oct 25 10:09:20 2007
@@ -51,6 +51,7 @@
     int[] echoIntArray(int[] ar);
     
     @WebMethod
+    @WebResult(partName = "parameters")
     String listInput(List<String> inputs);
 
     @WebMethod
@@ -82,13 +83,17 @@
     @WebMethod
     int throwException(int i) throws ServiceTestFault;
     
+    @RequestWrapper(localName = "echoIntX")
+    @ResponseWrapper(localName = "echoIntXResponse")
+    int echoIntDifferentWrapperName(int i);
+    
     @WebMethod
     @WebResult(targetNamespace = "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService",
                name = "result")
     @RequestWrapper(className = "org.apache.cxf.systest.jaxws.Echo")
     @ResponseWrapper(className = "org.apache.cxf.systest.jaxws.EchoResponse")
     String echo(@WebParam(targetNamespace = 
-            "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService", 
+            "http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService2", 
                           name = "String_1")
                         String msg);
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Thu Oct 25 10:09:20 2007
@@ -119,11 +119,18 @@
     }
    
     public int throwException(int i) throws ServiceTestFault {
+        if (i == -1) {
+            throw new ServiceTestFault("Hello!");
+        }
         throw new ServiceTestFault(new ServiceTestFault.ServiceTestDetails(i));
     }
     
     public String echo(String msg) {
         return msg;
+    }
+
+    public int echoIntDifferentWrapperName(int i) {
+        return i;
     }
 
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/LocatorClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -26,6 +26,7 @@
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Holder;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
@@ -38,7 +39,7 @@
 
 public class LocatorClientServerTest extends AbstractBusClientServerTestBase {
 
-    static final Logger LOG = Logger.getLogger(LocatorClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(LocatorClientServerTest.class);
     private final QName serviceName = new QName("http://apache.org/locator", "LocatorService");
 
     public static class MyServer extends AbstractBusTestServerBase {

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/OASISCatalogTest.java Thu Oct 25 10:09:20 2007
@@ -19,20 +19,24 @@
 
 package org.apache.cxf.systest.jaxws;
 
+import java.io.InputStream;
 import java.net.URL;
 
 import javax.wsdl.WSDLException;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 import javax.xml.ws.WebServiceException;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.catalog.CatalogWSDLLocator;
 import org.apache.cxf.catalog.OASISCatalogManager;
+import org.apache.cxf.helpers.IOUtils;
 
 import org.apache.hello_world.Greeter;
+import org.apache.hello_world.GreeterImpl;
 import org.apache.hello_world.services.SOAPService;
 
 import org.junit.Assert;
@@ -48,6 +52,30 @@
         new QName("http://apache.org/hello_world/services",
                   "SoapPort");
 
+    @Test
+    public void testWSDLPublishWithCatalogs() throws Exception {
+        Endpoint ep = Endpoint.publish(null, new GreeterImpl());
+        try {
+            URL url = new URL("http://localhost:9000/SoapContext/SoapPort?"
+                              + "xsd=testutils/hello_world_schema2.xsd");
+            assertNotNull(url.getContent());
+            
+            
+            url = new URL("http://localhost:9000/SoapContext/SoapPort"
+                          + "?xsd=testutils/hello_world_schema.xsd");
+            String result = IOUtils.toString((InputStream)url.getContent());
+            assertTrue(result.contains("xsd=testutils/hello_world_schema2.xsd"));
+
+            url = new URL("http://localhost:9000/SoapContext/SoapPort"
+                          + "?wsdl=testutils/hello_world_messages_catalog.wsdl");
+            result = IOUtils.toString((InputStream)url.getContent());
+            assertTrue(result.contains("xsd=testutils/hello_world_schema.xsd"));
+
+        } finally {
+            ep.stop();
+        }
+    }
+    
     @Test
     public void testClientWithDefaultCatalog() throws Exception {
         URL wsdl = getClass().getResource("/wsdl/catalog/hello_world_services.wsdl");

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java Thu Oct 25 10:09:20 2007
@@ -24,6 +24,10 @@
 @WebFault()
 public class ServiceTestFault extends Exception {
     private ServiceTestDetails details;
+    
+    public ServiceTestFault(String msg) {
+        super(msg);
+    }
     public ServiceTestFault(String msg, ServiceTestDetails details) {
         super(msg);
         this.details = details;

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jbi/ClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -29,6 +29,7 @@
 import javax.xml.ws.Endpoint;
 
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxws.EndpointImpl;
@@ -50,7 +51,7 @@
 
 public class ClientServerTest extends AbstractBusClientServerTestBase {
     
-    static final Logger LOG = Logger.getLogger(ClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(ClientServerTest.class);
     private final QName serviceName = new QName(
                                       "http://apache.org/hello_world/jbi",
                                                 "HelloWorldService");

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java Thu Oct 25 10:09:20 2007
@@ -19,9 +19,10 @@
 
 package org.apache.cxf.systest.jca;
 
-import java.lang.reflect.UndeclaredThrowableException;
 import java.net.URL;
+
 import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
@@ -84,7 +85,7 @@
                                            wsdl,
                                            service.getServiceName(),
                                            portName);
-        ManagedConnectionFactoryImpl managedFactory = new ManagedConnectionFactoryImpl();
+        ManagedConnectionFactory managedFactory = new ManagedConnectionFactoryImpl();
         Subject subject = new Subject();
         ManagedConnection mc = managedFactory.createManagedConnection(subject, cri);        
         Object o = mc.getConnection(subject, cri);
@@ -97,20 +98,35 @@
             fail("The connection object should support Object method");
         }
         
+        verifyResult(o);
+    }
+    
+    
+    @Test
+    public void testGetConnectionFromSEI() throws Exception {
+        CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo();
+        requestInfo.setInterface(Greeter.class);
+        requestInfo.setAddress("http://localhost:9000/SoapContext/SoapPort");
+        
+        ManagedConnectionFactory factory = new ManagedConnectionFactoryImpl();
+        ManagedConnection mc = factory.createManagedConnection(null, requestInfo);
+        Object client = mc.getConnection(null, requestInfo);
+        
+        verifyResult(client);
+    }
+    
+    
+    private void verifyResult(Object o) throws Exception {
+        
         assertTrue("returned connect does not implement Connection interface", o instanceof Connection);
         assertTrue("returned connect does not implement Connection interface", o instanceof Greeter);
    
-        Greeter greeter = (Greeter) o;
-        
-        String response = new String("Bonjour");
-        try {       
-            for (int idx = 0; idx < 5; idx++) {
-                String reply = greeter.sayHi();
-                assertNotNull("no response received from service", reply);
-                assertEquals(response, reply);
-            }            
-        } catch (UndeclaredThrowableException ex) {
-            throw (Exception)ex.getCause();
+        Greeter greeter = (Greeter) o;   
+        String response = new String("Bonjour");      
+        for (int idx = 0; idx < 5; idx++) {
+            String reply = greeter.sayHi();
+            assertNotNull("no response received from service", reply);
+            assertEquals(response, reply);
         }
-    } 
+    }
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomPolicyTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomPolicyTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomPolicyTest.java Thu Oct 25 10:09:20 2007
@@ -45,6 +45,7 @@
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.ws.policy.WSPolicyFeature;
 import org.apache.cxf.ws.policy.selector.FirstAlternativeSelector;
@@ -93,6 +94,8 @@
             policyElements.add(DOMUtils.readXml(
                 getClass().getResourceAsStream("mtom-policy-optional.xml"))
                            .getDocumentElement());
+            getBus().getExtension(PolicyConstants.class)
+               .setNamespace(PolicyConstants.NAMESPACE_W3_200607);
         } 
         policyFeature.setPolicyElements(policyElements);       
         

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/MtomServerTest.java Thu Oct 25 10:09:20 2007
@@ -178,7 +178,9 @@
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         IOUtils.copy(inAtt.getDataHandler().getInputStream(), out);
         out.close();
-        assertTrue("Wrong size: " + out.size(), out.size() > 980 && out.size() < 1020);
+        assertTrue("Wrong size: " + out.size()
+                   + "\n" + out.toString(),
+                   out.size() > 970 && out.size() < 1020);
     }
 
     @Override

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/mtom-policy.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/mtom-policy.xml?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/mtom-policy.xml (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/mtom/mtom-policy.xml Thu Oct 25 10:09:20 2007
@@ -16,7 +16,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsp:Policy xmlns:wsp="http://www.w3.org/2006/07/ws-policy"
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
 	xmlns:mtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization">
 	<mtom:OptimizedMimeSerialization />
 </wsp:Policy>

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -28,6 +28,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.systest.jms.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -40,7 +41,7 @@
 import org.junit.Test;
 
 public class MultiTransportClientServerTest extends AbstractBusClientServerTestBase {
-    static final Logger LOG = Logger.getLogger(MultiTransportClientServerTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(MultiTransportClientServerTest.class);
     private final QName serviceName = new QName(
                                       "http://apache.org/hello_world_doc_lit",
                                                 "MultiTransportService");

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java Thu Oct 25 10:09:20 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.outofband.header;
 
+import java.math.BigDecimal;
 import java.util.Iterator;
 import java.util.List;
 
@@ -30,6 +31,7 @@
 import javax.xml.ws.Holder;
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.handler.MessageContext;
+
 import org.w3c.dom.Node;
 
 import org.apache.cxf.headers.Header;
@@ -42,6 +44,7 @@
 
 
 
+
 @javax.jws.WebService(serviceName = "SOAPService", 
                       portName = "SoapPort",
                       endpointInterface = "org.apache.hello_world_doc_lit_bare.PutLastTradedPricePortType",
@@ -140,6 +143,10 @@
     
     public String bareNoParam() {
         return "testResponse";
+    }
+
+    public String nillableParameter(BigDecimal theRequest) {
+        return null;
     }
    
 

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java Thu Oct 25 10:09:20 2007
@@ -75,6 +75,9 @@
                 response = sayHiResponse;
             } else if (n.getLocalName().equals(greetMe.getLocalPart())) {
                 response = greetMeResponse;
+            } else {
+                response = request;
+                //response.writeTo(System.out);
             }
         } catch (Exception ex) {
             ex.printStackTrace();

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -23,6 +23,12 @@
 import java.net.URL;
 
 import javax.xml.namespace.QName;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPMessage;
 
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.hello_world_rpclit.GreeterRPCLit;
@@ -35,6 +41,30 @@
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(Server.class));
+    }
+    
+    @Test
+    public void testSWA() throws Exception {
+        SOAPFactory soapFac = SOAPFactory.newInstance();
+        MessageFactory msgFac = MessageFactory.newInstance();
+        SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
+        SOAPMessage msg = msgFac.createMessage();
+        
+        QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHiWAttach");
+        msg.getSOAPBody().addChildElement(soapFac.createElement(sayHi));
+        AttachmentPart ap1 = msg.createAttachmentPart();
+        ap1.setContent("Attachment content", "text/plain");
+        msg.addAttachmentPart(ap1);
+        AttachmentPart ap2 = msg.createAttachmentPart();
+        ap2.setContent("Attachment content - Part 2", "text/plain");
+        msg.addAttachmentPart(ap2);
+        
+        SOAPConnection con = conFac.createConnection();
+        URL endpoint = new URL("http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1");
+        SOAPMessage response = con.call(msg, endpoint); 
+        QName sayHiResp = new QName("http://apache.org/hello_world_rpclit", "sayHiResponse");
+        assertNotNull(response.getSOAPBody().getChildElements(sayHiResp));
+        assertEquals(2, response.countAttachments());
     }
 
     private void doGreeterRPCLit(SOAPServiceRPCLit service, QName portName, int count) throws Exception {

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/TestSOAPHandler.java Thu Oct 25 10:09:20 2007
@@ -55,8 +55,9 @@
                         Object elem2 = it2.next();
                         if (elem2 instanceof SOAPElement) {
                             String value = ((SOAPElement)elem2).getValue();
-                            if (value.indexOf("Milestone-0") >= 0
-                                || value.indexOf("TestGreetMeResponseServerLogicalHandler") >= 0) {
+                            if (value != null 
+                                && (value.indexOf("Milestone-0") >= 0
+                                || value.indexOf("TestGreetMeResponseServerLogicalHandler") >= 0)) {
                                 value = value + "ServerSOAPHandler";
                                 ((SOAPElement)elem2).setValue(value);
                             }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/AbstractProvider.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/AbstractProvider.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/AbstractProvider.java Thu Oct 25 10:09:20 2007
@@ -26,8 +26,10 @@
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.http.HTTPBinding;
 
+import org.apache.cxf.common.logging.LogUtils;
+
 public abstract class AbstractProvider<T> implements WebProvider {
-    static final Logger LOG = Logger.getLogger(AbstractProvider.class.getName());
+    static final Logger LOG = LogUtils.getLogger(AbstractProvider.class);
     protected WebServiceContext wsContext;
 
     public T invoke(T req) {

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/DataSourceProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/DataSourceProviderTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/DataSourceProviderTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/DataSourceProviderTest.java Thu Oct 25 10:09:20 2007
@@ -39,6 +39,7 @@
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.Before;
@@ -47,7 +48,7 @@
 
 public class DataSourceProviderTest extends AbstractBusClientServerTestBase {
 
-    static final Logger LOG = Logger.getLogger(DataSourceProviderTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(DataSourceProviderTest.class);
     private static final String BOUNDARY = "----=_Part_4_701508.1145579811786";
     private HttpURLConnection conn;
     private URL url;

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/TestProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/TestProvider.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/TestProvider.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/provider/datasource/TestProvider.java Thu Oct 25 10:09:20 2007
@@ -35,6 +35,7 @@
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.IOUtils;
 
 
@@ -45,7 +46,7 @@
 @ServiceMode(value = Service.Mode.MESSAGE)
 public class TestProvider extends AbstractProvider<DataSource> implements Provider<DataSource> {
 
-    static final Logger LOG = Logger.getLogger(TestProvider.class.getName());
+    static final Logger LOG = LogUtils.getLogger(TestProvider.class);
     
     @javax.annotation.Resource
     public void setWebServiceContext(WebServiceContext wsc) {

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java Thu Oct 25 10:09:20 2007
@@ -29,13 +29,13 @@
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
 import org.apache.cxf.binding.http.HttpBindingFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.customer.book.Book;
 import org.apache.cxf.customer.book.BookService;
 import org.apache.cxf.customer.book.BookServiceWrapped;
 import org.apache.cxf.customer.book.GetAnotherBook;
 import org.apache.cxf.customer.book.GetBook;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
@@ -43,7 +43,7 @@
 
 
 public class RestClientServerBookTest extends AbstractBusClientServerTestBase {
-    static final Logger LOG = Logger.getLogger(RestClientServerBookTest.class.getName());
+    static final Logger LOG = LogUtils.getLogger(RestClientServerBookTest.class);
 
     @BeforeClass
     public static void startServers() throws Exception {
@@ -114,8 +114,9 @@
         InputStream expected = getClass()
             .getResourceAsStream("resources/expected_get_book123_xmlwrapped.txt");
 
+        String expectedString = getStringFromInputStream(expected);
         //System.out.println("---" + getStringFromInputStream(in));
-        assertEquals(getStringFromInputStream(expected), getStringFromInputStream(in)); 
+        assertEquals(expectedString, expectedString, getStringFromInputStream(in)); 
     }
     
     @Test
@@ -173,12 +174,7 @@
     }      
     
     private String getStringFromInputStream(InputStream in) throws Exception {        
-        CachedOutputStream bos = new CachedOutputStream();
-        IOUtils.copy(in, bos);
-        in.close();
-        bos.close();
-        //System.out.println(bos.getOut().toString());        
-        return bos.getOut().toString();        
+        return IOUtils.toString(in);
     }
 
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Thu Oct 25 10:09:20 2007
@@ -68,7 +68,7 @@
         client.setExceptionsThrownOnErrorStatus(false);
 
         assertEquals("text/xml", response.getContentType());
-        assertEquals(encoding, response.getCharacterSet());
+        assertTrue(encoding.equalsIgnoreCase(response.getCharacterSet()));
 
         Document doc = DOMUtils.readXml(response.getInputStream());
         assertNotNull(doc);

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Thu Oct 25 10:09:20 2007
@@ -61,7 +61,7 @@
         
         WebResponse response = newClient().getResponse(req);
         assertEquals("text/xml", response.getContentType());
-        assertEquals("utf-8", response.getCharacterSet());
+        assertTrue("utf-8".equalsIgnoreCase(response.getCharacterSet()));
 
         Document doc = DOMUtils.readXml(response.getInputStream());
         assertNotNull(doc);

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java Thu Oct 25 10:09:20 2007
@@ -20,6 +20,8 @@
 package org.apache.cxf.systest.soap12;
 
 import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.hello_world_soap12_http.Greeter;
 import org.apache.hello_world_soap12_http.PingMeFault;
 import org.apache.hello_world_soap12_http.types.FaultDetail;
@@ -31,8 +33,7 @@
                   
 public class GreeterImpl implements Greeter {
 
-    private static final Logger LOG = 
-        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+    private static final Logger LOG = LogUtils.getLogger(GreeterImpl.class);
     
     /* (non-Javadoc)
      * @see org.apache.hello_world_soap12_http.Greeter#sayHi()

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java Thu Oct 25 10:09:20 2007
@@ -33,7 +33,6 @@
 import org.apache.cxf.pizza.types.ToppingsListType;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class HeaderClientServerTest extends AbstractBusClientServerTestBase {
@@ -46,7 +45,6 @@
     }
 
     @Test
-    @Ignore("Works in systests, but the wsdl2java will not load the soap module in the top level")
     public void testBasicConnection() throws Exception {
         Pizza port = getPort();
 
@@ -59,12 +57,9 @@
         header.setName("mao");
         header.setPhoneNumber("108");
 
-        OrderPizzaResponseType res = port.orderPizza(req);
-        System.out.println(res);
+        OrderPizzaResponseType res =  port.orderPizza(req, header);
 
-        //OrderPizzaResponseType res =  port.orderPizza(req, header);
-
-        //assertEquals(208, res.getMinutesUntilReady());
+        assertEquals(208, res.getMinutesUntilReady());
     }
 
     private Pizza getPort() {
@@ -72,7 +67,7 @@
         assertNotNull("WSDL is null", wsdl);
 
         PizzaService service = new PizzaService(wsdl, serviceName);
-        assertNotNull("Service is ull ", service);
+        assertNotNull("Service is null ", service);
 
         return service.getPizzaPort();
     }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/PizzaImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/PizzaImpl.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/PizzaImpl.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/soapheader/PizzaImpl.java Thu Oct 25 10:09:20 2007
@@ -31,10 +31,4 @@
         resp.setMinutesUntilReady(100 + Integer.parseInt(callerID.getPhoneNumber()));
         return resp;
     }
-
-    public OrderPizzaResponseType orderPizza(OrderPizzaType body) {
-        OrderPizzaResponseType resp = new OrderPizzaResponseType();
-        resp.setMinutesUntilReady(108);
-        return resp;
-    }
 }

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/versioning/MediatorInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/versioning/MediatorInInterceptor.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/versioning/MediatorInInterceptor.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/versioning/MediatorInInterceptor.java Thu Oct 25 10:09:20 2007
@@ -52,11 +52,10 @@
             return null;
         }
         //cache the input stream
-        CachedOutputStream bos = new CachedOutputStream();
+        CachedOutputStream bos = new CachedOutputStream(4096);
         try {
             IOUtils.copy(is, bos);
             is.close();
-            bos.close();
             
             message.setContent(InputStream.class, bos.getInputStream());
         
@@ -65,6 +64,7 @@
             XMLStreamReader xsr;
             xsr = StaxInInterceptor.getXMLInputFactory(message).
                 createXMLStreamReader(bos.getInputStream(), encoding);
+            
             // move to the soap body            
             while (true) {                
                 xsr.nextTag();              
@@ -91,6 +91,7 @@
                     return ep;
                 }
             }
+            bos.close();            
         } catch (Exception e) {
             throw new Fault(e);
         }    

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java Thu Oct 25 10:09:20 2007
@@ -271,6 +271,7 @@
     
     
     @Test
+    @Ignore("Random failure on Linux")
     public void testApplicationFault() throws Exception {
         try {
             greeter.testDocLitFault("BadRecordLitFault");

Modified: incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java (original)
+++ incubator/cxf/branches/jliu/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java Thu Oct 25 10:09:20 2007
@@ -27,6 +27,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.BasicGreeterService;
@@ -37,6 +38,7 @@
 import org.apache.cxf.systest.ws.util.ConnectionHelper;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.policy.ServerPolicyInInterceptor;
 import org.apache.cxf.ws.policy.ServerPolicyOutInterceptor;
 import org.apache.neethi.Policy;
@@ -50,7 +52,7 @@
  */
 public class AddressingInlinePolicyTest extends AbstractBusClientServerTestBase {
 
-    private static final Logger LOG = Logger.getLogger(AddressingInlinePolicyTest.class.getName());
+    private static final Logger LOG = LogUtils.getLogger(AddressingInlinePolicyTest.class);
 
     public static class Server extends AbstractBusTestServerBase {
     
@@ -83,11 +85,16 @@
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(Server.class));
     }
-         
+    
     @Test
     public void testUsingAddressing() throws Exception {
+        
         SpringBusFactory bf = new SpringBusFactory();
-        bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-inline-policy.xml");
+        
+        bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-inline-policy-old.xml");
+        PolicyTestUtils.setPolicyConstants(bus, 
+                                           PolicyConstants.NAMESPACE_W3_200607);
+        
         BusFactory.setDefaultBus(bus);
         
         BasicGreeterService gs = new BasicGreeterService();