axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/utils TestXMLUtils.java
Date Wed, 23 May 2001 17:26:46 GMT
gdaniels    01/05/23 10:26:46

  Modified:    java/test/utils TestXMLUtils.java
  Log:
  Use the system line separator char instead of "\n".
  
  I'm not sure if this is correct.  Either we should be testing like this, OR
  we should be somehow telling the JAXP Transformer to output "\n" as
  its line separator instead of the system one.  Opinions are welcome, but
  for now this should pass on any system.
  
  Revision  Changes    Path
  1.3       +18 -17    xml-axis/java/test/utils/TestXMLUtils.java
  
  Index: TestXMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestXMLUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestXMLUtils.java	2001/05/22 23:32:47	1.2
  +++ TestXMLUtils.java	2001/05/23 17:26:37	1.3
  @@ -218,26 +218,27 @@
       */
       public Object getTestXml(String gimme)
       {
  +        String lineSep = System.getProperty("line.separator");
           StringBuffer sb = new StringBuffer();
  -          sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
  +          sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + lineSep)
           //The System ID will cause an unknown host exception unless you are
           //connected to the Internet, so comment it out for testing.
  -          //.append("<!DOCTYPE web-app PUBLIC \"-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN\"\n")
  -          //.append("\"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd\">\n")
  -          .append("<web-app>\n")
  -          .append("<display-name>Apache-Axis</display-name>\n") 
  -          .append("<servlet>\n") 
  -          .append("<servlet-name>AxisServlet</servlet-name>\n") 
  -          .append("<display-name>Apache-Axis Servlet</display-name>\n") 
  -          .append("<servlet-class>\n") 
  -          .append("org.apache.axis.transport.http.AxisServlet\n") 
  -          .append("</servlet-class>\n") 
  -          .append("</servlet>\n") 
  -          .append("<servlet-mapping>\n") 
  -          .append("<servlet-name>AxisServlet</servlet-name>\n") 
  -          .append("<url-pattern>servlet/AxisServlet</url-pattern>\n") 
  -          .append("<url-pattern>*.jws</url-pattern>\n") 
  -          .append("</servlet-mapping>\n") 
  +          //.append("<!DOCTYPE web-app PUBLIC \"-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN\"" + lineSep)
  +          //.append("\"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd\">" + lineSep)
  +          .append("<web-app>" + lineSep)
  +          .append("<display-name>Apache-Axis</display-name>" + lineSep) 
  +          .append("<servlet>" + lineSep) 
  +          .append("<servlet-name>AxisServlet</servlet-name>" + lineSep) 
  +          .append("<display-name>Apache-Axis Servlet</display-name>" + lineSep)

  +          .append("<servlet-class>" + lineSep) 
  +          .append("org.apache.axis.transport.http.AxisServlet" + lineSep) 
  +          .append("</servlet-class>" + lineSep) 
  +          .append("</servlet>" + lineSep) 
  +          .append("<servlet-mapping>" + lineSep) 
  +          .append("<servlet-name>AxisServlet</servlet-name>" + lineSep) 
  +          .append("<url-pattern>servlet/AxisServlet</url-pattern>" + lineSep)

  +          .append("<url-pattern>*.jws</url-pattern>" + lineSep) 
  +          .append("</servlet-mapping>" + lineSep) 
             .append("</web-app>");
   
           String xmlString = sb.toString();
  
  
  

Mime
View raw message