axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/attachments MimeUtils.java
Date Wed, 17 Jul 2002 21:30:47 GMT
Rick,

At this point, it's just a proof of the concept that we can plugin other HTTP Client libraries
easily. Am not sure how everyone will react to getting rid of our custom HTTP support and
pouring
our energy into Jakarta commons's HttpClient library. I guess it's too late now and we should
rather concentrate on getting 1.0 out the door. The background for this was Geza's work on
adding
support for the Digest mechanism. In our HttpSender we blindly force the Basic credentials
on the
wire. Digest Mechanism needs info from the server that we need to encode the userid/password.
So
this conversation lead to a small research on how we could reuse the socket with KeepAlive.
That
lead to an investigation of Innovation's HTTPClient library
(http://www.innovation.ch/java/HTTPClient/) and Jakarta commons's HttpClient library. The
outcome
of the research is the code that i have already checked in. 

Long term, i think we need to work with Jakarta commons's HttpClient team. Am not planning
any
other changes to our existing code at this time. (I might work on just the CommonsHttpSender.java
a bit more)

Thanks,
dims

--- Rick Rineholt <rineholt@us.ibm.com> wrote:
> Dims,
> I was going to do some work on HTTPSender, but it appears you might have
> some
> other plans by the look of  these updates.  Can you please give some more
> details
>  where you are going with these changes?
> 
> Thanks!
> 
> 
> Rick Rineholt
> "The truth is out there...  All you need is a better search engine!"
> 
> rineholt@us.ibm.com
> 
> 
> 
> dims@apache.org on 07/17/2002 04:28:07 PM
> 
> Please respond to axis-dev@xml.apache.org
> 
> To:    xml-axis-cvs@apache.org
> cc:
> Subject:    cvs commit: xml-axis/java/src/org/apache/axis/attachments
>        MimeUtils.java
> 
> 
> 
> dims        2002/07/17 13:28:07
> 
>   Modified:    java     build.xml
>                java/src/org/apache/axis/attachments MimeUtils.java
>   Added:       java/src/org/apache/axis/transport/http
>                         CommonsHTTPSender.java
>   Log:
>   - Checking in a HTTPSender based on Jakarta commons's HttpClient (one
>   reason is that our HTTPSender is becoming complicated to maintain).
>   - I will roll back the patch to MimeUtils as soon as i get a patch
>   accepted by the HttpClient folks.
> 
>   Revision  Changes    Path
>   1.161     +6 -0      xml-axis/java/build.xml
> 
>   Index: build.xml
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/build.xml,v
>   retrieving revision 1.160
>   retrieving revision 1.161
>   diff -u -r1.160 -r1.161
>   --- build.xml   11 Jul 2002 05:26:14 -0000    1.160
>   +++ build.xml   17 Jul 2002 20:28:07 -0000    1.161
>   @@ -163,6 +163,10 @@
>          classname="org.apache.commons.logging.Log"
>          classpathref="classpath"/>
> 
>   +    <available property="commons-httpclient.present"
>   +      classname="org.apache.commons.httpclient.HttpConnection"
>   +      classpathref="classpath"/>
>   +
>        <available property="log4j.present"
>          classname="org.apache.log4j.Category"
>          classpathref="classpath"/>
>   @@ -241,6 +245,7 @@
>        <echo message="attachments.present=${attachments.present}" />
>        <echo message="security.present=${security.present}" />
>        <echo message="jsse.present=${jsse.present}" />
>   +    <echo message="commons-httpclient.present
>        =${commons-httpclient.present}" />
>        <echo message=""/>
>        <echo message="--- Property values ---" />
>        <echo message="debug=${debug}" />
>   @@ -296,6 +301,7 @@
>          <exclude name="
>          **/org/apache/axis/transport/http/AdminServlet.java" unless
>          ="servlet.present"/>
>          <exclude name="
>          **/org/apache/axis/transport/http/AxisHttpSession.java" unless
>          ="servlet.present"/>
>          <exclude name="**/org/apache/axis/transport/http/AxisServlet.java"
>          unless="servlet.present"/>
>   +      <exclude name="
>          **/org/apache/axis/transport/http/CommonsHTTPSender.java" unless
>          ="commons-httpclient.present"/>
>          <exclude name="
>          **/org/apache/axis/server/JNDIAxisServerFactory.java" unless
>          ="servlet.present"/>
>          <exclude name="**/org/apache/axis/security/servlet/*" unless
>          ="servlet.present"/>
>          <exclude name="**/org/apache/axis/components/bytecode/BCEL*"
>          unless="bcel.present"/>
> 
> 
> 
>   1.1
>   xml-axis/java/src/org/apache/axis/transport/http/CommonsHTTPSender.java
> 
>   Index: CommonsHTTPSender.java
>   ===================================================================
>   /*
>    * The Apache Software License, Version 1.1
>    *
>    *
>    * Copyright (c) 2001 The Apache Software Foundation.  All rights
>    * reserved.
>    *
>    * Redistribution and use in source and binary forms, with or without
>    * modification, are permitted provided that the following conditions
>    * are met:
>    *
>    * 1. Redistributions of source code must retain the above copyright
>    *    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
>    *    the documentation and/or other materials provided with the
>    *    distribution.
>    *
>    * 3. The end-user documentation included with the redistribution,
>    *    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,
>    *    if and wherever such third-party acknowledgments normally appear.
>    *
>    * 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
>    *    permission, please contact apache@apache.org.
>    *
>    * 5. Products derived from this software may not be called "Apache",
>    *    nor may "Apache" appear in their name, without prior written
>    *    permission of the Apache Software Foundation.
>    *
>    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
>    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>    * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
>    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
>    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
>    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
>    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>    * SUCH DAMAGE.
>    * ====================================================================
>    *
>    * This software consists of voluntary contributions made by many
>    * individuals on behalf of the Apache Software Foundation.  For more
>    * information on the Apache Software Foundation, please see
>    * <http://www.apache.org/>.
>    */
>   package org.apache.axis.transport.http;
> 
>   import org.apache.axis.AxisFault;
>   import org.apache.axis.Message;
>   import org.apache.axis.MessageContext;
>   import org.apache.axis.components.logger.LogFactory;
>   import org.apache.axis.components.net.BooleanHolder;
>   import org.apache.axis.encoding.Base64;
>   import org.apache.axis.handlers.BasicHandler;
>   import org.apache.axis.utils.JavaUtils;
>   import org.apache.commons.httpclient.Credentials;
>   import org.apache.commons.httpclient.Header;
>   import org.apache.commons.httpclient.HttpConnection;
>   import org.apache.commons.httpclient.HttpState;
>   import org.apache.commons.httpclient.UsernamePasswordCredentials;
>   import org.apache.commons.httpclient.methods.PostMethod;
>   import org.apache.commons.logging.Log;
> 
>   import java.io.ByteArrayOutputStream;
>   import java.net.URL;
>   import java.util.Hashtable;
>   import java.util.StringTokenizer;
> 
>   /**
>    * This class uses Jakarta Commons's HttpClient to call a SOAP server.
>    *
>    * @author Davanum Srinivas (dims@yahoo.com)
>    */
>   public class CommonsHTTPSender extends BasicHandler {
> 
>       /** Field log           */
>       protected static Log log =
>               LogFactory.getLog(CommonsHTTPSender.class.getName());
> 
>       /**
>        * invoke creates a socket connection, sends the request SOAP message
>        and then
>        * reads the response SOAP message back from the SOAP server
>        *
>        * @param msgContext the messsage context
>        *
>        * @throws AxisFault
>        */
>       public void invoke(MessageContext msgContext) throws AxisFault {
> 
>           if (log.isDebugEnabled()) {
>               log.debug(JavaUtils.getMessage("enter00",
>                       "CommonsHTTPSender::invoke"));
>           }
> 
=== message truncated ===


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

Mime
View raw message