dblevins    2005/01/11 23:58:39

  Modified:    modules/core/src/test/org/openejb/server/soap
                        WSContainerTest.java
  Log:

  Cleaned some cruft out of the test cases.
  
  Revision  Changes    Path
  1.2       +2 -14     
openejb/modules/core/src/test/org/openejb/server/soap/WSContainerTest.java
  
  Index: WSContainerTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/server/soap/WSContainerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WSContainerTest.java      22 Dec 2004 05:42:39 -0000      1.1
  +++ WSContainerTest.java      12 Jan 2005 04:58:39 -0000      1.2
  @@ -104,7 +104,6 @@
           context.setRequestStream(in);
           container.invoke(context);
           String response = new String(baos.toByteArray());
  -        System.out.write(baos.toByteArray());
           assertTrue(response.indexOf(("<out>127</out>")) > 0);
       }
   
  @@ -149,17 +148,13 @@
               out.flush();
               out.close();
   
  -            System.out.println("request written");
  -            int responseCode = connection.getResponseCode();
  -            System.out.println("responseCode = " + responseCode);
               byte[] bytes = new byte[connection.getContentLength()];
               DataInputStream in = new 
DataInputStream(connection.getInputStream());
               in.readFully(bytes);
               String response = new String(bytes);
  -            System.out.write(bytes);
               assertTrue(response.indexOf(("<out>127</out>")) > 0);
           } catch (Exception e) {
  -            System.out.println("exception " + e.getMessage());
  +            fail(e.getMessage());
           } finally {
               connection.disconnect();
               kernel.stopGBean(stack);
  @@ -181,15 +176,8 @@
           }
   
           public void onMessage(HttpRequest req, HttpResponse res) throws 
IOException {
  -            
System.out.println("WSContainerTest$TestSoapHttpListener.onMessage");
               try {
  -//                MessageContext context = new MessageContext("not-used", 
null, res.getOutputStream(), null, req.getURI().toString());
                   MessageContext context = new MessageContext("not-used", 
null, res.getOutputStream(), null, req.getURI().toString());
  -//                byte[] bytes = new byte[req.getContentLength()];
  -//                DataInputStream in = new 
DataInputStream(req.getInputStream());
  -//                in.readFully(bytes);
  -//                System.out.write(bytes);
  -//                context.setRequestStream(new ByteArrayInputStream(bytes));
                   context.setRequestStream(req.getInputStream());
                   res.setContentType("text/xml");
                   container.invoke(context);
  
  
  

Reply via email to