You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2005/08/01 08:50:52 UTC
svn commit: r226757 [2/2] - in /webservices/axis/trunk/java/modules:
addressing/test/org/apache/axis2/handlers/addressing/
common/src/org/apache/axis2/ core/src/org/apache/axis2/deployment/
core/src/org/apache/axis2/transport/http/ core/src/org/apache/...
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java Sun Jul 31 23:41:34 2005
@@ -21,6 +21,8 @@
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.transport.tcp.TCPServer;
import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.namespace.QName;
import java.io.File;
@@ -32,6 +34,7 @@
private static ConfigurationContext configurationContext;
public static final int TESTING_PORT = 5555;
public static final String FAILURE_MESSAGE = "Intentional Faliure";
+ private Log log = LogFactory.getLog(getClass());
public static synchronized void deployService(ServiceDescription service)
throws AxisFault {
@@ -85,6 +88,7 @@
count--;
}
} catch (AxisFault e) {
+
// TODO Auto-generated catch block
e.printStackTrace();
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java Sun Jul 31 23:41:34 2005
@@ -156,7 +156,7 @@
}
public void reportError(Exception e) {
- e.printStackTrace();
+ log.info(e.getMessage());
finish = true;
}
};
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java Sun Jul 31 23:41:34 2005
@@ -147,7 +147,7 @@
}
public void reportError(Exception e) {
- e.printStackTrace();
+ log.info(e.getMessage());
finish = true;
}
};
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java Sun Jul 31 23:41:34 2005
@@ -132,8 +132,8 @@
OMElement ele = (OMElement) result.getFirstChild();
OMElement ele1 = (OMElement) ele.getFirstChild();
OMText binaryNode = (OMText) ele1.getFirstChild();
- compareWithActualOMText(binaryNode);
- System.out.println(i);
+ compareWithActualOMText(binaryNode);
+ log.info("" + i);
}
}
private void compareWithActualOMText(OMText binaryNode)
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java Sun Jul 31 23:41:34 2005
@@ -121,7 +121,7 @@
OMElement data = (OMElement) result.getFirstChild();
compareWithCreatedOMText(data.getText());
call.close();
- System.out.println(i);
+ log.info("" + i);
}
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java Sun Jul 31 23:41:34 2005
@@ -72,7 +72,6 @@
connection.getResponseCode();
String line = reader.readLine();
while (line != null) {
- System.out.println(line);
line = reader.readLine();
}
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java Sun Jul 31 23:41:34 2005
@@ -172,7 +172,6 @@
result.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(
System.out));
- System.out.println(messageInfo.requestMessage);
call.close();
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java Sun Jul 31 23:41:34 2005
@@ -38,6 +38,8 @@
import org.apache.axis2.soap.SOAPFactory;
import org.apache.axis2.transport.http.SimpleHTTPServer;
import org.apache.axis2.util.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
@@ -59,7 +61,7 @@
private ServiceContext serviceContext;
private boolean finish = false;
-
+ private Log log = LogFactory.getLog(getClass());
public TCPEchoRawXMLTest() {
super(TCPEchoRawXMLTest.class.getName());
}
@@ -127,7 +129,8 @@
}
public void reportError(Exception e) {
- e.printStackTrace();
+ log.info(e.getMessage());
+// e.printStackTrace();
finish = true;
}
};
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java Sun Jul 31 23:41:34 2005
@@ -36,6 +36,8 @@
import org.apache.axis2.om.OMNamespace;
import org.apache.axis2.transport.http.SimpleHTTPServer;
import org.apache.axis2.util.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
@@ -56,6 +58,8 @@
private ServiceDescription service;
private ServiceContext serviceContext;
+ private Log log = LogFactory.getLog(getClass());
+
private boolean finish = false;
public TCPTwoChannelEchoRawXMLTest() {
@@ -137,7 +141,8 @@
}
public void reportError(Exception e) {
- e.printStackTrace();
+ log.info(e.getMessage());
+// e.printStackTrace();
finish = true;
}
};
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/MIMEOutputUtils.java Sun Jul 31 23:41:34 2005
@@ -31,11 +31,14 @@
import org.apache.axis2.om.OMException;
import org.apache.axis2.om.OMText;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class MIMEOutputUtils {
private static byte[] CRLF = {13, 10};
private static Random myRand = null;
+ private Log log = LogFactory.getLog(getClass());
public static void complete(OutputStream outStream,
OutputStream bufferedSoapOutStream, LinkedList binaryNodeList,
@@ -169,7 +172,8 @@
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
- System.out.println("Error: " + e);
+ //System.out.println("Error: " + e);
+ //todo heve to be properly handle
}
md5.update(sb.toString().getBytes());
byte[] array = md5.digest();
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/util/XMLComparator.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/util/XMLComparator.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/util/XMLComparator.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/util/XMLComparator.java Sun Jul 31 23:41:34 2005
@@ -96,7 +96,7 @@
if (omNode instanceof OMElement) {
OMElement elementOneChild = (OMElement) omNode;
if ("Reference4".equals(elementOneChild.getLocalName())) {
- System.out.println("Reference4");
+ log.info("Reference4");
}
OMElement elementTwoChild = elementTwo.getFirstChildWithName(
elementOneChild.getQName());
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java Sun Jul 31 23:41:34 2005
@@ -21,6 +21,8 @@
import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
import org.apache.axis2.soap.*;
import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
@@ -35,7 +37,7 @@
implements SOAPFault, OMConstants {
protected Exception e;
-
+ private Log log = LogFactory.getLog(getClass());
/**
* Constructor SOAPFaultImpl
@@ -136,7 +138,7 @@
protected void putExceptionToSOAPFault(Exception e) throws SOAPProcessingException {
StringWriter sw = new StringWriter();
- e.printStackTrace(new PrintWriter(sw));
+ log.info(e.getMessage());
getDetail();
if (getDetail() == null) {
@@ -215,7 +217,7 @@
if (faultDetail != null) {
faultDetail.serializeWithCache(omOutput);
}
- OMSerializerUtil.serializeEndpart(omOutput);
+
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/CompareOMWithDOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/CompareOMWithDOMTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/CompareOMWithDOMTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/CompareOMWithDOMTest.java Sun Jul 31 23:41:34 2005
@@ -39,7 +39,7 @@
if (files != null) {
for (int i = 0; i < files.length; i++) {
if (files[i].isFile() && files[i].getName().endsWith(".xml")) {
- System.out.println("files = " + files[i].getAbsolutePath());
+// System.out.println("files = " + files[i].getAbsolutePath());
SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder(
files[i])
.getDocumentElement();
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/MIMEOutputUtilsTest.java Sun Jul 31 23:41:34 2005
@@ -74,7 +74,7 @@
MIMEOutputUtils.writeBodyPart(outStream, part2, boundary);
MIMEOutputUtils.finishWritingMime(outStream);
buffer = outStream.toByteArray();
- System.out.println(new String(buffer));
+// System.out.println(new String(buffer));
}
public void testMIMEWriting() throws IOException, MessagingException {
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBlankElementTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBlankElementTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBlankElementTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBlankElementTest.java Sun Jul 31 23:41:34 2005
@@ -39,7 +39,7 @@
try {
//We should not get anything as the return value here: the output of the serialization
String value = buildBlankOMElem();
- System.out.println(value);
+// System.out.println(value);
assertNull("There's a serialized output for a blank XML element that cannot exist", value);
} catch (Exception e) {
//An exception is thrown trying to serialize a blank element
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBodyTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBodyTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBodyTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMBodyTest.java Sun Jul 31 23:41:34 2005
@@ -17,9 +17,12 @@
import org.apache.axis2.soap.SOAPBody;
import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class OMBodyTest extends OMTestCase implements OMConstants {
SOAPBody soapBody;
+ private Log log = LogFactory.getLog(getClass());
public OMBodyTest(String testName) {
super(testName);
@@ -37,18 +40,18 @@
* Class under test for SOAPFault addFault()
*/
public void testAddFault() {
- System.out.println("Adding SOAP fault to body ....");
+ log.info("Adding SOAP fault to body ....");
try {
soapBody.addChild(
soapFactory.createSOAPFault(soapBody,
new Exception("Testing soap fault")));
} catch (SOAPProcessingException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
fail(e.getMessage());
}
- System.out.println("\t checking for SOAP Fault ...");
+ log.info("\t checking for SOAP Fault ...");
assertTrue("SOAP body has no SOAP fault", soapBody.hasFault());
- System.out.println("\t checking for not-nullity ...");
+ log.info("\t checking for not-nullity ...");
assertTrue("SOAP body has no SOAP fault", soapBody.getFault() != null);
//SimpleOMSerializer simpleOMSerializer = new SimpleOMSerializer();
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMElementTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMElementTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMElementTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMElementTest.java Sun Jul 31 23:41:34 2005
@@ -2,6 +2,8 @@
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.namespace.QName;
@@ -24,7 +26,7 @@
public class OMElementTest extends OMTestCase implements OMConstants {
private static final String WSA_URI = "http://schemas.xmlsoap.org/ws/2004/03/addressing";
private static final String WSA_TO = "To";
-
+ private Log log = LogFactory.getLog(getClass());
public OMElementTest(String testName) {
super(testName);
@@ -50,7 +52,7 @@
wsaTo.getText().trim(),
expectedString);
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMEnvelopeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMEnvelopeTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMEnvelopeTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMEnvelopeTest.java Sun Jul 31 23:41:34 2005
@@ -19,8 +19,11 @@
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.SOAPHeader;
import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class OMEnvelopeTest extends OMTestCase {
+ private Log log = LogFactory.getLog(getClass());
public OMEnvelopeTest(String testName) {
super(testName);
}
@@ -66,7 +69,7 @@
try {
env = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
} catch (SOAPProcessingException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
fail(e.getMessage());
}
assertNotNull(env);
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMHeaderBlockTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMHeaderBlockTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMHeaderBlockTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/OMHeaderBlockTest.java Sun Jul 31 23:41:34 2005
@@ -40,7 +40,6 @@
public void testSetAndGetActor() {
String newActorURI = "http://newActor.org";
soapHeaderElement.setRole(newActorURI);
- System.out.println("ActorURI = " + soapHeaderElement.getRole());
assertTrue("Actor was not properly set",
soapHeaderElement.getRole().equalsIgnoreCase(newActorURI));
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/factory/OMLinkedListImplFactoryTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/factory/OMLinkedListImplFactoryTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/factory/OMLinkedListImplFactoryTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/factory/OMLinkedListImplFactoryTest.java Sun Jul 31 23:41:34 2005
@@ -30,6 +30,8 @@
import org.apache.axis2.soap.SOAPHeaderBlock;
import org.apache.axis2.soap.impl.llom.SOAPConstants;
import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* User: Eran Chinthaka (eran.chinthaka@gmail.com)
@@ -38,6 +40,9 @@
* All Rights Reserved.
*/
public class OMLinkedListImplFactoryTest extends AbstractTestCase {
+
+ private Log log = LogFactory.getLog(getClass());
+
public OMLinkedListImplFactoryTest(String testName) {
super(testName);
}
@@ -78,7 +83,7 @@
child.getBuilder() instanceof OMXMLParserWrapper);
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
@@ -122,7 +127,7 @@
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
@@ -146,7 +151,7 @@
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
@@ -170,7 +175,7 @@
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
@@ -195,7 +200,7 @@
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
@@ -221,7 +226,7 @@
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ log.info(e.getMessage());
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/OMBlankElementTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/OMBlankElementTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/OMBlankElementTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/OMBlankElementTest.java Sun Jul 31 23:41:34 2005
@@ -23,7 +23,6 @@
try {
//We should not get anything as the return value here: the output of the serialization
String value = buildBlankOMElem();
- System.out.println(value);
assertNull(
"There's a serialized output for a blank XML element that cannot exist",
value);
@@ -48,7 +47,6 @@
try {
//We should not get anything as the return value here: the output of the serialization
String value = buildWithWhiteSpaceOMElem();
- System.out.println(value);
assertNull(
"There's a serialized output for a blank XML element that cannot exist",
value);
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/llom/mtom/MTOMStAXSOAPModelBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/llom/mtom/MTOMStAXSOAPModelBuilderTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/llom/mtom/MTOMStAXSOAPModelBuilderTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/impl/llom/mtom/MTOMStAXSOAPModelBuilderTest.java Sun Jul 31 23:41:34 2005
@@ -65,15 +65,15 @@
public void testCreateOMElement() throws Exception {
OMElement root = builder.getDocumentElement();
- System.out.println(root.getLocalName() + " : "
- + root.getNamespace().getName());
+// System.out.println(root.getLocalName() + " : "
+// + root.getNamespace().getName());
OMElement body = (OMElement) root.getFirstChild();
- System.out.println(body.getLocalName() + " : "
- + body.getNamespace().getName());
+// System.out.println(body.getLocalName() + " : "
+// + body.getNamespace().getName());
OMElement data = (OMElement) body.getFirstChild();
- System.out.println(data.getLocalName() + " : "
- + data.getNamespace().getName());
+// System.out.println(data.getLocalName() + " : "
+// + data.getNamespace().getName());
Iterator childIt = data.getChildren();
//while (childIt.hasNext()) {
OMElement child = (OMElement) childIt.next();
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/infoset/XMLConformanceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/infoset/XMLConformanceTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/infoset/XMLConformanceTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/om/infoset/XMLConformanceTest.java Sun Jul 31 23:41:34 2005
@@ -19,6 +19,8 @@
import org.apache.axis2.om.OMElement;
import org.apache.axis2.om.impl.llom.builder.StAXOMBuilder;
import org.apache.axis2.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLTestCase;
@@ -35,6 +37,7 @@
private static int successCount = 0;
private static int parsedCount = 0;
private static int fileCount = 0;
+ private Log log = LogFactory.getLog(getClass());
public XMLConformanceTest(String name) {
super(name);
@@ -49,12 +52,12 @@
File testSuiteDirectory = new File("test-resources/XMLSuite/xmlconf");
if(testSuiteDirectory.exists()) {
ProcessDir(testSuiteDirectory);
- System.out.println("File count is " + fileCount);
- System.out.println("Parsed count is " + parsedCount +
+ log.info("File count is " + fileCount);
+ log.info("Parsed count is " + parsedCount +
". This is just partial success");
- System.out.println("Complete success count is " + successCount);
+ log.info("Complete success count is " + successCount);
} else {
- System.out.println("Skipping W3C XMLSuite test");
+ log.info("Skipping W3C XMLSuite test");
}
}
@@ -91,9 +94,9 @@
new FileInputStream(absolutePath), "UTF-8"));
rootElement = staxOMBuilder.getDocumentElement();
} catch (Exception e) {
- System.err.println("Exception trying to get hold of rootElement: "
+ log.info("Exception trying to get hold of rootElement: "
+ e.getMessage());
- System.err.println("in file: " + absolutePath + "\n");
+ log.info("in file: " + absolutePath + "\n");
return;
}
//we will write output into the file named TempOutputFile.txt in
@@ -105,13 +108,12 @@
createXMLStreamWriter(new FileOutputStream(tempFile));
rootElement.serializeWithCache(writer);
} catch (XMLStreamException e) {
- System.err.println(
- "Error in creating XMLStreamWriter to write parsed xml into");
+ log.info("Error in creating XMLStreamWriter to write parsed xml into");
return;
} catch (Exception e) {
- System.err.println("Exception while serializing: " +
+ log.info("Exception while serializing: " +
e.getMessage());
- System.err.println("in file: " + absolutePath + "\n");
+ log.info("in file: " + absolutePath + "\n");
return;
}
writer.flush();
@@ -123,17 +125,17 @@
diff = compareXML(new FileReader(absolutePath), new FileReader(
"TempOutputFile.txt"));
} catch (Exception e) {
- System.out.println("" +
+ log.info("" +
"Error comparing original and generated files for: " +
absolutePath);
- System.out.println("Error message is: " + e.getMessage());
+ log.info("Error message is: " + e.getMessage());
return;
}
try {
assertXMLEqual(diff, true);
successCount++;
} catch (Error e) {
- System.out.println("XMLEquality failed for file: " + absolutePath);
+ log.info("XMLEquality failed for file: " + absolutePath);
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPTestCase.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPTestCase.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPTestCase.java Sun Jul 31 23:41:34 2005
@@ -20,6 +20,8 @@
import org.apache.axis2.om.OMAbstractFactory;
import org.apache.axis2.om.OMFactory;
import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@@ -40,7 +42,7 @@
protected static final String SOAP11_FILE_NAME = "soap/soap11/soap11message.xml";
protected static final String SOAP12_FILE_NAME = "soap/soap12message.xml";
-
+ private Log log = LogFactory.getLog(getClass());
/**
* @param testName
*/
@@ -72,9 +74,9 @@
XMLInputFactory.newInstance().createXMLStreamReader(
new FileReader(getTestResourceFile(fileName)));
} catch (XMLStreamException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
} catch (FileNotFoundException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
}
return new StAXSOAPModelBuilder(parser, null);
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilderTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilderTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/builder/StAXSOAPModelBuilderTest.java Sun Jul 31 23:41:34 2005
@@ -20,6 +20,8 @@
import org.apache.axis2.soap.impl.llom.SOAPConstants;
import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;
import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@@ -36,6 +38,7 @@
*/
public class StAXSOAPModelBuilderTest extends TestCase {
+ private Log log = LogFactory.getLog(getClass());
public void setUp() {
}
@@ -553,10 +556,10 @@
childOfTestElement.getText().equals("This is only a test"));
} catch (XMLStreamException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
fail("Test failed. Reason -> " + e.getMessage());
} catch (Exception e) {
- e.printStackTrace();
+ log.info(e.getMessage());
fail("Test failed. Reason -> " + e.getMessage());
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/soap11/SOAP11SerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/soap11/SOAP11SerializerTest.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/soap11/SOAP11SerializerTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/impl/llom/soap11/SOAP11SerializerTest.java Sun Jul 31 23:41:34 2005
@@ -3,6 +3,8 @@
import org.apache.axis2.om.OMTestCase;
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
@@ -25,6 +27,8 @@
*/
public class SOAP11SerializerTest extends OMTestCase {
+
+ private Log log = LogFactory.getLog(getClass());
private XMLStreamWriter output;
public SOAP11SerializerTest(String testName) {
@@ -48,11 +52,11 @@
try {
soapEnvelope.serializeWithCache(output);
- System.out.println("");
- System.out.println("=======================");
+// System.out.println("");
+// System.out.println("=======================");
soapEnvelope.serialize(output);
} catch (XMLStreamException e) {
- e.printStackTrace();
+ log.info(e.getMessage());
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/xpath/XPathTestBase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/xpath/XPathTestBase.java?rev=226757&r1=226756&r2=226757&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/xpath/XPathTestBase.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/xpath/XPathTestBase.java Sun Jul 31 23:41:34 2005
@@ -67,6 +67,8 @@
import org.jaxen.saxpath.helpers.XPathReaderFactory;
import org.jaxen.pattern.Pattern;
import org.jaxen.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import java.util.ArrayList;
import java.util.Iterator;
@@ -81,6 +83,7 @@
protected static boolean verbose = false;
protected static boolean debug = false;
private ContextSupport contextSupport;
+ private Log log = LogFactory.getLog(getClass());
public XPathTestBase(String name)
{
@@ -104,7 +107,7 @@
public void log(boolean actualVerbose,
String text)
{
- if (actualVerbose) System.out.println(text);
+ if (actualVerbose) log.info(text);
}
protected void assertCountXPath(int expectedSize, Object context, String xpathStr) throws JaxenException