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 Glen Daniels <gd...@macromedia.com> on 2001/10/02 17:40:30 UTC

RE: AW: cvs commit: xml-axis/java/src/org/apache/axis/utils Optio ns.java

Argh, bad factoring on my part.  Thanks!

> -----Original Message-----
> From: Davanum Srinivas [mailto:dims@yahoo.com]
> Sent: Tuesday, October 02, 2001 11:33 AM
> To: axis-dev@xml.apache.org
> Subject: Re: AW: cvs commit: xml-axis/java/src/org/apache/axis/utils
> Options.java
> 
> 
> Carsten, Glen,
> Shouldn't you be using http.proxyHost and http.proxyPort for 
> the non-SSL case? Here's the patch.
> 
> Thanks,
> dims
> 
> ----------------------------- CUT HERE 
> -------------------------------------------------
> Index: java/src/org/apache/axis/transport/http/HTTPSender.java
> ===================================================================
> RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTT
> PSender.java,v
> retrieving revision 1.20
> diff -u -r1.20 HTTPSender.java
> --- java/src/org/apache/axis/transport/http/HTTPSender.java	
> 2001/10/02 15:01:31	1.20
> +++ java/src/org/apache/axis/transport/http/HTTPSender.java	
> 2001/10/02 15:28:07
> @@ -113,11 +113,11 @@
>              if ( (port = tmpURL.getPort()) == -1 ) port = 80;
>  
>              Socket             sock = null ;
> -            String proxyHost = System.getProperty("https.proxyHost");
> -            String proxyPort = System.getProperty("https.proxyPort");
>  
>              if (tmpURL.getProtocol().equalsIgnoreCase("https")) {
>                  if ( (port = tmpURL.getPort()) == -1 ) port = 443;
> +                String proxyHost = 
> System.getProperty("https.proxyHost");
> +                String proxyPort = 
> System.getProperty("https.proxyPort");
>                  String tunnelUsername = 
> System.getProperty("https.proxyUsername");
>                  String tunnelPassword = 
> System.getProperty("https.proxyPassword");
>                  try {
> @@ -177,6 +177,8 @@
>                  category.debug( "Created an SSL connection");
>              } else {
>                  if ((port = tmpURL.getPort()) == -1 ) port = 80;
> +                String proxyHost = 
> System.getProperty("http.proxyHost");
> +                String proxyPort = 
> System.getProperty("http.proxyPort");
>  
>                  if (proxyHost == null || proxyHost.equals("")
>                      || proxyPort == null || proxyPort.equals("")) {
> ----------------------------- CUT HERE 
> -------------------------------------------------
> 
> 
> --- Carsten Ziegeler <cz...@sundn.de> wrote:
> > Many thanks, Glen, for applying the patch!!!
> > 
> > 
> > Carsten
> > 
> > Open Source Group                        sunShine - b:Integrated
> > ================================================================
> > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > www.sundn.de                          mailto: cziegeler@sundn.de
> > ================================================================
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: gdaniels@apache.org [mailto:gdaniels@apache.org]
> > > Gesendet: Dienstag, 2. Oktober 2001 17:02
> > > An: xml-axis-cvs@apache.org
> > > Betreff: cvs commit: xml-axis/java/src/org/apache/axis/utils
> > > Options.java
> > >
> > >
> > > gdaniels    01/10/02 08:01:31
> > >
> > >   Modified:    java     build.xml
> > >                java/src/org/apache/axis AxisEngine.java
> > >                java/src/org/apache/axis/transport/http 
> HTTPSender.java
> > >                java/src/org/apache/axis/utils Options.java
> > >   Added:       java/src log4j.properties
> > >   Log:
> > >   Two changes:
> > >
> > >   1) Merge in Carsten Zeigeler's HTTPSender proxy support code.
> > >
> > >   2) Enable more reasonable log4j initialization.  Put a 
> log4j.properties
> > >       file at the top level of the axis.jar, so it'll get picked
> > > up if another
> > >       one (from the app server for instance) doesn't get 
> found first.
> > >
> > >   Revision  Changes    Path
> > >   1.45      +3 -0      xml-axis/java/build.xml
> > >
> > >   Index: build.xml
> > >   
> ===================================================================
> > >   RCS file: /home/cvs/xml-axis/java/build.xml,v
> > >   retrieving revision 1.44
> > >   retrieving revision 1.45
> > >   diff -u -r1.44 -r1.45
> > >   --- build.xml	2001/09/20 22:04:44	1.44
> > >   +++ build.xml	2001/10/02 15:01:31	1.45
> > >   @@ -164,8 +164,11 @@
> > >              toDir="${build.dest}/org/apache/axis/server"/>
> > >        <copy 
> file="${src.dir}/org/apache/axis/client/client-config.xml"
> > >              toDir="${build.dest}/org/apache/axis/client"/>
> > >   +    <copy file="${src.dir}/log4j.properties"
> > >   +          toDir="${build.dest}"/>
> > >        <jar jarfile="${build.lib}/${name}.jar" 
> basedir="${build.dest}" >
> > >          <include name="org/**" />
> > >   +      <include name="log4j.properties"/>
> > >        </jar>
> > >        <copy file="${wsdl4j.jar}" toDir="${build.lib}"/>
> > >        <copy file="${log4j-core.jar}" toDir="${build.lib}"/>
> > >
> > >
> > >
> > >   1.1                  xml-axis/java/src/log4j.properties
> > >
> > >   Index: log4j.properties
> > >   
> ===================================================================
> > >   # Set root category priority to ERROR and its only 
> appender to A1.
> > >   log4j.rootCategory=ERROR, A1
> > >
> > >   # A1 is set to be a ConsoleAppender.
> > >   log4j.appender.A1=org.apache.log4j.ConsoleAppender
> > >
> > >   # A1 uses PatternLayout.
> > >   log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > >   log4j.appender.A1.layout.ConversionPattern=%-4r [%t] 
> %-5p %c %x - %m%n
> > >
> > >
> > >
> > >   1.32      +9 -19     
> 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.31
> > >   retrieving revision 1.32
> > >   diff -u -r1.31 -r1.32
> > >   --- AxisEngine.java	2001/09/05 17:22:58	1.31
> > >   +++ AxisEngine.java	2001/10/02 15:01:31	1.32
> > >   @@ -55,24 +55,19 @@
> > >
> > >    package org.apache.axis;
> > >
> > >   -import java.io.*;
> > >   -import java.net.URL;
> > >   -import java.util.* ;
> > >   -import org.apache.axis.* ;
> > >   -import org.apache.axis.client.Transport;
> > >   -import org.apache.axis.utils.* ;
> > >   -import org.apache.axis.handlers.* ;
> > >   -import org.apache.axis.handlers.soap.* ;
> > >   -import org.apache.axis.registries.* ;
> > >   +import org.apache.axis.encoding.DeserializerFactory;
> > >   +import org.apache.axis.encoding.SOAPTypeMappingRegistry;
> > >   +import org.apache.axis.encoding.Serializer;
> > >   +import org.apache.axis.encoding.TypeMappingRegistry;
> > >   +import org.apache.axis.handlers.BasicHandler;
> > >   +import org.apache.axis.handlers.soap.SOAPService;
> > >   +import org.apache.axis.registries.HandlerRegistry;
> > >   +import org.apache.axis.registries.SupplierRegistry;
> > >    import org.apache.axis.session.Session;
> > >    import org.apache.axis.session.SimpleSession;
> > >   -import org.apache.axis.encoding.*;
> > >   +import org.apache.axis.utils.QName;
> > >    import org.apache.log4j.Category;
> > >   -import org.apache.log4j.BasicConfigurator;
> > >   -import org.apache.log4j.Priority;
> > >
> > >   -import org.w3c.dom.*;
> > >   -
> > >    /**
> > >     * An <code>AxisEngine</code> is the base class for 
> AxisClient and
> > >     * AxisServer.  Handles common functionality like 
> dealing with the
> > >   @@ -84,11 +79,6 @@
> > >    {
> > >        static Category category =
> > >                Category.getInstance(AxisEngine.class.getName());
> > >   -
> > >   -    static {
> > >   -        BasicConfigurator.configure();
> > >   -        Category.getRoot().setPriority(Priority.FATAL);
> > >   -    }
> > >
> > >        // Engine property names
> > >        public static final String PROP_XML_DECL = 
> "sendXMLDeclaration";
> > >
> > >
> > >
> > >   1.20      +27 -14
> > > 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/HTTPSen
> > > der.java,v
> > >   retrieving revision 1.19
> > >   retrieving revision 1.20
> > >   diff -u -r1.19 -r1.20
> > >   --- HTTPSender.java	2001/09/14 19:12:23	1.19
> > >   +++ HTTPSender.java	2001/10/02 15:01:31	1.20
> > >   @@ -96,6 +96,7 @@
> > >                URL      tmpURL = new URL( targetURL );
> > >                byte[]   buf    = new byte[4097];
> > >                int      returnCode     = 0 ;
> > >   +            boolean  useFullURL = false;
> > >
> > >                // default SOAPAction to request 
> namespaceURI/method
> > >                String   action =
> > > msgContext.getStrProp(HTTPConstants.MC_HTTP_SOAPACTION);
> > >   @@ -112,11 +113,11 @@
> > >                if ( (port = tmpURL.getPort()) == -1 ) port = 80;
> > >
> > >                Socket             sock = null ;
> > >   +            String proxyHost = 
> System.getProperty("https.proxyHost");
> > >   +            String proxyPort = 
> System.getProperty("https.proxyPort");
> > >
> > >                if 
> (tmpURL.getProtocol().equalsIgnoreCase("https")) {
> > >                    if ( (port = tmpURL.getPort()) == -1 ) 
> port = 443;
> > >   -                String tunnelHost =
> > > System.getProperty("https.proxyHost");
> > >   -                String tunnelPortString =
> > > System.getProperty("https.proxyPort");
> > >                    String tunnelUsername =
> > > System.getProperty("https.proxyUsername");
> > >                    String tunnelPassword =
> > > System.getProperty("https.proxyPassword");
> > >                    try {
> > >   @@ -132,7 +133,7 @@
> > >
> > > SSLSocketClass.getMethod("startHandshake", new Class[] {});
> > >                        Object factory =
> > > getDefaultMethod.invoke(null, new Object[] {});
> > >                        Object sslSocket = null;
> > >   -                    if (tunnelHost == null || 
> tunnelHost.equals("")) {
> > >   +                    if (proxyHost == null || 
> proxyHost.equals("")) {
> > >                            // direct SSL connection
> > >                            sslSocket = createSocketMethod 
> .invoke(factory,
> > >
> > > new Object[] {host, new Integer(port)});
> > >   @@ -141,9 +142,9 @@
> > >                            Method createSocketMethod2 =
> > >
> > > SSLSocketFactoryClass.getMethod("createSocket",
> > >
> > >                      new Class[] {Socket.class, String.class,
> > > Integer.TYPE, Boolean.TYPE});
> > >   -                        int tunnelPort = (tunnelPortString !=
> > > null? (Integer.parseInt(tunnelPortString) < 0? 443:
> > > Integer.parseInt(tunnelPortString)): 443);
> > >   +                        int tunnelPort = (proxyPort != null?
> > > (Integer.parseInt(proxyPort) < 0? 443: 
> Integer.parseInt(proxyPort)): 443);
> > 
> === message truncated ===
> 
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
>