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 rs...@apache.org on 2002/08/04 05:27:24 UTC
cvs commit: xml-axis/java/src/org/apache/axis/handlers BasicHandler.java
rsitze 2002/08/03 20:27:24
Modified: java/src/org/apache/axis AxisEngine.java
java/src/org/apache/axis/server AxisServer.java
java/src/org/apache/axis/transport/http
CommonsHTTPSender.java
java/src/org/apache/axis/handlers BasicHandler.java
Log:
Backing out attempts to link all properties directly to an AxisEngine
instance (AxisClient or AxisServer). Instead we will go with a different
approach similar to the System properties, but with more local scope.
First step: link everything directly to AxisProperties and remove
intermediates.
Note, current direction does not exclude properties-by-engine
(AxisEngine), that can still be added back later. It's simply that
the current state is sufficient to meet needs of loading this into
a J2EE environment, or will be after finishing touches to
AxisProperties.
Revision Changes Path
1.92 +12 -4 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.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- AxisEngine.java 2 Aug 2002 17:27:41 -0000 1.91
+++ AxisEngine.java 4 Aug 2002 03:27:24 -0000 1.92
@@ -57,11 +57,14 @@
import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.handlers.BasicHandler;
+import org.apache.axis.handlers.HandlerChainImpl;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.session.Session;
import org.apache.axis.session.SimpleSession;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.cache.ClassCache;
+import org.apache.axis.client.Service;
+import org.apache.axis.client.Call;
import org.apache.axis.components.logger.LogFactory;
import org.apache.commons.logging.Log;
@@ -72,6 +75,7 @@
import java.util.Hashtable;
import java.util.Enumeration;
+
/**
* An <code>AxisEngine</code> is the base class for AxisClient and
* AxisServer. Handles common functionality like dealing with the
@@ -108,6 +112,7 @@
// Default admin. password
private static final String DEFAULT_ADMIN_PASSWORD = "admin";
+
/** Our go-to guy for configuration... */
protected EngineConfiguration config;
@@ -186,7 +191,7 @@
/*Set the default attachment implementation */
setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION,
- getProperty("axis." + PROP_ATTACHMENT_IMPLEMENTATION ));
+ AxisProperties.getProperty("axis." + PROP_ATTACHMENT_IMPLEMENTATION ));
setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION, DEFAULT_ATTACHMENT_IMPL);
@@ -409,11 +414,12 @@
}
protected void invokeJAXRPCHandlers(MessageContext context){
- org.apache.axis.client.Service service = (org.apache.axis.client.Service) context.getProperty(org.apache.axis.client.Call.WSDL_SERVICE);
+ Service service
+ = (Service)context.getProperty(Call.WSDL_SERVICE);
if(service == null)
return;
- QName portName = (QName) context.getProperty(org.apache.axis.client.Call.WSDL_PORT_NAME);
+ QName portName = (QName) context.getProperty(Call.WSDL_PORT_NAME);
if(portName == null)
return;
@@ -426,7 +432,9 @@
if(chain == null || chain.isEmpty())
return;
- org.apache.axis.handlers.HandlerChainImpl impl = new org.apache.axis.handlers.HandlerChainImpl(chain);
+ HandlerChainImpl impl
+ = new HandlerChainImpl(chain);
+
if(!context.getPastPivot())
impl.handleRequest(context);
else
1.77 +1 -1 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.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- AxisServer.java 2 Aug 2002 17:27:41 -0000 1.76
+++ AxisServer.java 4 Aug 2002 03:27:24 -0000 1.77
@@ -89,7 +89,7 @@
public static AxisServer getServer(Map environment) throws AxisFault
{
if (factory == null) {
- String factoryClassName = getProperty("axis.ServerFactory");
+ String factoryClassName = AxisProperties.getProperty("axis.ServerFactory");
if (factoryClassName != null) {
try {
Class factoryClass = ClassUtils.forName(factoryClassName);
1.3 +16 -15 xml-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
Index: CommonsHTTPSender.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CommonsHTTPSender.java 2 Aug 2002 17:27:42 -0000 1.2
+++ CommonsHTTPSender.java 4 Aug 2002 03:27:24 -0000 1.3
@@ -55,6 +55,7 @@
package org.apache.axis.transport.http;
import org.apache.axis.AxisFault;
+import org.apache.axis.AxisProperties;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.components.logger.LogFactory;
@@ -239,19 +240,19 @@
}
// Get https.proxyXXX settings
- String tunnelHost = getProperty("https.proxyHost");
- String tunnelPortStr = getProperty("https.proxyPort");
- String nonProxyHosts = getProperty("https.nonProxyHosts");
+ String tunnelHost = AxisProperties.getProperty("https.proxyHost");
+ String tunnelPortStr = AxisProperties.getProperty("https.proxyPort");
+ String nonProxyHosts = AxisProperties.getProperty("https.nonProxyHosts");
// Use http.proxyXXX settings if https.proxyXXX is not set
if (tunnelHost == null) {
- tunnelHost = getProperty("http.proxyHost");
+ tunnelHost = AxisProperties.getProperty("http.proxyHost");
}
if (tunnelPortStr == null) {
- tunnelPortStr = getProperty("http.proxyPort");
+ tunnelPortStr = AxisProperties.getProperty("http.proxyPort");
}
if (nonProxyHosts == null) {
- nonProxyHosts = getProperty("http.nonProxyHosts");
+ nonProxyHosts = AxisProperties.getProperty("http.nonProxyHosts");
}
boolean hostInNonProxyList =
isHostInNonProxyList(host, nonProxyHosts);
@@ -267,14 +268,14 @@
? 80
: Integer.parseInt(tunnelPortStr))
: 80);
- String tunnelUser = getProperty("https.proxyUser");
- String tunnelPassword = getProperty("https.proxyPassword");
+ String tunnelUser = AxisProperties.getProperty("https.proxyUser");
+ String tunnelPassword = AxisProperties.getProperty("https.proxyPassword");
if (tunnelUser == null) {
- tunnelUser = getProperty("http.proxyUser");
+ tunnelUser = AxisProperties.getProperty("http.proxyUser");
}
if (tunnelPassword == null) {
- tunnelPassword = getProperty("http.proxyPassword");
+ tunnelPassword = AxisProperties.getProperty("http.proxyPassword");
}
if (tunnelUser != null) {
Credentials proxyCred =
@@ -300,13 +301,13 @@
private HttpConnection getConnection(HttpState state, String host, int port)
throws Exception {
- String proxyHost = getProperty("http.proxyHost");
- String proxyPort = getProperty("http.proxyPort");
- String nonProxyHosts = getProperty("http.nonProxyHosts");
+ String proxyHost = AxisProperties.getProperty("http.proxyHost");
+ String proxyPort = AxisProperties.getProperty("http.proxyPort");
+ String nonProxyHosts = AxisProperties.getProperty("http.nonProxyHosts");
boolean hostInNonProxyList =
isHostInNonProxyList(host, nonProxyHosts);
- String proxyUsername = getProperty("http.proxyUser");
- String proxyPassword = getProperty("http.proxyPassword");
+ String proxyUsername = AxisProperties.getProperty("http.proxyUser");
+ String proxyPassword = AxisProperties.getProperty("http.proxyPassword");
if (port == -1) {
port = 80;
1.37 +0 -7 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.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- BasicHandler.java 2 Aug 2002 17:27:42 -0000 1.36
+++ BasicHandler.java 4 Aug 2002 03:27:24 -0000 1.37
@@ -220,11 +220,4 @@
public List getUnderstoodHeaders() {
return null;
}
-
- /**
- * Hook to axis service... for now hardwire
- */
- protected static final String getProperty(String property) {
- return AxisProperties.getProperty(property);
- }
}