axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r191428 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis: ./ clientapi/ context/ transport/http/ transport/tcp/
Date Mon, 20 Jun 2005 09:23:59 GMT
Author: hemapani
Date: Mon Jun 20 02:23:57 2005
New Revision: 191428

URL: http://svn.apache.org/viewcvs?rev=191428&view=rev
Log:
repalce readers with input streams

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/TwoChannelBasedSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java Mon Jun 20
02:23:57 2005
@@ -180,7 +180,7 @@
     public static final String RESPONSE_WRITTEN = "CONTENT_WRITTEN";
     
     public static final String TESTING_REPOSITORY = "target/test-resources/samples";
-   // public static final String TESTING_REPOSITORY = "modules/samples/target/test-resources/samples";
+    //public static final String TESTING_REPOSITORY = "modules/samples/target/test-resources/samples";
     
     
     public static interface REST_WITH_GET{

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOnlyMEPClient.java
Mon Jun 20 02:23:57 2005
@@ -71,8 +71,8 @@
                 msgctx.getTransportIn(),
                 msgctx.getTransportOut());
         response.setProperty(
-            MessageContext.TRANSPORT_READER,
-            msgctx.getProperty(MessageContext.TRANSPORT_READER));
+            MessageContext.TRANSPORT_IN,
+            msgctx.getProperty(MessageContext.TRANSPORT_IN));
         response.setServerSide(false);
         response.setOperationContext(msgctx.getOperationContext());
         response.setServiceContext(msgctx.getServiceContext());

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
Mon Jun 20 02:23:57 2005
@@ -18,6 +18,8 @@
 package org.apache.axis.clientapi;
 
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.Reader;
 
 import javax.xml.namespace.QName;
@@ -334,7 +336,10 @@
                 HTTPTransportReceiver receiver = new HTTPTransportReceiver();
                 resenvelope = receiver.checkForMessage(response, serviceContext.getEngineContext());
             } else if (Constants.TRANSPORT_TCP.equals(listenerTransport)) {
-                Reader in = (Reader) response.getProperty(MessageContext.TRANSPORT_READER);
+                InputStream inStream = (InputStream) response.getProperty(MessageContext.TRANSPORT_IN);
+                response.setProperty(MessageContext.TRANSPORT_IN,null);
+                Reader in = new InputStreamReader(inStream);
+
                 if (in != null) {
                     XMLStreamReader xmlreader =
                         XMLInputFactory.newInstance().createXMLStreamReader(in);
@@ -343,7 +348,7 @@
                 } else {
                     throw new AxisFault(
                         "Sync invocation expect a proeprty "
-                            + MessageContext.TRANSPORT_READER
+                            + MessageContext.TRANSPORT_IN
                             + " set ");
                 }
             }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/TwoChannelBasedSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/TwoChannelBasedSender.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/TwoChannelBasedSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/TwoChannelBasedSender.java
Mon Jun 20 02:23:57 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.axis.clientapi;
 
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.Reader;
 
 import javax.xml.stream.FactoryConfigurationError;
@@ -47,8 +49,8 @@
                 msgctx.getTransportIn(),
                 msgctx.getTransportOut());
         response.setProperty(
-            MessageContext.TRANSPORT_READER,
-            msgctx.getProperty(MessageContext.TRANSPORT_READER));
+            MessageContext.TRANSPORT_IN,
+            msgctx.getProperty(MessageContext.TRANSPORT_IN));
         response.setServerSide(false);
         response.setOperationContext(msgctx.getOperationContext());
         response.setServiceContext(msgctx.getServiceContext());
@@ -62,13 +64,15 @@
                         resenvelope =
                             receiver.checkForMessage(response,msgctx.getSystemContext());
                     } else if (Constants.TRANSPORT_TCP.equals(transportIn.getName().getLocalPart()))
{
-                        Reader in = (Reader) response.getProperty(MessageContext.TRANSPORT_READER);
+                        InputStream inStream = (InputStream) response.getProperty(MessageContext.TRANSPORT_IN);
+                        response.setProperty(MessageContext.TRANSPORT_IN,null);
+                        Reader in = new InputStreamReader(inStream);
                         if(in != null){
                             XMLStreamReader xmlreader = XMLInputFactory.newInstance().createXMLStreamReader(in);
                             StAXBuilder builder = new StAXSOAPModelBuilder(xmlreader);
                             resenvelope = (SOAPEnvelope) builder.getDocumentElement();
                         }else{
-                            throw new AxisFault("Sync invocation expect a proeprty "+ MessageContext.TRANSPORT_READER
+ " set ");
+                            throw new AxisFault("Sync invocation expect a proeprty "+ MessageContext.TRANSPORT_IN
+ " set ");
                         }
                     }
                 } catch (XMLStreamException e) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
