axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ven...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/transport/http HTTPSender.java
Date Thu, 02 Jun 2005 06:47:04 GMT
venkat      2005/06/01 23:47:04

  Modified:    java/src/org/apache/axis/transport/http HTTPSender.java
  Log:
  Patch from Jaya for AXIS-2008.
  
  Revision  Changes    Path
  1.128     +13 -2     ws-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
  
  Index: HTTPSender.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- HTTPSender.java	31 May 2005 19:46:13 -0000	1.127
  +++ HTTPSender.java	2 Jun 2005 06:47:03 -0000	1.128
  @@ -124,14 +124,15 @@
           if (log.isDebugEnabled()) {
               log.debug(Messages.getMessage("enter00", "HTTPSender::invoke"));
           }
  +
  +        SocketHolder socketHolder = new SocketHolder(null);
  +
           try {
               BooleanHolder useFullURL = new BooleanHolder(false);
               StringBuffer otherHeaders = new StringBuffer();
               targetURL = new URL(msgContext.getStrProp(MessageContext.TRANS_URL));
               String host = targetURL.getHost();
               int port = targetURL.getPort();
  -
  -            SocketHolder socketHolder = new SocketHolder(null);
               
               // Send the SOAP request to the server
               InputStream inp = writeToSocket(socketHolder, msgContext, targetURL,
  @@ -143,6 +144,16 @@
               readFromSocket(socketHolder, msgContext, inp, headers);
           } catch (Exception e) {
               log.debug(e);
  +            //fix for AXIS-2008
  +            try {
  +	            if (socketHolder.getSocket() != null && !socketHolder.getSocket().isClosed())
{
  +	            	socketHolder.getSocket().close();
  +	            }
  +            } catch (IOException ie) {
  +            	// we have already made a check if socket exists and is not already closed,
so
  +            	// we would never end up here. But for compilation purposes had to add this
  +            	// internal try catch block.
  +            }
               throw AxisFault.makeFault(e);
           }
           if (log.isDebugEnabled()) {
  
  
  

Mime
View raw message