You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2004/12/23 08:15:37 UTC

svn commit: r123172 - in webservices/axis/trunk/java/dev/scratch/prototype2: . src/java/org/apache/axis/client src/java/org/apache/axis/clientapi src/java/org/apache/axis/context src/java/org/apache/axis/engine src/java/org/apache/axis/impl/providers src/java/org/apache/axis/impl/transport/http src/java/org/apache/axis/impl/transport/tcp src/test/org/apache/axis/clientapi src/test/org/apache/axis/engine

Author: hemapani
Date: Wed Dec 22 23:15:36 2004
New Revision: 123172

URL: http://svn.apache.org/viewcvs?view=rev&rev=123172
Log:
remove the request URL and use To EPR
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/project.xml
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/project.xml
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/project.xml?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/project.xml&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/project.xml&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/project.xml	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/project.xml	Wed Dec 22 23:15:36 2004
@@ -155,6 +155,15 @@
       </resources>
 
     </unitTest>
+	
+	<sourceModifications>
+        <sourceModification>
+          <className>javax.servlet.http.HttpServlet</className>
+          <excludes>
+              <exclude>org/apache/axis/impl/transport/http/AxisServlet.java</exclude>
+          </excludes>
+     	</sourceModification>
+     </sourceModifications>
 
     <resources>
       <resource>

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/client/Call.java	Wed Dec 22 23:15:36 2004
@@ -15,6 +15,8 @@
  */
 package org.apache.axis.client;
 
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisGlobal;
 import org.apache.axis.engine.AxisEngine;
@@ -71,7 +73,7 @@
             OutputStream out = urlConnect.getOutputStream();
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(new EndpointReferenceType(AddressingConstants.WSA_TO,url.toString()));
             engine.send(msgctx);
 
             MessageContext response = createIncomingMessageContext(urlConnect.getInputStream(), engine);
@@ -129,7 +131,7 @@
             OutputStream out = urlConnect.getOutputStream();
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(new EndpointReferenceType(AddressingConstants.WSA_TO,url.toString()));
 
             engine.send(msgctx);
 
@@ -181,7 +183,7 @@
             OutputStream out = urlConnect.getOutputStream();
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(new EndpointReferenceType(AddressingConstants.WSA_TO,url.toString()));
 
             engine.send(msgctx);
             //TODO

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Call.java	Wed Dec 22 23:15:36 2004
@@ -94,7 +94,8 @@
             OutputStream out = urlConnect.getOutputStream();
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(targetEPR);
+
 
             engine.send(msgctx);
 
@@ -117,7 +118,7 @@
             OutputStream out = urlConnect.getOutputStream();
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(targetEPR);
             engine.send(msgctx);
 
             //todo dose the 202 response  come throgh the same connection
@@ -146,7 +147,7 @@
             
             msgctx.setProperty(MessageContext.TRANSPORT_DATA, out);
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(targetEPR);
             engine.send(msgctx);
 
             MessageContext response = createIncomingMessageContext(urlConnect.getInputStream(), engine);
@@ -176,7 +177,7 @@
             msgctx.setEnvelope(envelope);
 
             msgctx.setProperty(MessageContext.TRANSPORT_TYPE, TransportSenderLocator.TRANSPORT_HTTP);