Mon Jun 20 02:23:57 2005
@@ -44,7 +44,7 @@
     /**
      * Field TRANSPORT_READER
      */
-    public static final String TRANSPORT_READER = "TRANSPORT_READER";
+    public static final String TRANSPORT_IN = "TRANSPORT_IN";
 
     /**
      * Field TRANSPORT_SUCCEED

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportReceiver.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportReceiver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportReceiver.java
Mon Jun 20 02:23:57 2005
@@ -16,6 +16,8 @@
 package org.apache.axis.transport.http;
 
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.Reader;
 import java.util.Collection;
@@ -105,7 +107,10 @@
         throws AxisFault {
         SOAPEnvelope soapEnvelope = null;
 
-        Reader in = (Reader) msgContext.getProperty(MessageContext.TRANSPORT_READER);
+        InputStream inStream = (InputStream) msgContext.getProperty(MessageContext.TRANSPORT_IN);
+        msgContext.setProperty(MessageContext.TRANSPORT_IN,null);
+        Reader in = new InputStreamReader(inStream);
+
         if (in != null) {
             boolean serverSide = msgContext.isServerSide();
             Map map = parseTheHeaders(in, serverSide);
@@ -171,8 +176,11 @@
     public SOAPEnvelope checkForMessage(MessageContext msgContext, ConfigurationContext engineContext,
Map parsedHeaders) throws AxisFault {
     	
         SOAPEnvelope soapEnvelope = null;
-
-        Reader in = (Reader) msgContext.getProperty(MessageContext.TRANSPORT_READER);
+        InputStream inStream = (InputStream) msgContext.getProperty(MessageContext.TRANSPORT_IN);
+        msgContext.setProperty(MessageContext.TRANSPORT_IN,null);
+        Reader in = new InputStreamReader(inStream);
+        
+        
         if (in != null) {
             if (HTTPConstants.RESPONSE_ACK_CODE_VAL.equals(parsedHeaders.get(HTTPConstants.RESPONSE_CODE)))
{
                 msgContext.setProperty(

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
Mon Jun 20 02:23:57 2005
@@ -88,8 +88,7 @@
                 outS.flush();
 
                 msgContext.setProperty(
-                    MessageContext.TRANSPORT_READER,
-                    new InputStreamReader(socket.getInputStream()));
+                    MessageContext.TRANSPORT_IN,socket.getInputStream());
                 msgContext.setProperty(HTTPConstants.SOCKET, socket);
 
                 socket.shutdownOutput();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
Mon Jun 20 02:23:57 2005
@@ -17,6 +17,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.Reader;
@@ -140,7 +141,11 @@
                         if (configurationContext == null) {
                             throw new AxisFault("Engine Must be null");
                         }
-                        Reader in = new InputStreamReader(socket.getInputStream());
+
+                        InputStream inStream = socket.getInputStream();
+
+                        
+
                         TransportOutDescription transportOut =
                             configurationContext.getAxisConfiguration().getTransportOut(
                                 new QName(Constants.TRANSPORT_HTTP));
@@ -156,7 +161,7 @@
                         // let us put the information about incoming transport
                         OutputStream out = socket.getOutputStream();
                         msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);
-                        msgContext.setProperty(MessageContext.TRANSPORT_READER, in);
+                        msgContext.setProperty(MessageContext.TRANSPORT_IN, inStream);
                         HTTPTransportReceiver reciver = new HTTPTransportReceiver();
 
                         /*

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
Mon Jun 20 02:23:57 2005
@@ -18,9 +18,7 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import java.io.Reader;
-import java.io.Writer;
 import java.net.ServerSocket;
 import java.net.Socket;
 
@@ -110,7 +108,6 @@
                 msgContext.setServerSide(true);
                 OutputStream out = socket.getOutputStream();
                 msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);
-                msgContext.setProperty(MessageContext.TRANSPORT_READER, in);
 
                 AxisEngine engine = new AxisEngine(configContext);
                 try {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java?rev=191428&r1=191427&r2=191428&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPTransportSender.java
Mon Jun 20 02:23:57 2005
@@ -63,8 +63,7 @@
         try {
             socket.shutdownOutput();
             msgContext.setProperty(
-                MessageContext.TRANSPORT_READER,
-                new InputStreamReader(socket.getInputStream()));
+                MessageContext.TRANSPORT_IN,socket.getInputStream());
         } catch (IOException e) {
             throw new AxisFault(e);
         }



Mime
View raw message