axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/xmls targets.xml
Date Wed, 26 Nov 2003 17:16:41 GMT
dims        2003/11/26 09:16:41

  Modified:    java/test/functional build.xml FunctionalTests.java
               java/xmls targets.xml
  Added:       java/test/functional TestEncoding.java
  Log:
  round trip test case for german/french/chinese (works with UTF-8 only)
  
  Revision  Changes    Path
  1.19      +1 -0      ws-axis/java/test/functional/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/functional/build.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build.xml	19 Nov 2003 15:16:16 -0000	1.18
  +++ build.xml	26 Nov 2003 17:16:41 -0000	1.19
  @@ -61,6 +61,7 @@
     <copy file="${axis.home}/test/functional/AltStockQuoteService.jws" todir="${axis.home}/build/jws"
/>
     <copy file="${axis.home}/test/functional/GlobalTypeTest.jws" todir="${axis.home}/build/jws"/>
     <copy file="${axis.home}/test/functional/FaultTest.jws" todir="${axis.home}/build/jws"/>
  +  <copy file="${axis.home}/webapps/axis/EchoHeaders.jws" todir="${axis.home}/build/jws"
/>
   </target>
   
   <target name="junit-functional-prepare" if="junit.present">
  
  
  
  1.26      +2 -0      ws-axis/java/test/functional/FunctionalTests.java
  
  Index: FunctionalTests.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/functional/FunctionalTests.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- FunctionalTests.java	28 May 2003 18:34:18 -0000	1.25
  +++ FunctionalTests.java	26 Nov 2003 17:16:41 -0000	1.26
  @@ -65,6 +65,8 @@
           // samples.fault test
           suite.addTestSuite(TestFaultsSample.class);
   
  +        suite.addTestSuite(TestEncoding.class);
  +        
           // Attachments service test.
           try{
             if( null != ClassUtils.forName("javax.activation.DataHandler") &&
  
  
  
  1.1                  ws-axis/java/test/functional/TestEncoding.java
  
  Index: TestEncoding.java
  ===================================================================
  package test.functional;
  
  import junit.framework.TestCase;
  import org.apache.axis.AxisEngine;
  import org.apache.axis.client.Call;
  import org.apache.axis.client.Service;
  
  import java.net.URL;
  
  /**
   * Test string encoding roundtrip.
   */
  public class TestEncoding extends TestCase {
      Call call = null;
  
      protected void setUp() throws Exception {
          if (call == null) {
              Service service = new Service();
              service.getEngine().setOption(AxisEngine.PROP_XML_ENCODING, "UTF-8");
              call = (Call) service.createCall();
              call.setTargetEndpointAddress(new URL("http://localhost:8080/jws/EchoHeaders.jws"));
          }
      }
  
      private void runtest(String send, String get) throws Exception {
          String ret = (String) call.invoke("echo", new Object[]{send});
          assertEquals(ret, get);
      }
  
      private void runtest(String value) throws Exception {
          runtest(value, value);
      }
  
      public void testSimpleString() throws Exception {
          runtest("a simple string");
      }
  
      public void testStringWithApostrophes() throws Exception {
          runtest("this isn't a simple string");
      }
  
      public void testStringWithEntities() throws Exception {
          runtest("&amp;&lt;&gt;&apos;&quot;", "&amp;&lt;&gt;&apos;&quot;");
      }
  
      public void testStringWithRawEntities() throws Exception {
          runtest("&<>'\"", "&<>'\"");
      }
  
      public void testStringWithLeadingAndTrailingSpaces() throws Exception {
          runtest("          centered          ");
      }
  
      public void testWhitespace() throws Exception {
          runtest(" \n \t "); // note: \r fails
      }
  
      public void testFrenchAccents() throws Exception {
          runtest("\u00e0\u00e2\u00e4\u00e7\u00e8\u00e9\u00ea\u00eb\u00ee\u00ef\u00f4\u00f6\u00f9\u00fb\u00fc");
      }
  
      public void testFrenchAccents2() throws Exception {
          runtest("Une chaîne avec des caractères accentués");
      }
  
      public void testGermanUmlauts() throws Exception {
          runtest(" Some text \u00df with \u00fc special \u00f6 chars \u00e4.");
      }
  
      public void testWelcomeUnicode() throws Exception {
          // welcome in several languages
          runtest(
                  "Chinese (trad.) : \u6b61\u8fce  \n" +
                  "Greek : \u03ba\u03b1\u03bb\u03ce\u03c2 \u03bf\u03c1\u03af\u03c3\u03b1\u03c4\u03b5
\n" +
                  "Japanese : \u3088\u3046\u3053\u305d");
      }
  }
  
  
  
  1.59      +1 -0      ws-axis/java/xmls/targets.xml
  
  Index: targets.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/xmls/targets.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- targets.xml	5 Oct 2003 07:02:07 -0000	1.58
  +++ targets.xml	26 Nov 2003 17:16:41 -0000	1.59
  @@ -524,6 +524,7 @@
       <copy file="${axis.home}/samples/stock/StockQuoteService.jws" todir="${axis.home}/build/jws"
/>
       <copy file="${axis.home}/test/functional/AltStockQuoteService.jws" todir="${axis.home}/build/jws"
/>
       <copy file="${axis.home}/test/functional/GlobalTypeTest.jws" todir="${axis.home}/build/jws"/>
  +    <copy file="${axis.home}/webapps/axis/EchoHeaders.jws" todir="${axis.home}/build/jws"
/>
   
             <path id="deploy.xml.files">
                   <fileset dir="${build.dir}">
  
  
  

Mime
View raw message