axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r154629 - in webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport: AbstractTransportSender.java http/HTTPTransportSender.java
Date Mon, 21 Feb 2005 05:16:35 GMT
Author: hemapani
Date: Sun Feb 20 21:16:32 2005
New Revision: 154629

URL: http://svn.apache.org/viewcvs?view=rev&rev=154629
Log:
fix the trsport interop prob

Modified:
    webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/AbstractTransportSender.java
    webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java

Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/AbstractTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/AbstractTransportSender.java?view=diff&r1=154628&r2=154629
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/AbstractTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/AbstractTransportSender.java
Sun Feb 20 21:16:32 2005
@@ -46,11 +46,6 @@
                     "TransportSender");
 
     /**
-     * Field outS
-     */
-    protected OutputStream outS;
-
-    /**
      * Constructor AbstractTransportSender
      */
     public AbstractTransportSender() {
@@ -101,12 +96,8 @@
                 XMLOutputFactory.newInstance().createXMLStreamWriter(out);
                 envelope.serialize(outputWriter, false);
                 outputWriter.flush();
-                if (outS != null) {
-                    outS.flush();
-                } else {
                     out.flush();
-                }
-            } catch (Exception e) {
+              } catch (Exception e) {
                 throw new AxisFault("Stream error", e);
             }
         }

Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java?view=diff&r1=154628&r2=154629
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/transport/http/HTTPTransportSender.java
Sun Feb 20 21:16:32 2005
@@ -24,6 +24,7 @@
 import java.io.BufferedWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.net.InetSocketAddress;
@@ -64,7 +65,7 @@
                             url.getPort());
                     socket = new Socket();
                     socket.connect(add);
-                    outS = socket.getOutputStream();
+                    OutputStream outS = socket.getOutputStream();
                     out = new BufferedWriter(new OutputStreamWriter(outS));
                     writeTransportHeaders(out, url);
                     msgContext.setProperty(
@@ -115,6 +116,11 @@
      */
     protected void finalizeSending(MessageContext msgContext)
             throws AxisFault {
+        try {
+            socket.shutdownOutput();
+        } catch (IOException e) {
+            throw new AxisFault(e.getMessage(),e);
+        }
     }
 
     /**



Mime
View raw message