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 gd...@apache.org on 2001/09/05 19:23:01 UTC
cvs commit: xml-axis/java/test/functional AltStockQuoteService.jws TestAddressBookSample.java TestBidBuySample.java TestMiscSample.java TestProxySample.java TestStockSample.java TestTransportSample.java
gdaniels 01/09/05 10:23:01
Modified: java/samples/addr Main.java
java/samples/bidbuy TestClient.java
java/samples/misc TestClient.java
java/samples/stock GetInfo.java GetQuote.java
StockQuoteService.jws
java/samples/transport FileTest.java FileTransport.java
java/samples/transport/tcp GetQuote.java TCPListener.java
TCPSender.java TCPTransport.java
java/samples/userguide/example3 Client.java
java/samples/userguide/example4 Client.java
java/src/org/apache/axis AxisEngine.java
FaultableHandler.java Message.java
MessageContext.java SimpleTargetedChain.java
java/src/org/apache/axis/client AdminClient.java
AxisClient.java ServiceClient.java
java/src/org/apache/axis/configuration FileProvider.java
java/src/org/apache/axis/encoding BeanSerializer.java
DeserializationContext.java
java/src/org/apache/axis/handlers BasicHandler.java
DebugHandler.java EchoHandler.java JWSHandler.java
JWSProcessor.java LogHandler.java LogMessage.java
SimpleAuthenticationHandler.java
SimpleAuthorizationHandler.java
java/src/org/apache/axis/handlers/http
HTTPActionHandler.java HTTPAuthHandler.java
URLMapper.java
java/src/org/apache/axis/handlers/soap SOAPService.java
java/src/org/apache/axis/message BodyBuilder.java
MessageElement.java SOAPBodyElement.java
java/src/org/apache/axis/providers/java JavaProvider.java
java/src/org/apache/axis/registries SupplierRegistry.java
java/src/org/apache/axis/server AxisServer.java
Transport.java
java/src/org/apache/axis/suppliers FactorySupplier.java
SimpleChainSupplier.java SimpleSupplier.java
TargetedChainSupplier.java
java/src/org/apache/axis/transport/http AdminServlet.java
AxisServlet.java HTTPSender.java HTTPTransport.java
SimpleAxisServer.java
java/src/org/apache/axis/transport/local LocalResponder.java
LocalSender.java LocalTransport.java
java/src/org/apache/axis/utils Admin.java JavaUtils.java
Options.java
java/test put.java
java/test/functional AltStockQuoteService.jws
TestAddressBookSample.java TestBidBuySample.java
TestMiscSample.java TestProxySample.java
TestStockSample.java TestTransportSample.java
Removed: java/src/org/apache/axis/utils Debug.java
Log:
Finish first cut integration of log4j, and remove the Debug class. (!)
Still a bunch of places to clean up as a result of this, and in particular
the "-d" flag won't work until we get that hooked up to log4j.
Revision Changes Path
1.3 +1 -2 xml-axis/java/samples/addr/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/addr/Main.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Main.java 2001/06/29 19:58:25 1.2
+++ Main.java 2001/09/05 17:22:58 1.3
@@ -60,8 +60,8 @@
import java.net.*;
import org.apache.axis.client.ServiceClient;
import org.apache.axis.utils.Options;
-import org.apache.axis.utils.Debug;
+
/**
* This class shows how to use the ServiceClient's ability to
* become session aware.
@@ -109,7 +109,6 @@
public static void main (String[] args) throws Exception {
Options opts = new Options(args);
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
URL serviceURL = new URL(opts.getURL());
System.err.println ("Using proxy without session maintenance.");
1.9 +1 -2 xml-axis/java/samples/bidbuy/TestClient.java
Index: TestClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/bidbuy/TestClient.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TestClient.java 2001/07/25 04:27:37 1.8
+++ TestClient.java 2001/09/05 17:22:58 1.9
@@ -69,8 +69,8 @@
import org.apache.axis.message.RPCParam;
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
-import org.apache.axis.utils.Debug ;
+
/**
* Test Client for the echo interop service. See the main entrypoint
* for more details on usage.
@@ -102,7 +102,6 @@
public static void main(String args[]) throws Exception {
// set up the call object
Options opts = new Options(args);
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
call = new ServiceClient(opts.getURL());
call.set(HTTPTransport.ACTION, "http://www.soapinterop.org/Bid");
1.11 +1 -3 xml-axis/java/samples/misc/TestClient.java
Index: TestClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/misc/TestClient.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TestClient.java 2001/08/29 14:17:14 1.10
+++ TestClient.java 2001/09/05 17:22:58 1.11
@@ -60,7 +60,7 @@
import java.util.*;
import org.apache.axis.*;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.client.ServiceClient ;
import org.apache.axis.transport.http.HTTPTransport ;
@@ -95,8 +95,6 @@
if (service != null) {
action = service;
}
-
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
args = opts.getRemainingArgs();
if ( args != null ) action = args[0];
1.11 +1 -3 xml-axis/java/samples/stock/GetInfo.java
Index: GetInfo.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/stock/GetInfo.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- GetInfo.java 2001/08/29 14:17:14 1.10
+++ GetInfo.java 2001/09/05 17:22:58 1.11
@@ -60,7 +60,7 @@
import java.util.*;
import org.apache.axis.AxisFault ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.client.ServiceClient ;
import org.apache.axis.client.Transport ;
@@ -75,8 +75,6 @@
public static void main(String args[]) {
try {
Options opts = new Options( args );
-
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
args = opts.getRemainingArgs();
1.27 +1 -3 xml-axis/java/samples/stock/GetQuote.java
Index: GetQuote.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- GetQuote.java 2001/08/29 14:17:14 1.26
+++ GetQuote.java 2001/09/05 17:22:58 1.27
@@ -64,7 +64,7 @@
import org.apache.axis.client.Transport ;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.axis.message.RPCParam ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
@@ -80,8 +80,6 @@
// helper function; does all the real work
public float getQuote (String args[]) throws Exception {
Options opts = new Options( args );
-
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
args = opts.getRemainingArgs();
1.5 +1 -1 xml-axis/java/samples/stock/StockQuoteService.jws
Index: StockQuoteService.jws
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/stock/StockQuoteService.jws,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- StockQuoteService.jws 2001/06/21 02:45:26 1.4
+++ StockQuoteService.jws 2001/09/05 17:22:58 1.5
@@ -60,7 +60,7 @@
import org.w3c.dom.* ;
import org.apache.axis.utils.XMLUtils ;
-import org.apache.axis.utils.Debug;
+
/**
* See \samples\stock\readme for info.
1.12 +1 -3 xml-axis/java/samples/transport/FileTest.java
Index: FileTest.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/FileTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FileTest.java 2001/09/02 05:49:48 1.11
+++ FileTest.java 2001/09/05 17:22:58 1.12
@@ -6,7 +6,7 @@
import org.apache.axis.client.AxisClient ;
import org.apache.axis.client.ServiceClient ;
import org.apache.axis.client.Transport ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.encoding.* ;
@@ -24,8 +24,6 @@
reader.start();
Options opts = new Options( args );
-
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
args = opts.getRemainingArgs();
1.4 +1 -1 xml-axis/java/samples/transport/FileTransport.java
Index: FileTransport.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/FileTransport.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FileTransport.java 2001/08/31 18:40:14 1.3
+++ FileTransport.java 2001/09/05 17:22:58 1.4
@@ -57,7 +57,7 @@
import java.util.* ;
import org.apache.axis.* ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.handlers.* ;
import org.apache.axis.registries.* ;
import org.apache.axis.client.Transport;
1.6 +1 -3 xml-axis/java/samples/transport/tcp/GetQuote.java
Index: GetQuote.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/GetQuote.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- GetQuote.java 2001/08/29 14:17:14 1.5
+++ GetQuote.java 2001/09/05 17:22:58 1.6
@@ -64,7 +64,7 @@
import org.apache.axis.client.Transport ;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.axis.message.RPCParam ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
@@ -82,8 +82,6 @@
ServiceClient.addTransportPackage("samples.transport");
Options opts = new Options( args );
-
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
args = opts.getRemainingArgs();
1.5 +0 -4 xml-axis/java/samples/transport/tcp/TCPListener.java
Index: TCPListener.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/TCPListener.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TCPListener.java 2001/07/10 22:52:32 1.4
+++ TCPListener.java 2001/09/05 17:22:58 1.5
@@ -96,10 +96,6 @@
try {
Options options = new Options(args);
port = new URL(options.getURL()).getPort();
- String tmp;
- if ((tmp = options.isValueSet('d')) != null) {
- Debug.setDebugLevel(Integer.parseInt(tmp));
- }
} catch (MalformedURLException ex) {
System.err.println("Hosed URL: "+ex);
System.exit(1);
1.6 +14 -13 xml-axis/java/samples/transport/tcp/TCPSender.java
Index: TCPSender.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/TCPSender.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TCPSender.java 2001/09/05 12:11:23 1.5
+++ TCPSender.java 2001/09/05 17:22:58 1.6
@@ -82,7 +82,8 @@
Category.getInstance(TCPSender.class.getName());
public void invoke(MessageContext msgContext) throws AxisFault {
- Debug.Print( 0, "Enter: TCPSender::invoke" );
+ category.fatal( "Enter: TCPSender::invoke" );
+
/* Find the service we're invoking so we can grab it's options */
/***************************************************************/
String targetURL = null ;
@@ -99,7 +100,7 @@
Socket sock = null ;
sock = new Socket( host, port );
- Debug.Print( 1, "Created an insecure HTTP connection");
+ category.info( "Created an insecure HTTP connection");
reqEnv = (String) msgContext.getRequestMessage().getAsString();
@@ -114,11 +115,11 @@
out.write( bytes );
out.flush();
- Debug.Print( 1, "XML sent:" );
- Debug.Print( 1, "---------------------------------------------------");
- Debug.Print( 1, reqEnv );
+ category.debug( "XML sent:" );
+ category.debug( "---------------------------------------------------");
+ category.debug( reqEnv );
- if ( Debug.getDebugLevel() > 8 ) {
+ if ( category.isDebugEnabled() ) {
// Special case - if the debug level is this high then something
// really bad must be going on - so just dump the input stream
// to stdout.
@@ -129,22 +130,22 @@
}
outMsg = new Message( inp );
- if (Debug.getDebugLevel() > 0) {
- Debug.Print( 1, "\nNo Content-Length" );
- Debug.Print( 1, "\nXML received:" );
- Debug.Print( 1, "-----------------------------------------------");
- Debug.Print( 1, (String) outMsg.getAsString() );
+ if (category.isDebugEnabled()) {
+ category.debug( "\nNo Content-Length" );
+ category.debug( "\nXML received:" );
+ category.debug( "-----------------------------------------------");
+ category.debug( (String) outMsg.getAsString() );
}
msgContext.setResponseMessage( outMsg );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
e.printStackTrace();
if ( !(e instanceof AxisFault) ) e = new AxisFault(e);
throw (AxisFault) e ;
}
- Debug.Print( 0, "Exit: TCPSender::invoke" );
+ category.fatal( "Exit: TCPSender::invoke" );
}
public void undo(MessageContext msgContext) {
1.8 +8 -4 xml-axis/java/samples/transport/tcp/TCPTransport.java
Index: TCPTransport.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/TCPTransport.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TCPTransport.java 2001/08/31 18:48:57 1.7
+++ TCPTransport.java 2001/09/05 17:22:58 1.8
@@ -58,12 +58,13 @@
import java.net.URL;
import java.util.* ;
import org.apache.axis.* ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.handlers.* ;
import org.apache.axis.registries.* ;
import org.apache.axis.client.Transport;
import org.apache.axis.client.AxisClient;
import org.apache.axis.client.ServiceClient;
+import org.apache.log4j.Category;
/**
*
@@ -73,6 +74,9 @@
*/
public class TCPTransport extends Transport
{
+ static Category category =
+ Category.getInstance(TCPTransport.class.getName());
+
private String host;
private String port;
@@ -116,8 +120,8 @@
if (host != null) serv.set(HOST, host);
if (port != null) serv.set(PORT, port);
- Debug.Print(3, "Port = " + mc.getStrProp(PORT));
- Debug.Print(3, "Host = " + mc.getStrProp(HOST));
+ category.debug( "Port = " + mc.getStrProp(PORT));
+ category.debug( "Host = " + mc.getStrProp(HOST));
// kind of ugly... fake up a "http://host:port/" url to send down the chain
// ROBJ TODO: clean this up so we use TCP transport properties all the way down
@@ -125,7 +129,7 @@
/*
String url = "http://"+serv.get(HOST)+":"+serv.get(PORT);
- Debug.Print(4, "TCPTransport set URL to '" + url + "'");
+ category.debug( "TCPTransport set URL to '" + url + "'");
mc.setProperty(MessageContext.TRANS_URL, url);
*/
}
1.2 +1 -3 xml-axis/java/samples/userguide/example3/Client.java
Index: Client.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/userguide/example3/Client.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Client.java 2001/08/10 16:29:48 1.1
+++ Client.java 2001/09/05 17:22:58 1.2
@@ -56,7 +56,7 @@
package samples.userguide.example3;
import org.apache.axis.client.ServiceClient;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.Options;
public class Client
@@ -65,8 +65,6 @@
{
try {
Options options = new Options(args);
-
- Debug.setDebugLevel(options.isFlagSet('d'));
String endpointURL = options.getURL();
String textToSend;
1.3 +1 -3 xml-axis/java/samples/userguide/example4/Client.java
Index: Client.java
===================================================================
RCS file: /home/cvs/xml-axis/java/samples/userguide/example4/Client.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Client.java 2001/08/10 16:29:48 1.2
+++ Client.java 2001/09/05 17:22:58 1.3
@@ -56,7 +56,7 @@
package samples.userguide.example4;
import org.apache.axis.client.ServiceClient;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.Options;
public class Client
@@ -65,8 +65,6 @@
{
try {
Options options = new Options(args);
-
- Debug.setDebugLevel(options.isFlagSet('d'));
String endpointURL = options.getURL();
1.31 +2 -2 xml-axis/java/src/org/apache/axis/AxisEngine.java
Index: AxisEngine.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisEngine.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- AxisEngine.java 2001/09/05 12:11:24 1.30
+++ AxisEngine.java 2001/09/05 17:22:58 1.31
@@ -294,7 +294,7 @@
DeserializerFactory deserFactory,
Serializer serializer)
{
- Debug.Print(3, "Registering type mapping " + qName + " -> " +
+ category.info("Registering type mapping " + qName + " -> " +
cls.getName());
if (deserFactory != null)
_typeMappingRegistry.addDeserializerFactory(qName,
@@ -335,7 +335,7 @@
*/
public void deployService(String key, SOAPService service)
{
- Debug.Print(2, "Deploying service '" + key + "' into " + this);
+ category.info("Deploying service '" + key + "' into " + this);
service.setName(key);
service.setEngine(this);
1.18 +8 -8 xml-axis/java/src/org/apache/axis/FaultableHandler.java
Index: FaultableHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/FaultableHandler.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- FaultableHandler.java 2001/09/05 12:11:24 1.17
+++ FaultableHandler.java 2001/09/05 17:22:59 1.18
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -69,8 +69,8 @@
/**
* A <code>FaultableHandler</code> is essentially a wrapper for any other
* Handler which provides flexible fault handling semantics.
- *
*
+ *
* @author Doug Davis (dug@us.ibm.com)
* @author Glen Daniels (gdaniels@macromedia.com)
*/
@@ -81,7 +81,7 @@
protected Handler workHandler ;
/** Constructor
- *
+ *
* @param workHandler the Handler we're going to wrap with Fault semantics.
*/
public FaultableHandler(Handler workHandler)
@@ -109,7 +109,7 @@
workHandler.invoke( msgContext );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
AxisFault fault;
// Is this a Java Exception? a SOAPException? an AxisException?
if ( e instanceof AxisFault ) {
@@ -121,7 +121,7 @@
HandlerRegistry hr = msgContext.getAxisEngine().getHandlerRegistry();
/** Index off fault code.
- *
+ *
* !!! TODO: This needs to be able to handle searching by faultcode
* hierarchy, i.e. "Server.General.*" or "Server.*", with the
* most specific match winning.
1.44 +22 -23 xml-axis/java/src/org/apache/axis/Message.java
Index: Message.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- Message.java 2001/09/05 12:11:24 1.43
+++ Message.java 2001/09/05 17:22:59 1.44
@@ -64,7 +64,6 @@
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.DeserializationContext;
import org.apache.axis.message.* ;
-import org.apache.axis.utils.Debug ;
import org.apache.axis.utils.XMLUtils ;
import org.apache.log4j.Category;
@@ -83,7 +82,7 @@
*/
private Object originalMessage ;
private Object currentMessage ;
-
+
private static final int FORM_STRING = 1;
private static final int FORM_INPUTSTREAM = 2;
private static final int FORM_SOAPENVELOPE = 3;
@@ -91,11 +90,11 @@
private static final int FORM_BODYINSTREAM = 5;
private static final int FORM_FAULT = 6;
private int currentForm ;
-
+
private static final String[] formNames =
{ "", "FORM_STRING", "FORM_INPUTSTREAM", "FORM_SOAPENVELOPE",
"FORM_BYTES", "FORM_BODYINSTREAM", "FORM_FAULT" };
-
+
private String messageType ;
private MessageContext msgContext;
@@ -107,38 +106,38 @@
originalMessage = stringForm;
setCurrentMessage(stringForm, FORM_STRING);
}
-
+
public Message(SOAPEnvelope env) {
category.debug( "Enter Message ctor (SOAPEnvelope)" );
originalMessage = env;
setCurrentMessage(env, FORM_SOAPENVELOPE);
}
-
+
public Message(InputStream inputStream) {
category.debug( "Enter Message ctor (InputStream)" );
originalMessage = inputStream;
setCurrentMessage(inputStream, FORM_INPUTSTREAM);
}
-
+
public Message(InputStream inputStream, boolean isBody) {
category.debug( "Enter Message ctor (BodyInputStream)" );
originalMessage = inputStream;
setCurrentMessage(inputStream, isBody ? FORM_BODYINSTREAM :
FORM_INPUTSTREAM);
}
-
+
public Message(byte [] bytes) {
- Debug.Print(2, "Enter Message ctor (byte[])" );
+ category.debug("Enter Message ctor (byte[])" );
originalMessage = bytes;
setCurrentMessage(bytes, FORM_BYTES);
}
-
+
public Message(AxisFault fault) {
- Debug.Print(2, "Enter Message ctor (AxisFault)" );
+ category.debug("Enter Message ctor (AxisFault)" );
originalMessage = fault;
setCurrentMessage(fault, FORM_FAULT);
}
-
+
public Object getOriginalMessage() {
return( originalMessage );
}
@@ -150,17 +149,17 @@
private int getCurrentForm() {
return( currentForm );
}
-
+
public String getMessageType()
{
return messageType;
}
-
+
public void setMessageType(String messageType)
{
this.messageType = messageType;
}
-
+
public MessageContext getMessageContext()
{
return msgContext;
@@ -184,7 +183,7 @@
category.debug( "Exit: Message::getAsBytes" );
return( (byte[]) currentMessage );
}
-
+
if ( currentForm == FORM_BODYINSTREAM ) {
try {
getAsSOAPEnvelope();
@@ -222,7 +221,7 @@
getAsString();
if ( currentForm == FORM_STRING ) {
- setCurrentMessage( ((String)currentMessage).getBytes(),
+ setCurrentMessage( ((String)currentMessage).getBytes(),
FORM_BYTES );
category.debug( "Exit: Message::getAsBytes" );
return( (byte[]) currentMessage );
@@ -248,7 +247,7 @@
}
if ( currentForm == FORM_BYTES ) {
- setCurrentMessage( new String((byte[]) currentMessage),
+ setCurrentMessage( new String((byte[]) currentMessage),
FORM_STRING );
category.debug( "Exit: Message::getAsString, currentMessage is "+
currentMessage );
@@ -294,16 +293,16 @@
formNames[currentForm] );
if ( currentForm == FORM_SOAPENVELOPE )
return( (SOAPEnvelope) currentMessage );
-
+
if (currentForm == FORM_BODYINSTREAM) {
- InputStreamBody bodyEl =
+ InputStreamBody bodyEl =
new InputStreamBody((InputStream)currentMessage);
SOAPEnvelope env = new SOAPEnvelope();
env.addBodyElement(bodyEl);
setCurrentMessage(env, FORM_SOAPENVELOPE);
return env;
}
-
+
InputSource is;
if ( currentForm == FORM_INPUTSTREAM ) {
@@ -311,9 +310,9 @@
} else {
is = new InputSource(new StringReader(getAsString()));
}
- DeserializationContext dser =
+ DeserializationContext dser =
new DeserializationContext(is, msgContext, messageType);
-
+
// This may throw a SAXException
try {
dser.parse();
1.51 +7 -3 xml-axis/java/src/org/apache/axis/MessageContext.java
Index: MessageContext.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- MessageContext.java 2001/08/07 14:49:47 1.50
+++ MessageContext.java 2001/09/05 17:22:59 1.51
@@ -58,7 +58,7 @@
import java.util.* ;
import org.apache.axis.* ;
import org.apache.axis.utils.AxisClassLoader ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.encoding.SOAPTypeMappingRegistry;
import org.apache.axis.encoding.ServiceDescription;
@@ -66,6 +66,7 @@
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.message.*;
import org.apache.axis.session.Session;
+import org.apache.log4j.Category;
/**
* Some more general docs will go here.
@@ -91,6 +92,9 @@
* @author Jacek Kopecky (jacek@idoox.com)
*/
public class MessageContext {
+ static Category category =
+ Category.getInstance(MessageContext.class.getName());
+
/**
* Just a placeholder until we figure out how many messages we'll actually
* be passing around.
@@ -357,7 +361,7 @@
* @param tServ the name of the target service.
*/
public void setTargetService(String tServ) {
- Debug.Print(2, "MessageContext: setTargetService(" + tServ+")");
+ category.debug("MessageContext: setTargetService(" + tServ+")");
targetService = tServ ;
HandlerRegistry sr = axisEngine.getServiceRegistry();
@@ -381,7 +385,7 @@
public void setServiceHandler(Handler sh)
{
- Debug.Print(2,"MessageContext: setServiceHandler("+sh+")");
+ category.debug("MessageContext: setServiceHandler("+sh+")");
serviceHandler = sh;
if (sh != null && sh instanceof SOAPService) {
SOAPService service = (SOAPService)sh;
1.20 +14 -14 xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java
Index: SimpleTargetedChain.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- SimpleTargetedChain.java 2001/09/05 12:11:24 1.19
+++ SimpleTargetedChain.java 2001/09/05 17:22:59 1.20
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -76,7 +76,7 @@
protected Handler pivotHandler ;
protected Handler responseHandler ;
- public void init() {
+ public void init() {
if ( requestHandler != null ) requestHandler.init();
if ( pivotHandler != null ) pivotHandler.init();
if ( responseHandler != null ) responseHandler.init();
@@ -100,7 +100,7 @@
if ( pivotHandler != null ) pivotHandler.invoke( msgContext );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault ) )
e = new AxisFault( e );
if ( requestHandler != null )
@@ -113,7 +113,7 @@
responseHandler.invoke( msgContext );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault ) )
e = new AxisFault( e );
if ( pivotHandler != null ) pivotHandler.undo( msgContext );
@@ -131,7 +131,7 @@
if ( pivotHandler != null ) pivotHandler.generateWSDL( msgContext );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault ) )
e = new AxisFault( e );
if ( requestHandler != null )
@@ -144,7 +144,7 @@
responseHandler.generateWSDL( msgContext );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault ) )
e = new AxisFault( e );
throw (AxisFault) e ;
@@ -165,9 +165,9 @@
public boolean canHandleBlock(QName qname) {
// TODO !!! : Need to look at this logic
- return ((requestHandler==null) ? false :
+ return ((requestHandler==null) ? false :
(requestHandler.canHandleBlock(qname) ||
- (pivotHandler==null)) ? false :
+ (pivotHandler==null)) ? false :
(pivotHandler.canHandleBlock(qname) ||
(responseHandler==null)) ? false :
responseHandler.canHandleBlock(qname) );
@@ -190,7 +190,7 @@
{
responseHandler = respHandler;
}
-
+
public void clear() {
requestHandler = null ;
pivotHandler = null ;
@@ -206,11 +206,11 @@
category.debug("Exit: SimpleTargetedChain::getDeploymentData" );
return( root );
}
-
+
/**
* Used by subclasses (i.e. SOAPService) to fill in deployment
* data into an Element which might not be named "chain".
- *
+ *
* @param root the Element to fill in with deployment data.
*/
public void fillInDeploymentData(Element root)
1.31 +2 -2 xml-axis/java/src/org/apache/axis/client/AdminClient.java
Index: AdminClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AdminClient.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- AdminClient.java 2001/08/13 16:21:39 1.30
+++ AdminClient.java 2001/09/05 17:22:59 1.31
@@ -69,7 +69,7 @@
import org.apache.axis.message.SOAPBodyElement ;
import org.apache.axis.message.SOAPEnvelope ;
import org.apache.axis.utils.Options ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.transport.http.HTTPConstants;
/**
@@ -161,7 +161,7 @@
Options opts = new Options( args );
if (opts.isFlagSet('d') > 0) {
- Debug.setDebugLevel( opts.isFlagSet('d') );
+ // Set log4j properties... !!!
}
args = opts.getRemainingArgs();
1.24 +20 -20 xml-axis/java/src/org/apache/axis/client/AxisClient.java
Index: AxisClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AxisClient.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- AxisClient.java 2001/09/05 12:11:24 1.23
+++ AxisClient.java 2001/09/05 17:22:59 1.24
@@ -58,7 +58,7 @@
import java.util.* ;
import org.apache.axis.* ;
import org.apache.axis.configuration.*;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.handlers.* ;
import org.apache.axis.registries.* ;
import org.apache.axis.transport.http.HTTPSender;
@@ -83,31 +83,31 @@
{
super(provider);
}
-
+
/**
* this *is* the client engine!
*/
public AxisEngine getClientEngine () {
return this;
}
-
+
/**
* Main routine of the AXIS engine. In short we locate the appropriate
* handler for the desired service and invoke() it.
*/
public void invoke(MessageContext msgContext) throws AxisFault {
category.debug("Enter: AxisClient::invoke" );
-
+
String hName = null ;
Handler h = null ;
-
+
HandlerRegistry hr = getHandlerRegistry();
HandlerRegistry sr = getServiceRegistry();
-
+
try {
hName = msgContext.getStrProp( MessageContext.ENGINE_HANDLER );
category.debug( "EngineHandler: " + hName );
-
+
if ( hName != null ) {
h = hr.find( hName );
if ( h != null )
@@ -120,7 +120,7 @@
else {
// This really should be in a handler - but we need to discuss it
// first - to make sure that's what we want.
-
+
/* Now we do the 'real' work. The flow is basically: */
/* */
/* Service Specific Request Chain */
@@ -131,12 +131,12 @@
/* Service Specific Response Chain */
/* Protocol Specific-Handler/Checker */
/**************************************************************/
-
+
// When do we call init/cleanup??
-
+
SimpleTargetedChain service = null ;
- msgContext.setPastPivot(false);
-
+ msgContext.setPastPivot(false);
+
/* Process the Service Specific Request Chain */
/**********************************************/
hName = msgContext.getTargetService();
@@ -147,13 +147,13 @@
}
if ( h != null ) h.invoke( msgContext );
}
-
+
/* Process the Global Request Chain */
/**********************************/
hName = Constants.GLOBAL_REQUEST ;
if ( hName != null && (h = hr.find( hName )) != null )
h.invoke(msgContext);
-
+
/** Process the Transport Specific stuff
*
* NOTE: Somewhere in here there is a handler which actually
@@ -165,33 +165,33 @@
if ( hName != null && (h = tr.find( hName )) != null )
h.invoke(msgContext);
else
- msgContext.setPastPivot(true);
-
+ msgContext.setPastPivot(true);
+
/* Process the Global Response Chain */
/***********************************/
hName = Constants.GLOBAL_RECEIVE ;
if ( hName != null && (h = hr.find( hName )) != null )
h.invoke(msgContext);
-
+
if ( service != null ) {
h = service.getResponseHandler();
if ( h != null )
h.invoke(msgContext);
}
-
+
// Do SOAP Semantics checks here - this needs to be a call to
// a pluggable object/handler/something
}
}
catch( Exception e ) {
// Should we even bother catching it ?
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault) ) e = new AxisFault( e );
throw (AxisFault) e ;
}
category.debug("Exit: AxisClient::invoke" );
};
-
+
public void undo(MessageContext msgContext) {
category.debug("Enter: AxisClient::undo" );
category.debug("Exit: AxisClient::undo" );
1.50 +2 -2 xml-axis/java/src/org/apache/axis/client/ServiceClient.java
Index: ServiceClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceClient.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- ServiceClient.java 2001/09/05 12:11:24 1.49
+++ ServiceClient.java 2001/09/05 17:22:59 1.50
@@ -559,7 +559,7 @@
invoke();
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
if ( !(e instanceof AxisFault ) ) e = new AxisFault( e );
throw (AxisFault) e ;
}
@@ -631,7 +631,7 @@
engine.invoke( msgContext );
}
catch( AxisFault fault ) {
- Debug.Print( 1, fault );
+ category.error( fault );
throw fault ;
}
1.2 +1 -9 xml-axis/java/src/org/apache/axis/configuration/FileProvider.java
Index: FileProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/FileProvider.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FileProvider.java 2001/08/15 21:30:17 1.1
+++ FileProvider.java 2001/09/05 17:22:59 1.2
@@ -60,7 +60,7 @@
import org.apache.axis.ConfigurationProvider;
import org.apache.axis.AxisEngine;
import org.apache.axis.utils.Admin;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.XMLUtils;
import org.w3c.dom.Document;
@@ -143,14 +143,6 @@
}
String propVal;
-
- if (!Debug.isLevelSet()) {
- propVal = props.getProperty(AxisEngine.PROP_DEBUG_LEVEL, "0");
- Debug.setDebugLevel(Integer.parseInt(propVal));
- }
-
- propVal = props.getProperty(AxisEngine.PROP_DEBUG_FILE);
- Debug.setToFile(propVal != null);
// Should we send XML declarations in our messages?
// default is true, and currently the only accepted true value is
1.13 +17 -17 xml-axis/java/src/org/apache/axis/encoding/BeanSerializer.java
Index: BeanSerializer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/BeanSerializer.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- BeanSerializer.java 2001/09/05 12:11:24 1.12
+++ BeanSerializer.java 2001/09/05 17:22:59 1.13
@@ -65,7 +65,7 @@
import java.beans.PropertyDescriptor;
import org.apache.axis.message.SOAPHandler;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.QName;
import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
@@ -77,8 +77,8 @@
*
* @author Sam Ruby <ru...@us.ibm.com>
*/
-public class BeanSerializer extends Deserializer
- implements Serializer, Serializable
+public class BeanSerializer extends Deserializer
+ implements Serializer, Serializable
{
static Category category =
Category.getInstance(BeanSerializer.class.getName());
@@ -109,7 +109,7 @@
return pd;
}
-
+
protected PropertyDescriptor [] getPd(Object val)
{
if (cls == null) cls = val.getClass();
@@ -135,12 +135,12 @@
super();
this.cls = cls;
}
-
+
/**
* An array of nothing, defined only once.
*/
private static final Object[] noArgs = new Object[] {};
-
+
public static DeserializerFactory getFactory()
{
return new BeanSerFactory();
@@ -156,7 +156,7 @@
public Deserializer getDeserializer(Class cls) {
PropertyDescriptor [] pd =
(PropertyDescriptor [])propertyDescriptors.get(cls);
-
+
if (pd == null) {
try {
pd = Introspector.getBeanInfo(cls).getPropertyDescriptors();
@@ -165,7 +165,7 @@
}
propertyDescriptors.put(cls, pd);
}
-
+
BeanSerializer bs = new BeanSerializer();
bs.setCls(cls);
bs.setPd(pd);
@@ -183,7 +183,7 @@
/**
* Override serialization - all that is needed is the class
*/
- private static final ObjectStreamField[] serialPersistentFields =
+ private static final ObjectStreamField[] serialPersistentFields =
{new ObjectStreamField("cls", Class.class)};
}
@@ -217,8 +217,8 @@
}
}
}
-
- /**
+
+ /**
* Deserializer interface called on each child element encountered in
* the XML stream.
*/
@@ -250,13 +250,13 @@
TypeMappingRegistry tmr = context.getTypeMappingRegistry();
QName qn = tmr.getTypeQName(pd[i].getPropertyType());
if (qn == null)
- throw new SAXException("Unregistered type: " +
+ throw new SAXException("Unregistered type: " +
pd[i].getPropertyType());
// get the deserializer
Deserializer dSer = tmr.getDeserializer(qn);
if (dSer == null)
- throw new SAXException("No deserializer for " +
+ throw new SAXException("No deserializer for " +
pd[i].getPropertyType());
// Success! Register the target and deserializer.
@@ -269,8 +269,8 @@
throw new SAXException("Invalid element in " + cls.getName() +
" - " + localName);
}
-
- /**
+
+ /**
* Serialize a bean. Done simply by serializing each bean property.
*/
public void serialize(QName name, Attributes attributes,
@@ -298,7 +298,7 @@
/**
* Override serialization - all that is needed is the class
*/
- private static final ObjectStreamField[] serialPersistentFields =
+ private static final ObjectStreamField[] serialPersistentFields =
{new ObjectStreamField("cls", Class.class)};
-
+
}
1.21 +1 -1 xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java
Index: DeserializationContext.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DeserializationContext.java 2001/08/14 03:49:18 1.20
+++ DeserializationContext.java 2001/09/05 17:22:59 1.21
@@ -60,7 +60,7 @@
import javax.xml.parsers.SAXParser;
import org.apache.axis.*;
import org.apache.axis.message.*;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.NSStack;
import org.apache.axis.utils.QName;
import org.apache.axis.utils.XMLUtils;
1.11 +9 -9 xml-axis/java/src/org/apache/axis/handlers/BasicHandler.java
Index: BasicHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/BasicHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- BasicHandler.java 2001/09/05 12:11:24 1.10
+++ BasicHandler.java 2001/09/05 17:22:59 1.11
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -9,7 +9,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -17,7 +17,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -25,7 +25,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -58,7 +58,7 @@
import java.util.Enumeration;
import org.apache.axis.*;
import org.apache.axis.utils.QName;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.XMLUtils ;
import org.apache.log4j.Category;
@@ -68,7 +68,7 @@
* property setting/getting behavior, and stubs out a lot of the Handler
* methods. Extend this class to make writing your Handlers easier, and
* then override what you need to.
- *
+ *
* @author Glen Daniels (gdaniels@allaire.com)
* @author Doug Davis (dug@us.ibm.com
*/
@@ -82,11 +82,11 @@
/** Stubbed-out methods. Override in your child class to implement
* any real behavior.
*/
-
+
public void init()
{
}
-
+
public void cleanup()
{
}
@@ -138,7 +138,7 @@
{
this.name = name;
}
-
+
/**
* Return the name (i.e. registry key) for this Handler
*/
1.20 +12 -12 xml-axis/java/src/org/apache/axis/handlers/DebugHandler.java
Index: DebugHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/DebugHandler.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- DebugHandler.java 2001/09/05 12:11:24 1.19
+++ DebugHandler.java 2001/09/05 17:22:59 1.20
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -78,25 +78,25 @@
category.debug("Enter: DebugHandler::invoke" );
try {
Message msg = msgContext.getRequestMessage();
-
+
SOAPEnvelope message = (SOAPEnvelope)msg.getAsSOAPEnvelope();
- SOAPHeader header = message.getHeaderByName(Constants.URI_DEBUG,
+ SOAPHeader header = message.getHeaderByName(Constants.URI_DEBUG,
"Debug");
-
+
if (header != null) {
Integer i = ((Integer)header
.getValueAsType(SOAPTypeMappingRegistry.XSD_INT));
if (i == null)
throw new AxisFault("Couldn't convert value to int");
-
+
int debugVal = i.intValue();
- Debug.Print( 1, "Setting debug level to: " + debugVal );
- Debug.setDebugLevel(debugVal);
+ category.debug( "Setting debug level to: " + debugVal );
+ //Debug.setDebugLevel(debugVal);
header.setProcessed(true);
}
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
throw new AxisFault( e );
}
category.debug("Exit: DebugHandler::invoke" );
@@ -106,5 +106,5 @@
category.debug("Enter: DebugHandler::undo" );
category.debug("Exit: DebugHandler::undo" );
}
-
+
};
1.18 +4 -4 xml-axis/java/src/org/apache/axis/handlers/EchoHandler.java
Index: EchoHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/EchoHandler.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- EchoHandler.java 2001/09/05 12:11:24 1.17
+++ EchoHandler.java 2001/09/05 17:22:59 1.18
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -76,7 +76,7 @@
msgContext.setResponseMessage( new Message( env ) );
}
catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
throw new AxisFault( e );
}
category.debug("Exit: EchoHandler::invoke" );
1.5 +1 -1 xml-axis/java/src/org/apache/axis/handlers/JWSHandler.java
Index: JWSHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JWSHandler.java 2001/09/05 12:11:24 1.4
+++ JWSHandler.java 2001/09/05 17:22:59 1.5
@@ -58,7 +58,7 @@
import org.apache.axis.Constants;
import org.apache.axis.handlers.BasicHandler;
import org.apache.axis.MessageContext;
-import org.apache.axis.utils.Debug;
+
import org.apache.log4j.Category;
/** A <code>JWSHandler</code> sets the target service and JWS filename
1.19 +1 -1 xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java
Index: JWSProcessor.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- JWSProcessor.java 2001/09/05 12:11:24 1.18
+++ JWSProcessor.java 2001/09/05 17:22:59 1.19
@@ -64,7 +64,7 @@
import org.apache.axis.* ;
import org.apache.axis.transport.http.HTTPConstants;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.XMLUtils ;
import org.apache.axis.utils.AxisClassLoader ;
import org.apache.axis.providers.java.RPCProvider;
1.17 +8 -8 xml-axis/java/src/org/apache/axis/handlers/LogHandler.java
Index: LogHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/LogHandler.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- LogHandler.java 2001/09/05 12:11:24 1.16
+++ LogHandler.java 2001/09/05 17:22:59 1.17
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -81,19 +81,19 @@
try {
FileWriter fw = new FileWriter( "axis.log", true );
PrintWriter pw = new PrintWriter( fw );
-
+
Message inMsg = msgContext.getRequestMessage();
Message outMsg = msgContext.getResponseMessage();
-
+
pw.println( "=======================================================" );
pw.println( "= Elapsed: " + (System.currentTimeMillis() - start) + " milliseconds");
pw.println( "= InMsg: " + (inMsg == null ? "null" : inMsg.getAsString()));
pw.println( "= OutMsg: " + (outMsg == null ? "null" : outMsg.getAsString()));
pw.println( "=======================================================" );
-
+
pw.close();
} catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
throw new AxisFault( e );
}
}
@@ -110,7 +110,7 @@
pw.println( "=====================" );
pw.close();
} catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
}
category.debug("Exit: LogHandler::undo" );
}
1.4 +7 -6 xml-axis/java/src/org/apache/axis/handlers/LogMessage.java
Index: LogMessage.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/LogMessage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LogMessage.java 2001/09/05 12:11:24 1.3
+++ LogMessage.java 2001/09/05 17:22:59 1.4
@@ -4,7 +4,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -12,7 +12,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -20,7 +20,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -28,7 +28,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -58,6 +58,7 @@
import org.apache.axis.* ;
import org.apache.axis.utils.* ;
import org.apache.log4j.Category;
+import org.apache.log4j.Priority;
/** This handler simply prints a custom message to the debug log.
*
@@ -72,9 +73,9 @@
{
String msg = (String)getOption("message");
if (msg != null)
- Debug.Print(0, msg);
+ category.log(Priority.FATAL, msg); // ??? Better way to do this?
}
-
+
public void undo(MessageContext msgContext) {
category.debug("Enter: LogMessage::undo" );
category.debug("Exit: LogMessage::undo" );
1.16 +12 -12 xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java
Index: SimpleAuthenticationHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- SimpleAuthenticationHandler.java 2001/09/05 12:11:24 1.15
+++ SimpleAuthenticationHandler.java 2001/09/05 17:22:59 1.16
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -78,7 +78,7 @@
Category.getInstance(SimpleAuthenticationHandler.class.getName());
// Simple hashtable of user and password. Null means everybody
- // will authenticate (replace with new Hashtable() if you want
+ // will authenticate (replace with new Hashtable() if you want
// the default to be that nobody will be authenticated.
static private Hashtable entries = null;
@@ -110,7 +110,7 @@
lnr.close();
} catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
}
}
}
@@ -123,25 +123,25 @@
if (entries != null) {
String userID = (String) msgContext.getProperty( MessageContext.USERID );
- Debug.Print( 1, "User: ", userID );
+ category.debug( "User: " + userID );
// in order to authenticate, the user must exist
if ( userID == null || userID.equals("") || !entries.containsKey(userID) )
- throw new AxisFault( "Server.Unauthenticated",
+ throw new AxisFault( "Server.Unauthenticated",
"User '" + userID + "' not authenticated (unknown user)",
null, null );
-
+
String passwd = (String) msgContext.getProperty( MessageContext.PASSWORD );
String valid = (String) entries.get(userID);
category.debug( "Pass: " + passwd );
-
+
// if a password is defined, then it must match
- if ( valid.length()>0 && !valid.equals(passwd) )
- throw new AxisFault( "Server.Unauthenticated",
+ if ( valid.length()>0 && !valid.equals(passwd) )
+ throw new AxisFault( "Server.Unauthenticated",
"User '" + userID + "' not authenticated (bad password)",
null, null );
- Debug.Print( 1, "User '", userID, "' authenticated to server" );
+ category.debug( "User '" + userID + "' authenticated to server" );
}
category.debug("Exit: SimpleAuthenticationHandler::invoke" );
1.17 +11 -11 xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java
Index: SimpleAuthorizationHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- SimpleAuthorizationHandler.java 2001/09/05 12:11:24 1.16
+++ SimpleAuthorizationHandler.java 2001/09/05 17:22:59 1.17
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -18,7 +18,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -26,7 +26,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -80,7 +80,7 @@
Category.getInstance(SimpleAuthorizationHandler.class.getName());
// Simple hashtable of users. Null means everybody
- // will authorize (replace with new Hashtable() if you want
+ // will authorize (replace with new Hashtable() if you want
// the default to be that nobody is authorized
//
// Values will be hashtables of valid actions for the user
@@ -104,9 +104,9 @@
String userID = st.nextToken();
String action = (st.hasMoreTokens()) ? st.nextToken() : "";
- Debug.Print( 1, "User '", userID, "' authorized to: ", action );
+ category.info( "User '" + userID + "' authorized to: " + action );
- // if we haven't seen this user before, create an entry
+ // if we haven't seen this user before, create an entry
if (!entries.containsKey(userID))
entries.put(userID, new Hashtable());
@@ -119,7 +119,7 @@
lnr.close();
} catch( Exception e ) {
- Debug.Print( 1, e );
+ category.error( e );
}
}
}
@@ -133,20 +133,20 @@
String userID = (String) msgContext.getProperty( MessageContext.USERID );
String action = msgContext.getTargetService();
- Debug.Print( 1, "User: '", userID, "'" );
- Debug.Print( 1, "Action: '", action, "'" );
+ category.debug( "User: '" + userID + "'" );
+ category.debug( "Action: '" + action + "'" );
if (entries != null) { // perm.list exists
Hashtable authlist = (Hashtable) entries.get(userID);
if ( authlist == null || !authlist.containsKey(action) ) {
- throw new AxisFault( "Server.Unauthorized",
+ throw new AxisFault( "Server.Unauthorized",
"User '" + userID + "' not authorized to '" + action + "'",
null, null );
}
}
- Debug.Print( 1, "User '", userID, "' authorized to: ", action );
+ category.debug( "User '" + userID + "' authorized to: " + action );
category.debug("Exit: SimpleAuthorizationHandler::invoke" );
}
1.8 +1 -1 xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java
Index: HTTPActionHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- HTTPActionHandler.java 2001/09/05 12:11:24 1.7
+++ HTTPActionHandler.java 2001/09/05 17:23:00 1.8
@@ -56,7 +56,7 @@
import org.apache.axis.*;
import org.apache.axis.handlers.BasicHandler;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.log4j.Category;
1.4 +3 -3 xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java
Index: HTTPAuthHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HTTPAuthHandler.java 2001/09/05 12:11:24 1.3
+++ HTTPAuthHandler.java 2001/09/05 17:23:00 1.4
@@ -56,7 +56,7 @@
import org.apache.axis.*;
import org.apache.axis.handlers.BasicHandler;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.encoding.Base64 ;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.log4j.Category;
@@ -95,13 +95,13 @@
if ( i == -1 ) user = tmp ;
else user = tmp.substring( 0, i);
msgContext.setProperty( MessageContext.USERID, user );
- Debug.Print(3, "HTTP userid: " + user );
+ category.debug( "HTTP userid: " + user );
if ( i != -1 ) {
String pwd = tmp.substring(i+1);
if ( pwd != null && pwd.equals("") ) pwd = null ;
if ( pwd != null ) {
msgContext.setProperty( MessageContext.PASSWORD, pwd );
- Debug.Print(3, "HTTP passwd: " + pwd );
+ category.debug( "HTTP passwd: " + pwd );
}
}
}
1.6 +1 -1 xml-axis/java/src/org/apache/axis/handlers/http/URLMapper.java
Index: URLMapper.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/URLMapper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- URLMapper.java 2001/09/05 12:11:24 1.5
+++ URLMapper.java 2001/09/05 17:23:00 1.6
@@ -56,7 +56,7 @@
import org.apache.axis.*;
import org.apache.axis.handlers.BasicHandler;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.log4j.Category;
1.22 +5 -5 xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
Index: SOAPService.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- SOAPService.java 2001/09/05 12:11:24 1.21
+++ SOAPService.java 2001/09/05 17:23:00 1.22
@@ -59,7 +59,7 @@
import org.apache.axis.*;
import org.apache.axis.encoding.*;
import org.apache.axis.message.*;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.QName;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.axis.registries.* ;
@@ -172,7 +172,7 @@
category.debug( "Invoking request chain" );
h.invoke(msgContext);
} else {
- Debug.Print( 3, "No request chain" );
+ category.debug( "No request chain" );
}
// Do SOAP semantics here
@@ -231,7 +231,7 @@
category.debug( "Invoking service/pivot" );
h.invoke(msgContext);
} else {
- Debug.Print( 3, "No service/pivot" );
+ category.debug( "No service/pivot" );
}
// OK, we're past the pivot, so let the MessageContext know.
@@ -242,7 +242,7 @@
category.debug( "Invoking response chain" );
h.invoke(msgContext);
} else {
- Debug.Print( 3, "No response chain" );
+ category.debug( "No response chain" );
}
category.debug("Exit : SOAPService::invoke" );
@@ -320,7 +320,7 @@
*/
public void enableTransport(String transportName)
{
- Debug.Print(3, "SOAPService(" + this + ") enabling transport " + transportName);
+ category.debug( "SOAPService(" + this + ") enabling transport " + transportName);
if (validTransports == null)
validTransports = new Vector();
validTransports.addElement(transportName);
1.6 +7 -3 xml-axis/java/src/org/apache/axis/message/BodyBuilder.java
Index: BodyBuilder.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/BodyBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BodyBuilder.java 2001/08/14 03:49:19 1.5
+++ BodyBuilder.java 2001/09/05 17:23:00 1.6
@@ -10,10 +10,14 @@
import org.apache.axis.Constants;
import org.apache.axis.encoding.DeserializationContext;
import org.apache.axis.encoding.ServiceDescription;
-import org.apache.axis.utils.Debug;
+import org.apache.log4j.Category;
+
public class BodyBuilder extends SOAPHandler
{
+ static Category category =
+ Category.getInstance(BodyBuilder.class.getName());
+
private final static boolean DEBUG_LOG = false;
private SOAPBodyElement element;
@@ -54,8 +58,8 @@
if (isRoot &&
context.getMessageContext().getServiceHandler() == null) {
- Debug.Print(2, "Dispatching to body namespace '",
- namespace, "'");
+ category.debug( "Dispatching to body namespace '" +
+ namespace + "'");
context.getMessageContext().setTargetService(namespace);
}
1.45 +1 -1 xml-axis/java/src/org/apache/axis/message/MessageElement.java
Index: MessageElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- MessageElement.java 2001/08/14 13:06:35 1.44
+++ MessageElement.java 2001/09/05 17:23:00 1.45
@@ -67,7 +67,7 @@
import org.apache.axis.encoding.SOAPTypeMappingRegistry;
import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.MessageContext;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.utils.Mapping;
import org.apache.axis.utils.QName;
import org.apache.axis.utils.XMLUtils;
1.9 +1 -1 xml-axis/java/src/org/apache/axis/message/SOAPBodyElement.java
Index: SOAPBodyElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPBodyElement.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SOAPBodyElement.java 2001/07/31 19:46:33 1.8
+++ SOAPBodyElement.java 2001/09/05 17:23:00 1.9
@@ -58,7 +58,7 @@
import org.xml.sax.Attributes;
import org.apache.axis.encoding.DeserializationContext;
import org.apache.axis.MessageContext;
-import org.apache.axis.utils.Debug;
+
import org.w3c.dom.Element;
/** A Body element.
1.15 +2 -2 xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
Index: JavaProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- JavaProvider.java 2001/09/05 12:11:24 1.14
+++ JavaProvider.java 2001/09/05 17:23:00 1.15
@@ -181,7 +181,7 @@
* the message (via processMessage).
*/
public void invoke(MessageContext msgContext) throws AxisFault {
- Debug.Print(1, "Enter: JavaProvider::invoke (for provider "+this+")");
+ category.debug( "Enter: JavaProvider::invoke (for provider "+this+")");
/* Find the service we're invoking so we can grab it's options */
/***************************************************************/
@@ -245,7 +245,7 @@
}
}
catch( Exception exp ) {
- Debug.Print( 1, exp );
+ category.error( exp );
if ( !(exp instanceof AxisFault) ) exp = new AxisFault(exp);
throw (AxisFault) exp ;
}
1.12 +1 -1 xml-axis/java/src/org/apache/axis/registries/SupplierRegistry.java
Index: SupplierRegistry.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/registries/SupplierRegistry.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SupplierRegistry.java 2001/09/05 12:11:25 1.11
+++ SupplierRegistry.java 2001/09/05 17:23:00 1.12
@@ -58,7 +58,7 @@
import java.io.* ;
import java.util.* ;
import org.apache.axis.* ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.suppliers.* ;
import org.apache.axis.registries.* ;
1.38 +9 -9 xml-axis/java/src/org/apache/axis/server/AxisServer.java
Index: AxisServer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- AxisServer.java 2001/09/05 12:11:25 1.37
+++ AxisServer.java 2001/09/05 17:23:00 1.38
@@ -87,24 +87,24 @@
* the AxisClient to be used by outcalling Services
*/
private AxisEngine clientEngine;
-
+
public AxisServer()
{
this(new FileProvider(Constants.SERVER_CONFIG_FILE));
}
-
+
public AxisServer(ConfigurationProvider provider)
{
super(provider);
}
-
+
/** Is this server active? If this is false, any requests will
* cause a SOAP Server fault to be generated.
*/
private boolean running = true;
-
+
public boolean isRunning() { return running; }
-
+
/** Start the server.
*/
public void start()
@@ -113,14 +113,14 @@
init();
running = true;
}
-
+
/** Stop the server.
*/
public void stop()
{
running = false;
}
-
+
/**
* Get this server's client engine. Create it if it does
* not yet exist.
@@ -131,7 +131,7 @@
}
return clientEngine;
}
-
+
/**
* Main routine of the AXIS server. In short we locate the appropriate
* handler for the desired service and invoke() it.
@@ -339,7 +339,7 @@
/**************************************************************/
// When do we call init/cleanup??
- Debug.Print(1, "Calling default logic in AxisServer" );
+ category.debug( "Calling default logic in AxisServer" );
/* This is what the entirety of this logic might evolve to:
1.4 +8 -8 xml-axis/java/src/org/apache/axis/server/Transport.java
Index: Transport.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/Transport.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Transport.java 2001/09/05 12:11:25 1.3
+++ Transport.java 2001/09/05 17:23:00 1.4
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -9,7 +9,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -17,7 +17,7 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
@@ -25,7 +25,7 @@
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
@@ -55,15 +55,15 @@
package org.apache.axis.server;
import org.apache.axis.SimpleTargetedChain;
-import org.apache.axis.utils.Debug;
+
import org.apache.log4j.Category;
import org.w3c.dom.*;
/**
* Transport is a targeted chain that knows it's a transport.
- *
+ *
* This is purely for deployment naming at this point.
- *
+ *
* @author Glen Daniels (gdaniels@macromedia.com)
*/
public class Transport extends SimpleTargetedChain
@@ -77,7 +77,7 @@
Element root = doc.createElement( "transport" );
fillInDeploymentData(root);
-
+
category.debug("Exit: Transport::getDeploymentData" );
return( root );
}
1.6 +1 -1 xml-axis/java/src/org/apache/axis/suppliers/FactorySupplier.java
Index: FactorySupplier.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/FactorySupplier.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FactorySupplier.java 2001/09/05 12:11:25 1.5
+++ FactorySupplier.java 2001/09/05 17:23:00 1.6
@@ -58,7 +58,7 @@
import java.util.Hashtable;
import org.apache.axis.Supplier;
import org.apache.axis.Handler;
-import org.apache.axis.utils.Debug;
+
import org.apache.log4j.Category;
/** A <code>FactorySupplier</code> always gives you a new Handler instance.
1.5 +1 -1 xml-axis/java/src/org/apache/axis/suppliers/SimpleChainSupplier.java
Index: SimpleChainSupplier.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/SimpleChainSupplier.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SimpleChainSupplier.java 2001/09/05 12:11:25 1.4
+++ SimpleChainSupplier.java 2001/09/05 17:23:00 1.5
@@ -59,7 +59,7 @@
import java.util.Vector;
import org.apache.axis.Supplier;
import org.apache.axis.*;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.registries.HandlerRegistry;
import org.apache.log4j.Category;
1.6 +1 -1 xml-axis/java/src/org/apache/axis/suppliers/SimpleSupplier.java
Index: SimpleSupplier.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/SimpleSupplier.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SimpleSupplier.java 2001/08/29 14:17:17 1.5
+++ SimpleSupplier.java 2001/09/05 17:23:00 1.6
@@ -57,7 +57,7 @@
import org.apache.axis.Supplier;
import org.apache.axis.Handler;
-import org.apache.axis.utils.Debug;
+
/** A <code>SimpleSupplier</code> just returns a single static instance.
*
1.8 +1 -1 xml-axis/java/src/org/apache/axis/suppliers/TargetedChainSupplier.java
Index: TargetedChainSupplier.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/suppliers/TargetedChainSupplier.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TargetedChainSupplier.java 2001/09/05 12:15:11 1.7
+++ TargetedChainSupplier.java 2001/09/05 17:23:00 1.8
@@ -60,7 +60,7 @@
import java.util.Enumeration;
import org.apache.axis.Supplier;
import org.apache.axis.*;
-import org.apache.axis.utils.Debug;
+
import org.apache.axis.registries.HandlerRegistry;
import org.apache.log4j.Category;
1.6 +13 -12 xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java
Index: AdminServlet.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AdminServlet.java 2001/08/15 21:30:17 1.5
+++ AdminServlet.java 2001/09/05 17:23:00 1.6
@@ -73,24 +73,25 @@
* @author Glen Daniels (gdaniels@macromedia.com)
*/
public class AdminServlet extends HttpServlet {
- private AxisServer server;
-
- public void init() {
- // Set the base path for the AxisServer to our WEB-INF directory
- // (so the config files can't get snooped by a browser)
- FileProvider provider =
- new FileProvider(getServletContext().getRealPath("/WEB-INF"),
- "server-config.xml");
-
- server = new AxisServer(provider);
- getServletContext().setAttribute("AxisEngine", server);
+ public AxisServer getEngine() {
+ if (getServletContext().getAttribute("AxisEngine") == null) {
+ // Set the base path for the AxisServer to our WEB-INF directory
+ // (so the config files can't get snooped by a browser)
+ FileProvider provider =
+ new FileProvider(getServletContext().getRealPath("/WEB-INF"),
+ "server-config.xml");
+
+ getServletContext().setAttribute("AxisEngine", new AxisServer(provider));
+ }
+ return (AxisServer)getServletContext().getAttribute("AxisEngine");
}
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
String str = "";
-
+ AxisServer server = getEngine();
+
String cmd = req.getParameter("cmd");
if (cmd != null) {
if (cmd.equals("start"))
1.43 +18 -1 xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
Index: AxisServlet.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- AxisServlet.java 2001/08/31 18:54:43 1.42
+++ AxisServlet.java 2001/09/05 17:23:00 1.43
@@ -59,6 +59,7 @@
import javax.servlet.* ;
import javax.servlet.http.* ;
import org.apache.axis.* ;
+import org.apache.axis.configuration.FileProvider;
import org.apache.axis.registries.HandlerRegistry;
import org.apache.axis.server.* ;
import org.apache.axis.utils.*;
@@ -84,12 +85,25 @@
param = context.getInitParameter("transport.name");
if (param != null)
transportName = param;
+ }
+
+ public AxisServer getEngine() {
+ if (getServletContext().getAttribute("AxisEngine") == null) {
+ // Set the base path for the AxisServer to our WEB-INF directory
+ // (so the config files can't get snooped by a browser)
+ FileProvider provider =
+ new FileProvider(getServletContext().getRealPath("/WEB-INF"),
+ "server-config.xml");
- engine = (AxisEngine)context.getAttribute(AXIS_ENGINE);
+ getServletContext().setAttribute("AxisEngine", new AxisServer(provider));
+ }
+ return (AxisServer)getServletContext().getAttribute("AxisEngine");
}
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
+ if (engine == null)
+ engine = getEngine();
ServletContext context = getServletConfig().getServletContext();
MessageContext msgContext = new MessageContext(engine);
@@ -158,6 +172,9 @@
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
+ if (engine == null)
+ engine = getEngine();
+
ServletConfig config = getServletConfig();
ServletContext context = config.getServletContext();
HttpSession session = req.getSession();
1.15 +15 -24 xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
Index: HTTPSender.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- HTTPSender.java 2001/09/05 12:11:25 1.14
+++ HTTPSender.java 2001/09/05 17:23:00 1.15
@@ -96,7 +96,7 @@
URL tmpURL = new URL( targetURL );
byte[] buf = new byte[4097];
int rc = 0 ;
-
+
// default SOAPAction to request namespaceURI/method
String action = msgContext.getStrProp(HTTPConstants.MC_HTTP_SOAPACTION);
if (action == null) {
@@ -104,7 +104,7 @@
MessageElement body = rm.getAsSOAPEnvelope().getFirstBody();
action = body.getNamespaceURI() + "/" + body.getName();
}
-
+
host = tmpURL.getHost();
if ( (port = tmpURL.getPort()) == -1 ) port = 80;
@@ -183,7 +183,7 @@
}
reqEnv = (String) msgContext.getRequestMessage().getAsString();
-
+
//System.out.println("Msg: " + reqEnv);
BufferedInputStream inp = new BufferedInputStream(sock.getInputStream());
@@ -205,20 +205,20 @@
.append( Base64.encode( tmpBuf.toString().getBytes() ) )
.append("\n" );
}
-
+
// don't forget the cookies!
// mmm... cookies
if (msgContext.getMaintainSession()) {
String cookie = msgContext.getStrProp(HTTPConstants.HEADER_COOKIE);
String cookie2 = msgContext.getStrProp(HTTPConstants.HEADER_COOKIE2);
-
+
if (cookie != null) {
otherHeaders.append(HTTPConstants.HEADER_COOKIE)
.append(": ")
.append(cookie)
.append("\r\n");
}
-
+
if (cookie2 != null) {
otherHeaders.append(HTTPConstants.HEADER_COOKIE2)
.append(": ")
@@ -226,7 +226,7 @@
.append("\r\n");
}
}
-
+
StringBuffer header = new StringBuffer();
byte[] request = reqEnv.getBytes();
@@ -250,7 +250,7 @@
.append( ": \"" )
.append( action )
.append( "\"\r\n");
-
+
header.append("\r\n");
out.write( header.toString().getBytes() );
@@ -307,17 +307,8 @@
}
}
- if ( b != -1 && Debug.getDebugLevel() > 8 ) {
- // Special case - if the debug level is this high then something
- // really bad must be going on - so just dump the input stream
- // to stdout.
- while ( (b = (byte) inp.read()) != -1 )
- System.err.print((char)b);
- System.err.println("");
- }
-
if ( b != -1 ) {
- if (Debug.getDebugLevel() > 0) {
+ if (category.isDebugEnabled()) {
String contentLength = (String) headers.get("content-length");
if ( contentLength != null ) {
contentLength = contentLength.trim();
@@ -325,9 +316,9 @@
for (len=0; len<data.length; )
len+= inp.read(data,len,data.length-len);
String xml = new String(data);
-
+
outMsg = new Message( data );
-
+
category.debug( "\nXML received:" );
category.debug( "-----------------------------------------------");
category.debug( xml );
@@ -346,7 +337,7 @@
outMsg.setMessageType(org.apache.axis.encoding.
ServiceDescription.RESPONSE);
msgContext.setResponseMessage( outMsg );
-
+
// if we are maintaining session state,
// handle cookies (if any)
if (msgContext.getMaintainSession()) {
@@ -369,7 +360,7 @@
}
category.debug( "Exit: HTTPDispatchHandler::invoke" );
}
-
+
// little helper function for cookies
public void handleCookie
(String cookieName, String setCookieName, Hashtable headers,
@@ -386,8 +377,8 @@
msgContext.setProperty(cookieName, cookie);
}
}
-
-
+
+
public void undo(MessageContext msgContext) {
category.debug( "Enter: HTTPDispatchHandler::undo" );
1.6 +1 -1 xml-axis/java/src/org/apache/axis/transport/http/HTTPTransport.java
Index: HTTPTransport.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPTransport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- HTTPTransport.java 2001/08/31 18:40:14 1.5
+++ HTTPTransport.java 2001/09/05 17:23:00 1.6
@@ -57,7 +57,7 @@
import java.util.* ;
import org.apache.axis.* ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.handlers.* ;
import org.apache.axis.registries.* ;
import org.apache.axis.client.ServiceClient;
1.24 +7 -5 xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java
Index: SimpleAxisServer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- SimpleAxisServer.java 2001/08/21 05:15:35 1.23
+++ SimpleAxisServer.java 2001/09/05 17:23:00 1.24
@@ -66,6 +66,7 @@
import org.apache.axis.session.Session;
import org.apache.axis.session.SimpleSession;
+import org.apache.log4j.Category;
import org.w3c.dom.Document;
@@ -79,7 +80,10 @@
* @author Rob Jellinghaus (robj@unrealities.com)
*/
public class SimpleAxisServer implements Runnable {
-
+ static Category category =
+ Category.getInstance(SimpleAxisServer.class.getName());
+
+
// session state.
// This table maps session keys (random numbers) to SimpleAxisSession objects.
//
@@ -462,7 +466,7 @@
}
fileName.append(c);
}
- Debug.Print(2, "SimpleAxisServer: req filename='" + fileName.toString() + "'");
+ category.debug( "SimpleAxisServer: req filename='" + fileName.toString() + "'");
return 0;
} else if (buf[0] == postHeader[0]) {
httpRequest.append("POST");
@@ -472,7 +476,7 @@
break;
fileName.append(c);
}
- Debug.Print(2, "SimpleAxisServer: req filename='" + fileName.toString() + "'");
+ category.debug( "SimpleAxisServer: req filename='" + fileName.toString() + "'");
} else {
throw new IOException("Cannot handle non-GET, non-POST request");
}
@@ -659,8 +663,6 @@
e.printStackTrace();
return;
}
-
- Debug.setDebugLevel(opts.isFlagSet('d'));
try {
int port = opts.getPort();
1.4 +1 -1 xml-axis/java/src/org/apache/axis/transport/local/LocalResponder.java
Index: LocalResponder.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalResponder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LocalResponder.java 2001/09/05 12:11:25 1.3
+++ LocalResponder.java 2001/09/05 17:23:01 1.4
@@ -57,7 +57,7 @@
import org.apache.axis.*;
import org.apache.axis.handlers.*;
-import org.apache.axis.utils.Debug;
+
import org.apache.log4j.Category;
/**
1.10 +6 -6 xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java
Index: LocalSender.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LocalSender.java 2001/09/05 12:11:25 1.9
+++ LocalSender.java 2001/09/05 17:23:01 1.10
@@ -92,24 +92,24 @@
AxisServer targetServer = (AxisServer)clientContext.
getProperty(LocalTransport.LOCAL_SERVER);
- Debug.Print(3, "LocalSender using server " + targetServer);
-
+ category.debug( "LocalSender using server " + targetServer);
+
if (targetServer == null) {
// This should have already been done, but it doesn't appear to be
// something that can be relied on. Oh, well...
if (server == null) init();
targetServer = server;
}
-
+
// Define a new messageContext per request
MessageContext serverContext = new MessageContext(targetServer);
// copy the request, and force its format to String in order to
// exercise the serializers.
String msgStr = clientContext.getRequestMessage().getAsString();
-
- Debug.Print(3, "LocalSender sending XML:");
- Debug.Print(3, msgStr);
+
+ category.debug( "LocalSender sending XML:");
+ category.debug( msgStr);
serverContext.setRequestMessage(new Message(msgStr));
serverContext.setTransportName("local");
1.6 +1 -1 xml-axis/java/src/org/apache/axis/transport/local/LocalTransport.java
Index: LocalTransport.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalTransport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LocalTransport.java 2001/08/31 18:40:15 1.5
+++ LocalTransport.java 2001/09/05 17:23:01 1.6
@@ -56,7 +56,7 @@
package org.apache.axis.transport.local;
import org.apache.axis.* ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.client.Transport;
import org.apache.axis.client.ServiceClient;
import org.apache.axis.server.AxisServer;
1.63 +66 -66 xml-axis/java/src/org/apache/axis/utils/Admin.java
Index: Admin.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- Admin.java 2001/09/05 12:11:25 1.62
+++ Admin.java 2001/09/05 17:23:01 1.63
@@ -114,7 +114,7 @@
table.put( name, value );
}
}
-
+
/**
* Register a set of type mappings for a service.
*
@@ -130,14 +130,14 @@
Element el = (Element)list.item(i);
registerTypes(el, reg, true);
}
-
+
list = root.getElementsByTagName("typeMappings");
for (int i = 0; list != null && i < list.getLength(); i++) {
Element el = (Element)list.item(i);
registerTypes(el, reg, false);
}
}
-
+
private static void registerTypes(Element root,
TypeMappingRegistry map,
boolean isBean)
@@ -177,16 +177,16 @@
if (!el.getTagName().equals("engineConfig"))
throw new Exception("Wanted 'engineConfig' element, got '" +
el.getTagName() + "'");
-
+
NodeList nl = el.getElementsByTagName("handlers");
deploy(nl, engine);
-
+
nl = el.getElementsByTagName("services");
deploy(nl, engine);
-
+
nl = el.getElementsByTagName("transports");
deploy(nl, engine);
-
+
nl = el.getElementsByTagName("typeMappings");
deploy(nl, engine);
/*
@@ -195,7 +195,7 @@
engine.getTypeMappingRegistry(),
false);
*/
-
+
engine.saveConfiguration();
}
@@ -237,12 +237,12 @@
int lenI = nl.getLength();
for (int i = 0; i < lenI; i++) {
Element el = (Element)nl.item(i);
-
+
NodeList children = el.getChildNodes();
int lenJ = children.getLength();
for (int j = 0; j < lenJ; j++) {
if (!(children.item(j) instanceof Element)) continue;
-
+
Element item = (Element)children.item(j);
int type;
@@ -302,7 +302,7 @@
"Root element must be 'clientdeploy', 'deploy', 'undeploy', " +
"'list', 'passwd', or 'quit'",
null, null );
-
+
/** Might do something like this once security is a little more
* integrated.
if (!engine.hasSafePassword() &&
@@ -311,7 +311,7 @@
"You must change the admin password before administering Axis!",
null, null);
*/
-
+
/** For now, though - make sure we can only admin from our own
* IP, unless the remoteAdmin option is set.
*/
@@ -328,7 +328,7 @@
InetAddress myAddr = InetAddress.getLocalHost();
InetAddress remoteAddr =
InetAddress.getByName(remoteIP);
-
+
if (!myAddr.equals(remoteAddr))
throw new AxisFault("Server.Unauthorized",
"Remote admin access is not allowed! ",
@@ -337,7 +337,7 @@
}
}
}
-
+
if (action.equals("passwd")) {
String newPassword = root.getFirstChild().getNodeValue();
engine.setAdminPassword(newPassword);
@@ -359,16 +359,16 @@
root.appendChild( doc.createTextNode( "Quitting" ) );
return doc;
}
-
+
if ( action.equals("list") ) {
return listConfig(engine);
}
-
+
if (action.equals("clientdeploy")) {
// set engine to client engine
engine = engine.getClientEngine();
}
-
+
NodeList list = root.getChildNodes();
for ( int loop = 0 ; loop < list.getLength() ; loop++ ) {
Node node = list.item(loop);
@@ -378,7 +378,7 @@
Element elem = (Element) node ;
String type = elem.getTagName();
String name = elem.getAttribute("name");
-
+
if ( action.equals( "undeploy" ) ) {
if ( type.equals("service") ) {
category.info( "Undeploying " + type + ": " + name );
@@ -394,7 +394,7 @@
null, null );
continue ;
}
-
+
if ( type.equals( "handler" ) ) {
registerHandler(elem, engine);
}
@@ -423,7 +423,7 @@
null, null );
}
engine.saveConfiguration();
-
+
doc = XMLUtils.newDocument();
doc.appendChild( root = doc.createElement( "Admin" ) );
root.appendChild( doc.createTextNode( "Done processing" ) );
@@ -435,7 +435,7 @@
}
return( doc );
}
-
+
/** Get an XML document representing this engine's configuration.
*
* This document is suitable for saving and reloading into the
@@ -449,30 +449,30 @@
throws AxisFault
{
Document doc = XMLUtils.newDocument();
-
+
Element tmpEl = doc.createElement("engineConfig");
doc.appendChild(tmpEl);
-
+
Element el = doc.createElement("handlers");
list(el, engine.getHandlerRegistry());
tmpEl.appendChild(el);
-
+
el = doc.createElement("services");
list(el, engine.getServiceRegistry());
tmpEl.appendChild(el);
-
+
el = doc.createElement("transports");
list(el, engine.getTransportRegistry());
tmpEl.appendChild(el);
-
- Debug.Print(2, "Outputting registry");
+
+ category.debug( "Outputting registry");
el = doc.createElement("typeMappings");
engine.getTypeMappingRegistry().dumpToElement(el);
tmpEl.appendChild(el);
return( doc );
}
-
+
/**
* Return an XML Element containing the configuration info for one
* of the engine's Handler registries.
@@ -492,7 +492,7 @@
String[] names ;
Handler h ;
int i ;
-
+
names = registry.list();
for( i = 0 ; names != null && i < names.length ; i++ ) {
@@ -506,10 +506,10 @@
elem.setAttribute( "name", names[i] );
root.appendChild( doc.importNode(elem,true) );
}
-
+
return root;
}
-
+
/**
* Deploy a chain described in XML into an AxisEngine.
*
@@ -522,7 +522,7 @@
Handler tmpH = null;
String hName;
SupplierRegistry hr = (SupplierRegistry)engine.getHandlerRegistry();
-
+
String name = elem.getAttribute( "name" );
String flow = elem.getAttribute( "flow" );
String request = elem.getAttribute( "request" );
@@ -539,7 +539,7 @@
if (flow != null) {
category.info( "Deploying chain: " + name );
Vector names = new Vector();
-
+
StringTokenizer st = new StringTokenizer( flow, " \t\n\r\f," );
while ( st.hasMoreElements() ) {
names.addElement(st.nextToken());
@@ -550,17 +550,17 @@
names,
options,
hr);
-
+
hr.add(name, supp);
}
else {
category.info( "Deploying chain: " + name );
-
+
if ((request == null) &&
(response == null) &&
(pivot == null))
throw new AxisFault("No request/response/pivot for chain '" + name + "'!");
-
+
StringTokenizer st = null ;
Vector reqNames = new Vector();
Vector respNames = new Vector();
@@ -571,16 +571,16 @@
reqNames.addElement(st.nextToken());
}
}
-
+
if (response != null) {
st = new StringTokenizer( response, " \t\n\r\f," );
while ( st.hasMoreElements() ) {
respNames.addElement(st.nextToken());
}
}
-
+
getOptions( elem, options );
-
+
TargetedChainSupplier supp = new TargetedChainSupplier(name,
reqNames,
respNames,
@@ -590,7 +590,7 @@
hr.add(name,supp);
}
}
-
+
/**
* Deploy a service described in XML into an AxisEngine.
*
@@ -602,7 +602,7 @@
{
HandlerRegistry hr = engine.getHandlerRegistry();
HandlerRegistry sr = engine.getServiceRegistry();
-
+
String name = elem.getAttribute( "name" );
String request = elem.getAttribute( "request" );
String pivot = elem.getAttribute( "pivot" );
@@ -629,7 +629,7 @@
if ( service == null ) service = new SOAPService();
else service.clear();
-
+
if ( request != null && !"".equals(request) ) {
st = new StringTokenizer( request, " \t\n\r\f," );
c = null ;
@@ -645,21 +645,21 @@
c.addHandler( tmpH );
}
}
-
+
if ( pivot != null && !"".equals(pivot) ) {
tmpH = hr.find(pivot);
if (tmpH == null)
throw new AxisFault("Deploying service " + name +
": couldn't find pivot Handler '" + pivot + "'");
-
+
service.setPivotHandler( tmpH );
-
+
if (pivot.equals("MsgDispatcher")) {
ServiceDescription sd = new ServiceDescription("msgService", false);
service.setServiceDescription(sd);
}
}
-
+
if ( response != null && !"".equals(response) ) {
st = new StringTokenizer( response, " \t\n\r\f," );
c = null ;
@@ -675,18 +675,18 @@
c.addHandler( tmpH );
}
}
-
+
getOptions( elem, service );
-
+
try {
registerTypeMappings(elem, service);
} catch (Exception e) {
throw new AxisFault(e);
}
-
+
engine.deployService( name, service );
}
-
+
/**
* Deploy a handler described in XML into an AxisEngine.
*
@@ -697,7 +697,7 @@
throws AxisFault
{
HandlerRegistry hr = engine.getHandlerRegistry();
-
+
try {
AxisClassLoader cl = AxisClassLoader.getClassLoader();
String name = elem.getAttribute( "name" );
@@ -708,7 +708,7 @@
String cls = elem.getAttribute( "class" );
if ( cls != null && cls.equals("") ) cls = null ;
category.info( "Deploying handler: " + name );
-
+
h = hr.find( name );
if ( h == null ) h = (Handler) cl.loadClass(cls).newInstance();
getOptions( elem, h );
@@ -760,9 +760,9 @@
respNames.addElement(st.nextToken());
}
}
-
+
getOptions( elem, options );
-
+
HandlerRegistry hr = engine.getHandlerRegistry();
TargetedChainSupplier supp = new TransportSupplier(name,
reqNames,
@@ -786,19 +786,19 @@
{
Serializer ser;
DeserializerFactory dserFactory;
-
+
// Retrieve classname attribute
String classname = elem.getAttribute("classname");
if ((classname == null) || classname.equals(""))
throw new AxisFault("Server.Admin.error",
"No classname attribute in type mapping",
null, null);
-
+
// Resolve class name
Class cls;
QName qn;
-
+
try {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
cls = cl.loadClass(classname);
@@ -812,8 +812,8 @@
String namespaceURI = elem.getNamespaceURI();
String localName = elem.getLocalName();
qn = new QName(namespaceURI, localName);
-
- Debug.Print(2, "Registering mapping for " + qn + " -> " + classname);
+
+ category.debug( "Registering mapping for " + qn + " -> " + classname);
// register both serializers and deserializers for this bean
ser = new BeanSerializer(cls);
@@ -823,11 +823,11 @@
int idx = typeName.indexOf(":");
String prefix = typeName.substring(0, idx);
String localPart = typeName.substring(idx + 1);
-
+
qn = new QName(XMLUtils.getNamespace(prefix, elem), localPart);
-
+
classname = elem.getAttribute("serializer");
- Debug.Print(3, "Serializer class is " + classname);
+ category.debug( "Serializer class is " + classname);
try {
ser = (Serializer)Class.forName(classname).newInstance();
} catch (Exception e) {
@@ -836,7 +836,7 @@
null, null);
}
classname = elem.getAttribute("deserializerFactory");
- Debug.Print(3, "DeserializerFactory class is " + classname);
+ category.debug( "DeserializerFactory class is " + classname);
try {
dserFactory = (DeserializerFactory)Class.forName(classname).
newInstance();
@@ -846,13 +846,13 @@
e.toString(),
null, null);
}
-
+
}
-
+
map.addSerializer(cls, qn, ser);
map.addDeserializerFactory(qn, cls, dserFactory);
}
-
+
public static void main(String args[]) throws Exception {
int i = 0 ;
1.4 +6 -1 xml-axis/java/src/org/apache/axis/utils/JavaUtils.java
Index: JavaUtils.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/JavaUtils.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JavaUtils.java 2001/08/29 14:17:17 1.3
+++ JavaUtils.java 2001/09/05 17:23:01 1.4
@@ -55,6 +55,8 @@
package org.apache.axis.utils;
+import org.apache.log4j.Category;
+
import java.lang.reflect.*;
import java.util.*;
@@ -65,6 +67,9 @@
*/
public class JavaUtils
{
+ static Category category =
+ Category.getInstance(JavaUtils.class.getName());
+
/** Utility function to convert an Object to some desired Class.
*
* Right now this only works for arrays <-> Lists, but it might be
@@ -75,7 +80,7 @@
*/
public static Object convert(Object arg, Class destClass)
{
- Debug.Print(3, "Trying to convert " + arg.getClass().getName() +
+ category.debug( "Trying to convert " + arg.getClass().getName() +
" to " + destClass.getName());
if (!(arg instanceof List))
1.14 +14 -2 xml-axis/java/src/org/apache/axis/utils/Options.java
Index: Options.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Options.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Options.java 2001/07/12 15:04:57 1.13
+++ Options.java 2001/09/05 17:23:01 1.14
@@ -62,10 +62,22 @@
* @author Doug Davis (dug@us.ibm.com)
*/
+import org.apache.log4j.Category;
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Priority;
+
import java.net.* ;
import java.util.* ;
public class Options {
+ static Category category =
+ Category.getInstance(Options.class.getName());
+
+ static {
+ BasicConfigurator.configure();
+ Category.getRoot().setPriority(Priority.FATAL);
+ }
+
String args[] = null ;
//////////////////////////////////////////////////////////////////////////
@@ -96,7 +108,7 @@
try {
getURL();
} catch( MalformedURLException e ) {
- Debug.Print( 1, "getURL failed to correctly process URL; protocol not " +
+ category.error( "getURL failed to correctly process URL; protocol not " +
"supported" );
throw e ;
}
@@ -261,7 +273,7 @@
if ( port != null && !port.equals("-1")) tmp += ":" + port ;
if ( servlet != null ) tmp += servlet ;
} else tmp = url.toString();
- Debug.Print( 3, "getURL returned: " + tmp );
+ category.debug( "getURL returned: " + tmp );
return( tmp );
}
1.4 +0 -1 xml-axis/java/test/put.java
Index: put.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/put.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- put.java 2001/07/19 18:46:29 1.3
+++ put.java 2001/09/05 17:23:01 1.4
@@ -17,7 +17,6 @@
class put {
static void main(String[] args) throws Exception {
Options opts = new Options(args);
- Debug.setDebugLevel( opts.isFlagSet( 'd' ) );
String action = opts.isValueSet('a');
ServiceClient sc = new ServiceClient(opts.getURL());
1.2 +1 -1 xml-axis/java/test/functional/AltStockQuoteService.jws
Index: AltStockQuoteService.jws
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/AltStockQuoteService.jws,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AltStockQuoteService.jws 2001/07/08 14:18:40 1.1
+++ AltStockQuoteService.jws 2001/09/05 17:23:01 1.2
@@ -61,7 +61,7 @@
import org.apache.axis.AxisServiceConfig;
import org.apache.axis.utils.XMLUtils ;
-import org.apache.axis.utils.Debug;
+
/**
* See \samples\stock\readme for info.
1.5 +1 -1 xml-axis/java/test/functional/TestAddressBookSample.java
Index: TestAddressBookSample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestAddressBookSample.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TestAddressBookSample.java 2001/08/29 14:17:18 1.4
+++ TestAddressBookSample.java 2001/09/05 17:23:01 1.5
@@ -61,7 +61,7 @@
import org.apache.axis.AxisFault ;
import org.apache.axis.client.AdminClient;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
1.4 +1 -1 xml-axis/java/test/functional/TestBidBuySample.java
Index: TestBidBuySample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestBidBuySample.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestBidBuySample.java 2001/06/27 04:45:15 1.3
+++ TestBidBuySample.java 2001/09/05 17:23:01 1.4
@@ -61,7 +61,7 @@
import org.apache.axis.AxisFault ;
import org.apache.axis.client.AdminClient;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
1.3 +1 -1 xml-axis/java/test/functional/TestMiscSample.java
Index: TestMiscSample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestMiscSample.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestMiscSample.java 2001/06/27 04:45:16 1.2
+++ TestMiscSample.java 2001/09/05 17:23:01 1.3
@@ -60,7 +60,7 @@
import java.util.*;
import org.apache.axis.AxisFault ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
1.3 +1 -1 xml-axis/java/test/functional/TestProxySample.java
Index: TestProxySample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestProxySample.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestProxySample.java 2001/07/10 23:14:48 1.2
+++ TestProxySample.java 2001/09/05 17:23:01 1.3
@@ -60,7 +60,7 @@
import java.util.*;
import org.apache.axis.AxisFault ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.client.AdminClient;
import org.apache.axis.client.ServiceClient;
1.8 +1 -1 xml-axis/java/test/functional/TestStockSample.java
Index: TestStockSample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestStockSample.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestStockSample.java 2001/09/02 04:04:22 1.7
+++ TestStockSample.java 2001/09/05 17:23:01 1.8
@@ -61,7 +61,7 @@
import org.apache.axis.AxisFault ;
import org.apache.axis.client.AdminClient;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;
1.11 +1 -1 xml-axis/java/test/functional/TestTransportSample.java
Index: TestTransportSample.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/functional/TestTransportSample.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TestTransportSample.java 2001/09/02 13:34:08 1.10
+++ TestTransportSample.java 2001/09/05 17:23:01 1.11
@@ -60,7 +60,7 @@
import java.util.*;
import org.apache.axis.AxisFault ;
-import org.apache.axis.utils.Debug ;
+
import org.apache.axis.utils.Options ;
import org.apache.axis.utils.QName ;
import org.apache.axis.encoding.ServiceDescription;