axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r109657 - in webservices/axis/trunk/java/dev/scratch/prototype2: . src/java/org/apache/axis/engine src/java/org/apache/axis/impl/transport/http src/test/org/apache/axis/engine
Date Fri, 03 Dec 2004 09:15:58 GMT
Author: hemapani
Date: Fri Dec  3 01:15:55 2004
New Revision: 109657

URL: http://svn.apache.org/viewcvs?view=rev&rev=109657
Log:
add liblio repository back
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/project.properties
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/project.properties
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/project.properties?view=diff&rev=109657&p1=webservices/axis/trunk/java/dev/scratch/prototype2/project.properties&r1=109656&p2=webservices/axis/trunk/java/dev/scratch/prototype2/project.properties&r2=109657
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/project.properties	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/project.properties	Fri Dec  3 01:15:55
2004
@@ -2,7 +2,7 @@
 ## $Revision: 1.3 $ $Date: 2004/07/28 15:21:22 $
 ##
 
-maven.repo.remote=http://www.apache.org/dist/java-repository,http://dist.codehaus.org
+maven.repo.remote=http://www.apache.org/dist/java-repository,http://dist.codehaus.org,http://www.ibiblio.org/maven
 maven.xdoc.date=left
 maven.xdoc.version=${pom.currentVersion}
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java?view=diff&rev=109657&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java&r1=109656&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java&r2=109657
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/TransportSenderLocator.java
Fri Dec  3 01:15:55 2004
@@ -16,6 +16,8 @@
 
 package org.apache.axis.engine;
 
+import java.io.OutputStream;
+
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.impl.transport.http.TCPTrasnportSender;
 
@@ -26,12 +28,17 @@
 public class TransportSenderLocator {
     public static final String TRANSPORT_TCP = "TRANSPORT_TCP";
     
-    public static TransportSender locateTransPortSender(MessageContext msgContext){
+    public static TransportSender locateTransPortSender(MessageContext msgContext) throws
AxisFault{
         String type= (String)msgContext.getProperty(MessageContext.TRANSPORT_TYPE);
+        OutputStream out = (OutputStream)msgContext.getProperty(MessageContext.TRANSPORT_DATA);
                                
         if( TransportSenderLocator.TRANSPORT_TCP.equals(type)){
-            return new TCPTrasnportSender();
+            if(out != null){
+                return new TCPTrasnportSender(out);
+            }else{
+                throw new AxisFault("if TCP trsport used there should be a propoerty named
"+MessageContext.TRANSPORT_DATA);
+            }
         }
-        return null;
+        throw new AxisFault("No tranport found");
     }
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java?view=diff&rev=109657&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java&r1=109656&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java&r2=109657
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/TCPTrasnportSender.java
Fri Dec  3 01:15:55 2004
@@ -20,6 +20,7 @@
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.TransportSender;
 import org.apache.axis.impl.handlers.AbstractHandler;
+import org.apache.axis.impl.llom.serialize.SimpleOMSerializer;
 import org.apache.axis.om.OMEnvelope;
 
 import java.io.OutputStream;
@@ -28,11 +29,17 @@
  * @author Srinath Perera(hemapani@opensource.lk)
  */
 public class TCPTrasnportSender extends AbstractHandler implements TransportSender{
-
+    protected OutputStream out;
+    
+    public TCPTrasnportSender(OutputStream out){
+        this.out = out;
+    }
+    
     public void invoke(MessageContext msgContext) throws AxisFault {
         OutputStream out = (OutputStream)msgContext.getProperty(MessageContext.TRANSPORT_DATA);
         OMEnvelope envelope = msgContext.getEnvelope();
-        //TODO write OM  
+        SimpleOMSerializer serializer = new SimpleOMSerializer();
+        serializer.serialize(envelope,this.out);
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java?view=diff&rev=109657&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r1=109656&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r2=109657
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
Fri Dec  3 01:15:55 2004
@@ -81,7 +81,7 @@
     	Reader rReader = new InputStreamReader(respose);
     	char[] charBuf = new char[1024];
     	while((index = rReader.read(charBuf)) > 0){
-
+    	        System.out.println(new String(charBuf));
     	}
     	
     	in.close();

Mime
View raw message