-            msgctx.setProperty(MessageContext.REQUEST_URL, url);
+            msgctx.setTo(targetEPR);
           
            
            // only the transport blocked , client dose not hang

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/clientapi/Invoker.java	Wed Dec 22 23:15:36 2004
@@ -37,7 +37,7 @@
         final Correlator correlator = Correlator.getInstance();
         final String messageID = Long.toString(System.currentTimeMillis());
         try {
-            final URL url = (URL) reqMsgContext.getProperty(MessageContext.REQUEST_URL);
+            final URL url = new URL(reqMsgContext.getTo().getAddress());
             final URLConnection urlConnect = url.openConnection();
             urlConnect.setDoOutput(true);
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java	Wed Dec 22 23:15:36 2004
@@ -42,7 +42,7 @@
     public static final String TRANSPORT_TYPE = "TRANSPORT_TYPE";
     public static final String SOAP_ACTION = "SOAP_ACTION";
     public static final String TRANSPORT_DATA = "TRANSPORT_DATA";
-    public static final String REQUEST_URL = "REQUEST_URL";
+    //public static final String REQUEST_URL = "REQUEST_URL";
 
     private boolean processingFault = false;
     private EndpointReferenceType to;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/Dispatcher.java	Wed Dec 22 23:15:36 2004
@@ -16,6 +16,7 @@
 
 package org.apache.axis.engine;
 
+import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.impl.description.AxisService;
 import org.apache.axis.impl.handlers.AbstractHandler;
@@ -29,7 +30,8 @@
     public void invoke(MessageContext msgctx) throws AxisFault{
         if(msgctx.isServerSide()){
             String uri = null;
-            String filePart = (String) msgctx.getProperty(MessageContext.REQUEST_URL);
+            EndpointReferenceType toEPR = msgctx.getTo();
+            String filePart = toEPR.getAddress();
             String soapAction = (String) msgctx.getProperty(MessageContext.SOAP_ACTION);
 
             if (filePart.startsWith("axis/services/")) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/RawXMLProvider.java	Wed Dec 22 23:15:36 2004
@@ -23,7 +23,6 @@
 
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.SessionContext;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.Constants;
 import org.apache.axis.engine.Provider;
@@ -57,14 +56,7 @@
         try {
             AxisService service = msgContext.getService();
             classLoader = service.getClassLoader();
-            Parameter classParm = service.getParameter("className");
-            String className = (String) classParm.getValue();
-            if (className == null)
-                throw new AxisFault("className parameter is null");
-            if (classLoader == null) {
-                classLoader = Thread.currentThread().getContextClassLoader();
-            }
-            Class implClass = Class.forName(className, true, classLoader);
+            Class implClass = service.getServiceClass(); 
             return implClass.newInstance();
         } catch (Exception e) {
             throw AxisFault.makeFault(e);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/providers/SimpleJavaProvider.java	Wed Dec 22 23:15:36 2004
@@ -16,10 +16,16 @@
 
 package org.apache.axis.impl.providers;
 
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.SessionContext;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.encoding.SimpleTypeEncodingUtils;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.Constants;
@@ -32,12 +38,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Iterator;
-
 
 /**
  * This is a Simple java Provider.
@@ -59,15 +59,7 @@
             throws AxisFault {
         try {
             AxisService service = msgContext.getService();
-            classLoader = service.getClassLoader();
-            Parameter classParm = service.getParameter("className");
-            String className = (String) classParm.getValue();
-            if (className == null)
-                throw new AxisFault("className parameter is null");
-            if (classLoader == null) {
-                classLoader = Thread.currentThread().getContextClassLoader();
-            }
-            Class implClass = Class.forName(className, true, classLoader);
+            Class implClass = service.getServiceClass(); 
             return implClass.newInstance();
         } catch (Exception e) {
             throw AxisFault.makeFault(e);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPConstants.java	Wed Dec 22 23:15:36 2004
@@ -121,4 +121,15 @@
     public static final String PLUGIN_WRITER = "transport.http.plugin.writer";
     public static final String PLUGIN_LOG = "transport.http.plugin.log";
     public static final String PLUGIN_EXCEPTION_LOG = "transport.http.plugin.exceptionLog";
+    
+    
+    public static final byte OK[] = ("200 OK").getBytes();
+    public static final byte NOCONTENT[] = ("202 OK\n\n").getBytes();
+    public static final byte UNAUTH[] = ("401 Unauthorized").getBytes();
+    public static final byte SENDER[] = "400".getBytes();
+    public static final byte ISE[] = ("500 Internal server error").getBytes();
+    // HTTP prefix
+    public static byte HTTP[] = "HTTP/1.0 ".getBytes();
+
+
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/HTTPTrasnportSender.java	Wed Dec 22 23:15:36 2004
@@ -16,13 +16,12 @@
 
 package org.apache.axis.impl.transport.http;
 
+import java.io.OutputStream;
+
+import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.transport.AbstractTrasnportSender;
-import org.apache.axis.addressing.EndpointReferenceType;
-
-import java.io.OutputStream;
-import java.net.URL;
 
 public class HTTPTrasnportSender extends AbstractTrasnportSender {
     protected OutputStream out;
@@ -41,8 +40,9 @@
 
     }
 
-    protected OutputStream obtainOutPutStream(MessageContext msgContext, EndpointReferenceType epr) {
-       throw new UnsupportedOperationException("Addressing not suppotrted yet");
+    protected OutputStream obtainOutPutStream(MessageContext msgContext, EndpointReferenceType epr) throws AxisFault {
+        //TODO this is temporay work around
+        return obtainOutPutStream(msgContext);
     }
 
     protected void finalizeSending() {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/SimpleHTTPReceiver.java	Wed Dec 22 23:15:36 2004
@@ -16,6 +16,17 @@
 
 package org.apache.axis.impl.transport.http;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.deployment.DeploymentEngine;
 import org.apache.axis.deployment.DeploymentException;
@@ -32,14 +43,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-
 
 public class SimpleHTTPReceiver extends AbstractTransportReceiver implements Runnable {
     protected static Log log =
@@ -52,15 +55,6 @@
     // private Socket socket;
     
 
-    // HTTP status codes
-    protected static byte OK[] = ("200 OK").getBytes();
-    protected static byte NOCONTENT[] = ("202 OK\n\n").getBytes();
-    protected static byte UNAUTH[] = ("401 Unauthorized").getBytes();
-    protected static byte SENDER[] = "400".getBytes();
-    protected static byte ISE[] = ("500 Internal server error").getBytes();
-
-    // HTTP prefix
-    protected static byte HTTP[] = "HTTP/1.0 ".getBytes();
 
     // Standard MIME headers for XML payload
     protected static byte XML_MIME_STUFF[] =
@@ -423,7 +417,7 @@
 
         try {
             // assume the best
-            byte[] status = OK;
+            byte[] status = HTTPConstants.OK;
 
             // assume we're not getting WSDL
             boolean doWsdl = false;
@@ -461,7 +455,8 @@
 
 
             String filePart = fileName.toString();
-            msgContext.setProperty(MessageContext.REQUEST_URL, filePart);
+            msgContext.setTo(new EndpointReferenceType(AddressingConstants.WSA_TO,filePart));
+
             if (httpRequest.toString().equals("GET")) {
                 throw new UnsupportedOperationException("GET not supported");
             } else {
@@ -497,8 +492,8 @@
                                    OutputStream out) throws AxisFault {
         try {
             // Send it on its way...
-            out.write(HTTP);
-            out.write(OK);
+            out.write(HTTPConstants.HTTP);
+            out.write(HTTPConstants.OK);
             out.write("\n\n".getBytes());
             log.info("status written");
             //We do not have any Addressing Headers to put

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/tcp/TCPTrasnportSender.java	Wed Dec 22 23:15:36 2004
@@ -40,8 +40,8 @@
 
     }
 
-    protected OutputStream obtainOutPutStream(MessageContext msgContext, EndpointReferenceType epr) {
-        throw new UnsupportedOperationException("Addressing not suppotrted yet");
+    protected OutputStream obtainOutPutStream(MessageContext msgContext, EndpointReferenceType epr) throws AxisFault {
+        return obtainOutPutStream(msgContext);
     }
 
     protected void finalizeSending() {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java	Wed Dec 22 23:15:36 2004
@@ -70,8 +70,7 @@
 
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className", Echo.class.getName());
-        service.addParameter(classParam);
+        service.setServiceClass(Echo.class);
         service.setProvider(new RawXMLProvider());
         AxisOperation operation = new SimpleAxisOperationImpl(operationName);
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java	Wed Dec 22 23:15:36 2004
@@ -20,12 +20,10 @@
 import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
-import org.apache.axis.engine.Echo;
+import org.apache.axis.encoding.EncodingTest.Echo;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.engine.EngineUtils;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axis.impl.llom.serialize.SimpleOMSerializer;
@@ -79,10 +77,7 @@
 
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className", Echo.class
-                .getName());
-        service.addParameter(classParam);
-        service.setProvider(new RawXMLProvider());
+        service.setServiceClass(Echo.class);        service.setProvider(new RawXMLProvider());
         AxisOperation operation = new SimpleAxisOperationImpl(operationName);
 
         service.addOperation(operation);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java	Wed Dec 22 23:15:36 2004
@@ -24,9 +24,7 @@
 import org.apache.axis.client.Call;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.RawXMLProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
@@ -59,8 +57,7 @@
         engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className",Echo.class.getName());
-        service.addParameter(classParam);
+        service.setServiceClass(Echo.class);
         service.setProvider(new RawXMLProvider());
         AxisOperation operation = new SimpleAxisOperationImpl(operationName);
         

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoRawXMLTest.java	Wed Dec 22 23:15:36 2004
@@ -25,9 +25,7 @@
 import org.apache.axis.client.CallBack;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.RawXMLProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
@@ -61,8 +59,7 @@
         
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className",Echo.class.getName());
-        service.addParameter(classParam);
+        service.setServiceClass(Echo.class);
         service.setProvider(new RawXMLProvider());
         AxisOperation operation = new SimpleAxisOperationImpl(operationName);
         

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=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EchoTest.java&r2=123172
==============================================================================
--- 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	Wed Dec 22 23:15:36 2004
@@ -22,9 +22,7 @@
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisGlobal;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.SimpleJavaProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
@@ -57,8 +55,7 @@
         
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className",Echo.class.getName());
-        service.addParameter(classParam);
+        service.setServiceClass(Echo.class);
         service.setProvider(new SimpleJavaProvider());
 
         AxisOperation operation1 = new SimpleAxisOperationImpl(operationName1);

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineTest.java	Wed Dec 22 23:15:36 2004
@@ -16,13 +16,17 @@
 
 package org.apache.axis.engine;
 
+import java.io.OutputStream;
+
+import javax.xml.namespace.QName;
+
 import junit.framework.TestCase;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReferenceType;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.impl.description.AxisService;
 
-import javax.xml.namespace.QName;
-import java.io.OutputStream;
-
 public class EngineTest extends TestCase{
     private QName serviceName = new QName("","EchoService");
     private QName operationName = new QName("","echoVoid");
@@ -41,7 +45,7 @@
         engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         mc = new MessageContext(engineRegistry);
         AxisService service = engineRegistry.getService(serviceName);
-        mc.setProperty(MessageContext.REQUEST_URL,"/axis/services/EchoService");
+        mc.setTo(new EndpointReferenceType(AddressingConstants.WSA_TO,"/axis/services/EchoService"));
         mc.setOperation(service.getOperation(operationName));
         
         OutputStream out = System.out;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/EngineUtils.java	Wed Dec 22 23:15:36 2004
@@ -28,9 +28,7 @@
 import org.apache.axis.description.Flow;
 import org.apache.axis.description.HandlerMetaData;
 import org.apache.axis.description.MockFlow;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.SimpleJavaProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
@@ -85,10 +83,8 @@
         service.setOutFlow(new MockFlow("service outflow",5));
         service.setFaultFlow(new MockFlow("service faultflow",1));
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
+        service.setServiceClass(EchoService.class);
         
-        Parameter classParam = new ParameterImpl("className",EchoService.class.getName());
-        service.addParameter(classParam);
-         
         service.setProvider(new SimpleJavaProvider());
         
         AxisModule m1 = new AxisModule(new QName("","A Mdoule 1"));

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/MessageWithServerTest.java	Wed Dec 22 23:15:36 2004
@@ -16,15 +16,21 @@
 package org.apache.axis.engine;
 
 //todo
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.net.Socket;
+
+import javax.xml.namespace.QName;
+
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-import java.io.*;
-import java.net.Socket;
 
 public class MessageWithServerTest extends AbstractTestCase{
     private Log log = LogFactory.getLog(getClass());

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java?view=diff&rev=123172&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java&r1=123171&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java&r2=123172
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/SimpleAxisServerTest.java	Wed Dec 22 23:15:36 2004
@@ -23,9 +23,7 @@
 import org.apache.axis.AbstractTestCase;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.impl.description.AxisService;
-import org.apache.axis.impl.description.ParameterImpl;
 import org.apache.axis.impl.description.SimpleAxisOperationImpl;
 import org.apache.axis.impl.providers.RawXMLProvider;
 import org.apache.axis.impl.transport.http.SimpleHTTPReceiver;
@@ -55,8 +53,7 @@
         engineRegistry = EngineUtils.createMockRegistry(serviceName,operationName,transportName);
         AxisService service = new AxisService(serviceName);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        Parameter classParam = new ParameterImpl("className",Echo.class.getName());
-        service.addParameter(classParam);
+        service.setServiceClass(Echo.class);
         service.setProvider(new RawXMLProvider());
         AxisOperation operation = new SimpleAxisOperationImpl(operationName);