View Javadoc
1 package org.neuclear.xml.soap; 2 3 import javax.servlet.http.HttpServletRequest; 4 import javax.servlet.http.HttpServletResponse; 5 import java.io.BufferedReader; 6 import java.io.IOException; 7 import java.io.InputStream; 8 import java.io.InputStreamReader; 9 10 /* 11 NeuClear Distributed Transaction Clearing Platform 12 (C) 2003 Pelle Braendgaard 13 14 This library is free software; you can redistribute it and/or 15 modify it under the terms of the GNU Lesser General Public 16 License as published by the Free Software Foundation; either 17 version 2.1 of the License, or (at your option) any later version. 18 19 This library is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 Lesser General Public License for more details. 23 24 You should have received a copy of the GNU Lesser General Public 25 License along with this library; if not, write to the Free Software 26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 28 $Id: MockXMLInputStreamServlet.java,v 1.2 2003/11/24 23:33:15 pelle Exp $ 29 $Log: MockXMLInputStreamServlet.java,v $ 30 Revision 1.2 2003/11/24 23:33:15 pelle 31 More Cactus unit testing going on. 32 33 Revision 1.1 2003/11/24 16:49:25 pelle 34 Added Cactus testing structure. 35 36 37 */ 38 39 public class MockXMLInputStreamServlet extends XMLInputStreamServlet { 40 protected void handleInputStream(final InputStream is, final HttpServletRequest request, final HttpServletResponse response) throws IOException { 41 if (is == null) { 42 lastInput = null; 43 return; 44 } 45 final BufferedReader reader = new BufferedReader(new InputStreamReader(is)); 46 lastInput = reader.readLine(); 47 48 } 49 50 public String getLastInput() { 51 return lastInput; 52 } 53 54 private String lastInput = null; 55 56 }

This page was automatically generated by Maven