You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/08/02 05:22:08 UTC

svn commit: r226930 [1/2] - in /webservices/axis/trunk/java/modules: addressing/ addressing/test-resources/ common/src/org/apache/axis2/ core/src/org/apache/axis2/ core/src/org/apache/axis2/clientapi/ core/src/org/apache/axis2/context/ core/src/org/apa...

Author: hemapani
Date: Mon Aug  1 20:18:04 2005
New Revision: 226930

URL: http://svn.apache.org/viewcvs?rev=226930&view=rev
Log:
remove our own http transport and make the commons the  "http" transport, few tests failed, there are exlucded. see the http://issues.apache.org/jira/browse/AXIS2-115 for detail

Removed:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportSender.java
Modified:
    webservices/axis/trunk/java/modules/addressing/project.xml
    webservices/axis/trunk/java/modules/addressing/test-resources/axis2.xml
    webservices/axis/trunk/java/modules/common/src/org/apache/axis2/AxisFault.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/TransportUtils.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPOutputStream.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailSorter.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPTransportSender.java
    webservices/axis/trunk/java/modules/core/test-resources/deployment/BadConfigOrderChange/axis2.xml
    webservices/axis/trunk/java/modules/core/test-resources/deployment/ConfigWithObservers/axis2.xml
    webservices/axis/trunk/java/modules/core/test-resources/deployment/SystemPhaseRemove/axis2.xml
    webservices/axis/trunk/java/modules/core/test-resources/deployment/axis2.xml
    webservices/axis/trunk/java/modules/core/test-resources/deployment/server-transport.xml
    webservices/axis/trunk/java/modules/core/test-resources/deployment/server1.xml
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextEnabledEcho.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java
    webservices/axis/trunk/java/modules/samples/project.xml
    webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientUtil.java
    webservices/axis/trunk/java/modules/samples/src/sample/google/search/ClientUtil.java
    webservices/axis/trunk/java/modules/samples/src/sample/groovy/GroovyReceiver.java
    webservices/axis/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java
    webservices/axis/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java
    webservices/axis/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/CallUnregisteredServiceTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/EchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/FaultHandlingTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/HandlerFailureTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/MessageWithServerTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/OneWayRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/SOAPversionTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/ServiceDescriptionBuilderTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/ServiceDispatchingTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/SpeakingHandler.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/SpeakingHandler1.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/chuncking-enabled-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/commons-http-enabled-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/MTOM-enabled-axis2.xml
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/swa/EchoRawSwATest.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/OMOutputImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java

Modified: webservices/axis/trunk/java/modules/addressing/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/project.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/project.xml (original)
+++ webservices/axis/trunk/java/modules/addressing/project.xml Mon Aug  1 20:18:04 2005
@@ -91,6 +91,15 @@
                 <module>true</module>
             </properties>
         </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.0-rc2</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        
     </dependencies>
 
     <reports/>

Modified: webservices/axis/trunk/java/modules/addressing/test-resources/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test-resources/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test-resources/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/addressing/test-resources/axis2.xml Mon Aug  1 20:18:04 2005
@@ -6,8 +6,11 @@
 
     <transportReceiver name="http">
     </transportReceiver>
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
+
     <module ref="addressing"/>
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->

Modified: webservices/axis/trunk/java/modules/common/src/org/apache/axis2/AxisFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/common/src/org/apache/axis2/AxisFault.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/common/src/org/apache/axis2/AxisFault.java (original)
+++ webservices/axis/trunk/java/modules/common/src/org/apache/axis2/AxisFault.java Mon Aug  1 20:18:04 2005
@@ -29,8 +29,8 @@
  * <li>Fault details; an xml tree of fault specific stuff
  * </ol>
  */
-public class AxisFault extends RemoteException implements SOAPFaultException{
 
+public class AxisFault extends RemoteException implements SOAPFaultException{
     private String soapFaultCode;
 
     public AxisFault(Throwable arg1) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java Mon Aug  1 20:18:04 2005
@@ -79,7 +79,7 @@
      */
     public static final String TRANSPORT_HTTP = "http";
 
-    public static final String TRANSPORT_COMMONS_HTTP = "commons-http";
+   
 
     public static final String TRANSPORT_MAIL = "mail";
 
@@ -187,7 +187,7 @@
 
 
     public static final String TESTING_PATH = "target/test-resources/";
-//    public static final String TESTING_PATH = "modules/samples/target/test-resources/";
+    //public static final String TESTING_PATH = "modules/samples/target/test-resources/";
 
     public static final String TESTING_REPOSITORY = TESTING_PATH + "samples";
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java Mon Aug  1 20:18:04 2005
@@ -278,12 +278,8 @@
             boolean isATwoWaytransport =
                     Constants.TRANSPORT_HTTP.equals(senderTransport)
                     || Constants.TRANSPORT_TCP.equals(senderTransport)
-                    || Constants.TRANSPORT_COMMONS_HTTP.equals(senderTransport);
-            boolean isCommonsAndHTTP =
-                    Constants.TRANSPORT_COMMONS_HTTP.equals(senderTransport)
-                    && Constants.TRANSPORT_HTTP.equals(listenerTransport);
-            if (!isCommonsAndHTTP
-                    && (!isTransportsEqual || !isATwoWaytransport)) {
+                    || Constants.TRANSPORT_HTTP.equals(senderTransport);
+            if ((!isTransportsEqual || !isATwoWaytransport)) {
                 throw new AxisFault(Messages.getMessage("useSeparateListenerLimited"));
             }
         } else {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java Mon Aug  1 20:18:04 2005
@@ -43,7 +43,7 @@
     protected String soapVersionURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
     protected String soapAction = "";
     protected boolean doREST = false;
-    protected boolean doRestThroughPOST = false;
+    protected boolean doRestThroughPOST = true;
     protected String wsaAction;
 
     /*

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java Mon Aug  1 20:18:04 2005
@@ -25,6 +25,8 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
 import org.apache.axis2.AxisFault;
 
 import javax.xml.namespace.QName;
@@ -51,25 +53,26 @@
     /**
      * Field  CHARACTER_SET_ENCODING
      */
-    public static final String CHARACTER_SET_ENCODING = "CHARACTER_SET_ENCODING";
-    
+    public static final String CHARACTER_SET_ENCODING =
+        "CHARACTER_SET_ENCODING";
+
     /**
      * Field UTF_8
      * This is the 'utf-8' value for CHARACTER_SET_ENCODING property
      */
     public static final String UTF_8 = "utf-8";
-    
+
     /**
      * Field UTF_8
      * This is the 'utf-8' value for CHARACTER_SET_ENCODING property
      */
     public static final String UTF_16 = "utf-16";
-    
+
     /**
      * Field DEFAULT_CHAR_SET_ENCODING 
      * This is the default value for CHARACTER_SET_ENCODING property
      */
-    public static final String DEFAULT_CHAR_SET_ENCODING = UTF_8; 
+    public static final String DEFAULT_CHAR_SET_ENCODING = UTF_8;
 
     /**
      * Field TRANSPORT_SUCCEED
@@ -149,16 +152,14 @@
 
     private String soapAction;
 
-
     //Are we doing MTOM now?
     private boolean doingMTOM = false;
     //Are we doing REST now?
     private boolean doingREST = false;
     //Rest through GET of HTTP
-    private boolean doRESTthroughPOST = false;
-
-    private String soapNamespaceURI = "";
+    private boolean doRESTthroughPOST = true;
 
+    private boolean isSOAP11 = true;
 
     /**
      * Conveniance Method, but before call engine.send() or  engine.receive() one must send transport in/out
@@ -167,14 +168,16 @@
      * @throws AxisFault
      */
 
-    public MessageContext(ConfigurationContext engineContext) throws AxisFault {
+    public MessageContext(ConfigurationContext engineContext)
+        throws AxisFault {
         this(engineContext, null, null, null);
     }
 
-    public MessageContext(ConfigurationContext engineContext,
-                          TransportInDescription transportIn,
-                          TransportOutDescription transportOut)
-            throws AxisFault {
+    public MessageContext(
+        ConfigurationContext engineContext,
+        TransportInDescription transportIn,
+        TransportOutDescription transportOut)
+        throws AxisFault {
         this(engineContext, null, transportIn, transportOut);
     }
 
@@ -185,11 +188,12 @@
      * @throws AxisFault
      */
 
-    public MessageContext(ConfigurationContext engineContext,
-                          SessionContext sessionContext,
-                          TransportInDescription transportIn,
-                          TransportOutDescription transportOut)
-            throws AxisFault {
+    public MessageContext(
+        ConfigurationContext engineContext,
+        SessionContext sessionContext,
+        TransportInDescription transportIn,
+        TransportOutDescription transportOut)
+        throws AxisFault {
         super(null);
 
         if (sessionContext == null) {
@@ -312,9 +316,21 @@
     /**
      * @param envelope
      */
-    public void setEnvelope(SOAPEnvelope envelope) {
+    public void setEnvelope(SOAPEnvelope envelope) throws AxisFault {
         this.envelope = envelope;
-        soapNamespaceURI = envelope.getNamespace().getName();
+        String soapNamespaceURI = envelope.getNamespace().getName();
+        if (SOAP12Constants
+            .SOAP_ENVELOPE_NAMESPACE_URI
+            .equals(soapNamespaceURI)) {
+            isSOAP11 = false;
+        } else if (
+            SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(
+                soapNamespaceURI)) {
+            isSOAP11 = true;
+        } else {
+            throw new AxisFault("Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages");
+        }
+
     }
 
     /**
@@ -403,7 +419,6 @@
     public MessageInformationHeaders getMessageInformationHeaders() {
         return messageInformationHeaders;
     }
-    
 
     /**
      * @return
@@ -540,7 +555,9 @@
 
         //The context hirachy might not have constructed fully, the check should
         //look for the disconnected grandparents
-        if (obj == null && operationContext == null && serviceContext != null) {
+        if (obj == null
+            && operationContext == null
+            && serviceContext != null) {
             obj = serviceContext.getProperty(key, persistent);
         }
         if (obj == null && operationContext == null) {
@@ -557,7 +574,8 @@
             param = serviceDesc.getParameter(key);
         }
         if (param == null && configurationContext != null) {
-            AxisConfiguration baseConfig = configurationContext.getAxisConfiguration();
+            AxisConfiguration baseConfig =
+                configurationContext.getAxisConfiguration();
             param = baseConfig.getParameter(key);
         }
         if (param != null) {
@@ -637,13 +655,7 @@
         return doRESTthroughPOST;
     }
 
-
-    public String getSOAPVersion() {
-        return soapNamespaceURI;
-    }
-
-    public void setSoapNamespaceURI(String soapNamespaceURI) {
-        this.soapNamespaceURI = soapNamespaceURI;
+    public boolean isSOAP11() {
+        return isSOAP11;
     }
-
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml Mon Aug  1 20:18:04 2005
@@ -48,13 +48,13 @@
     <!-- Transport Outs -->
     <!-- ================================================= -->
 
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender"/>
     <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
     <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
-    <transportSender name="commons-http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
         <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
+
 
     <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
    <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Mon Aug  1 20:18:04 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.axis2.engine;
 
+import java.util.ArrayList;
+
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.SOAPFaultException;
 import org.apache.axis2.context.ConfigurationContext;
@@ -24,7 +26,11 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.soap.*;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultReason;
 import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
 import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;
 import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
@@ -32,8 +38,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.util.ArrayList;
-
 /**
  * There is one engine for the Server and the Client. the send() and receive()
  * Methods are the basic operations the Sync, Async messageing are build on top.
@@ -71,7 +75,7 @@
         //find and invoke the Phases        
         OperationContext operationContext = msgContext.getOperationContext();
         ArrayList phases =
-                operationContext.getAxisOperation().getPhasesOutFlow();
+            operationContext.getAxisOperation().getPhasesOutFlow();
         if (msgContext.isPaused()) {
             // the message has paused, so rerun them from the position they stoped. The Handler
             //who paused the Message will be the first one to run
@@ -105,7 +109,7 @@
         ConfigurationContext sysCtx = msgContext.getSystemContext();
         OperationDescription operationDescription = null;
         ArrayList preCalculatedPhases =
-                sysCtx
+            sysCtx
                 .getAxisConfiguration()
                 .getInPhasesUptoAndIncludingPostDispatch();
         ArrayList operationSpecificPhases = null;
@@ -118,19 +122,19 @@
             verifyContextBuilt(msgContext);
             //resume operation specific phases
             OperationContext operationContext =
-                    msgContext.getOperationContext();
+                msgContext.getOperationContext();
             operationDescription = operationContext.getAxisOperation();
             operationSpecificPhases =
-                    operationDescription.getRemainingPhasesInFlow();
+                operationDescription.getRemainingPhasesInFlow();
             resumeInvocationPhases(operationSpecificPhases, msgContext);
         } else {
             invokePhases(preCalculatedPhases, msgContext);
             verifyContextBuilt(msgContext);
             OperationContext operationContext =
-                    msgContext.getOperationContext();
+                msgContext.getOperationContext();
             operationDescription = operationContext.getAxisOperation();
             operationSpecificPhases =
-                    operationDescription.getRemainingPhasesInFlow();
+                operationDescription.getRemainingPhasesInFlow();
             invokePhases(operationSpecificPhases, msgContext);
         }
         
@@ -143,7 +147,7 @@
         if (msgContext.isServerSide() && !msgContext.isPaused()) {
             // invoke the Message Receivers
             MessageReceiver receiver =
-                    operationDescription.getMessageReciever();
+                operationDescription.getMessageReciever();
             receiver.recieve(msgContext);
         }
     }
@@ -190,7 +194,7 @@
             //Dual Channel response. So try to dispatch the Service 
             ConfigurationContext sysCtx = msgContext.getSystemContext();
             ArrayList phases =
-                    sysCtx
+                sysCtx
                     .getAxisConfiguration()
                     .getInPhasesUptoAndIncludingPostDispatch();
 
@@ -223,26 +227,29 @@
      * @param e
      * @throws AxisFault
      */
-    public MessageContext createFaultMessageContext(MessageContext processingContext,
-                                                    Throwable e)
-            throws AxisFault {
+    public MessageContext createFaultMessageContext(
+        MessageContext processingContext,
+        Throwable e)
+        throws AxisFault {
         if (processingContext.isProcessingFault()) {
             //We get the error file processing the fault. nothing we can do
-            throw new AxisFault(Messages.getMessage("errorwhileProcessingFault"));
+            throw new AxisFault(
+                Messages.getMessage("errorwhileProcessingFault"));
         }
 
         MessageContext faultContext =
-                new MessageContext(engineContext,
-                        processingContext.getSessionContext(),
-                        processingContext.getTransportIn(),
-                        processingContext.getTransportOut());
+            new MessageContext(
+                engineContext,
+                processingContext.getSessionContext(),
+                processingContext.getTransportIn(),
+                processingContext.getTransportOut());
 
         faultContext.setProcessingFault(true);
         if (processingContext.getFaultTo() != null) {
             faultContext.setFaultTo(processingContext.getFaultTo());
         } else {
             Object writer =
-                    processingContext.getProperty(MessageContext.TRANSPORT_OUT);
+                processingContext.getProperty(MessageContext.TRANSPORT_OUT);
             if (writer != null) {
                 faultContext.setProperty(MessageContext.TRANSPORT_OUT, writer);
             } else {
@@ -250,34 +257,30 @@
             }
         }
 
-
         faultContext.setOperationContext(processingContext.getOperationContext());
         faultContext.setProcessingFault(true);
         faultContext.setServerSide(true);
         SOAPEnvelope envelope = null;
 
-        if (processingContext.getSOAPVersion() != null && SOAP11Constants
-                .SOAP_ENVELOPE_NAMESPACE_URI
-                .equals(processingContext.getSOAPVersion())) {
+        if (processingContext.isSOAP11()) {
             envelope =
-                    OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope();
+                OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope();
         } else {
             // Following will make SOAP 1.2 as the default, too.
             envelope =
-                    OMAbstractFactory.getSOAP12Factory().getDefaultFaultEnvelope();
+                OMAbstractFactory.getSOAP12Factory().getDefaultFaultEnvelope();
         }
 
-
-
         // TODO do we need to set old Headers back?
 
         //            body.addFault(new AxisFault(e.getMessage(), e));
-//        body.getFault().setException(new AxisFault(e));
-        extractFaultInformationFromMessageContext(processingContext,
-                envelope.getBody().getFault(), e);
+        //        body.getFault().setException(new AxisFault(e));
+        extractFaultInformationFromMessageContext(
+            processingContext,
+            envelope.getBody().getFault(),
+            e);
 
         faultContext.setEnvelope(envelope);
-//        sendFault(faultContext);
         return faultContext;
     }
 
@@ -313,26 +316,27 @@
      * @param fault
      * @param e
      */
-    private void extractFaultInformationFromMessageContext(MessageContext context,
-                                                           SOAPFault fault, Throwable e) {
+    private void extractFaultInformationFromMessageContext(
+        MessageContext context,
+        SOAPFault fault,
+        Throwable e) {
         SOAPFaultException soapException = null;
         String soapNamespaceURI = "";
 
         // get the current SOAP version
-        if (context == null || "".equals(context.getSOAPVersion()) || context.getSOAPVersion() == null) {
+        if (!context.isSOAP11()) {
             // defaulting to SOAP 1.2
             soapNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
         } else {
-            soapNamespaceURI = context.getSOAPVersion();
+            soapNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
         }
 
-
         if (e instanceof SOAPProcessingException) {
             soapException = (SOAPProcessingException) e;
         } else if (e instanceof AxisFault) {
             if (e.getCause() instanceof SOAPProcessingException) {
                 soapException = (SOAPProcessingException) e.getCause();
-            } else {
+            } else  {
                 soapException = (SOAPFaultException) e;
             }
         } else {
@@ -340,7 +344,7 @@
         }
 
         Object faultCode =
-                context.getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+            context.getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
         String soapFaultCode = "";
         if (faultCode != null) {
             fault.setCode((SOAPFaultCode) faultCode);
@@ -348,13 +352,15 @@
             soapFaultCode = soapException.getFaultCode();
 
             // defaulting to fault code Sender, if no message is available
-            soapFaultCode = ("".equals(soapFaultCode) || soapFaultCode == null) ? getSenderFaultCode(soapNamespaceURI) : soapFaultCode;
+            soapFaultCode =
+                ("".equals(soapFaultCode) || soapFaultCode == null)
+                    ? getSenderFaultCode(soapNamespaceURI)
+                    : soapFaultCode;
             fault.getCode().getValue().setText(soapFaultCode);
         }
 
-
         Object faultReason =
-                context.getProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
+            context.getProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
         String message = "";
         if (faultReason != null) {
             fault.setReason((SOAPFaultReason) faultReason);
@@ -362,13 +368,13 @@
             message = soapException.getMessage();
 
             // defaulting to reason, unknown, if no reason is available
-            message = ("".equals(message) || message == null) ? "unknown" : message;
+            message =
+                ("".equals(message) || message == null) ? "unknown" : message;
             fault.getReason().getSOAPText().setText(message);
         }
 
-
         Object faultRole =
-                context.getProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
+            context.getProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
         if (faultRole != null) {
             fault.getRole().setText((String) faultRole);
         } else {
@@ -377,7 +383,7 @@
         }
 
         Object faultNode =
-                context.getProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
+            context.getProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
         if (faultNode != null) {
             fault.getNode().setText((String) faultNode);
         } else {
@@ -387,37 +393,45 @@
         }
 
         Object faultDetail =
-                context.getProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+            context.getProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
         if (faultDetail != null) {
             fault.setDetail((SOAPFaultDetail) faultDetail);
-        } else if (fault.getException() == null){
-            fault.setException(new Exception(e));
+        } else if (fault.getException() == null) {
+            if(e instanceof Exception){
+                fault.setException((Exception)e);
+            }else{
+                fault.setException(new Exception(e));
+            }
+            
         }
     }
 
     private void verifyContextBuilt(MessageContext msgctx) throws AxisFault {
         if (msgctx.getSystemContext() == null) {
-            throw new AxisFault(Messages.getMessage("cannotBeNullConfigurationContext"));
+            throw new AxisFault(
+                Messages.getMessage("cannotBeNullConfigurationContext"));
         }
         if (msgctx.getOperationContext() == null) {
-            throw new AxisFault(Messages.getMessage("cannotBeNullOperationContext"));
+            throw new AxisFault(
+                Messages.getMessage("cannotBeNullOperationContext"));
         }
         if (msgctx.getServiceContext() == null) {
-            throw new AxisFault(Messages.getMessage("cannotBeNullServiceContext"));
+            throw new AxisFault(
+                Messages.getMessage("cannotBeNullServiceContext"));
         }
     }
 
     private void invokePhases(ArrayList phases, MessageContext msgctx)
-            throws AxisFault {
+        throws AxisFault {
         int count = phases.size();
-        for (int i = 0; (i < count && !msgctx.isPaused()); i++) {
+        for (int i = 0;(i < count && !msgctx.isPaused()); i++) {
             Phase phase = (Phase) phases.get(i);
             phase.invoke(msgctx);
         }
     }
 
     public void resumeInvocationPhases(ArrayList phases, MessageContext msgctx)
-            throws AxisFault {
+        throws AxisFault {
         msgctx.setPausedFalse();
         int count = phases.size();
         boolean foundMatch = false;
@@ -426,8 +440,9 @@
             Phase phase = (Phase) phases.get(i);
             if (phase.getPhaseName().equals(msgctx.getPausedPhaseName())) {
                 foundMatch = true;
-                phase.invokeStartFromHandler(msgctx.getPausedHandlerName(),
-                        msgctx);
+                phase.invokeStartFromHandler(
+                    msgctx.getPausedHandlerName(),
+                    msgctx);
             } else {
                 if (foundMatch) {
                     phase.invoke(msgctx);
@@ -496,11 +511,17 @@
     }
 
     private String getSenderFaultCode(String soapNamespace) {
-        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapNamespace) ? SOAP12Constants.FAULT_CODE_SENDER : SOAP11Constants.FAULT_CODE_SENDER;
+        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(
+            soapNamespace)
+            ? SOAP12Constants.FAULT_CODE_SENDER
+            : SOAP11Constants.FAULT_CODE_SENDER;
     }
 
     private String getReceiverFaultCode(String soapNamespace) {
-        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapNamespace) ? SOAP12Constants.FAULT_CODE_RECEIVER : SOAP11Constants.FAULT_CODE_RECEIVER;
+        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(
+            soapNamespace)
+            ? SOAP12Constants.FAULT_CODE_RECEIVER
+            : SOAP11Constants.FAULT_CODE_RECEIVER;
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPProcessingModelChecker.java Mon Aug  1 20:18:04 2005
@@ -53,11 +53,10 @@
             // additional roles and then to check that any headers targetted for
             // that role too have been dealt with.
 
-            boolean isSOAP12 =
-                SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(msgContext.getSOAPVersion());
+            
             String role = hb.getRole();
 
-            if (isSOAP12) {
+            if (!msgContext.isSOAP11()) {
                 //if must understand and soap 1.2 the Role should be NEXT , if it is null we considerr
                 // it to be NEXT
                 if (role != null && !SOAP12Constants.SOAP_ROLE_NEXT.equals(role)) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/TransportUtils.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/TransportUtils.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/TransportUtils.java Mon Aug  1 20:18:04 2005
@@ -35,7 +35,7 @@
 import java.io.Reader;
 
 public class TransportUtils {
-    public static SOAPEnvelope createSOAPMessage(MessageContext msgContext, String soapNamespaceURI) throws AxisFault {
+   public static SOAPEnvelope createSOAPMessage(MessageContext msgContext, String soapNamespaceURI) throws AxisFault {
 
         InputStream inStream = (InputStream) msgContext.getProperty(
                 MessageContext.TRANSPORT_IN);
@@ -87,7 +87,6 @@
                 XMLStreamReader xmlreader =
                         XMLInputFactory.newInstance().createXMLStreamReader(
                                 reader);
-                msgContext.setSoapNamespaceURI(soapNamespaceURI);
                 builder = new StAXSOAPModelBuilder(xmlreader, soapNamespaceURI);
                 envelope = (SOAPEnvelope) builder.getDocumentElement();
             }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java Mon Aug  1 20:18:04 2005
@@ -124,9 +124,6 @@
             if (!processed) {
                 lister.handle(httpServletRequest, httpServletResponse, out);
             }
-            
-            //TODO: Change this to actual request's value
-            httpServletResponse.setContentType("text/xml; charset=utf-8");
         } catch (AxisFault e) {
             if (msgContext != null) {
                 msgContext.setProperty(MessageContext.TRANSPORT_OUT, out);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Mon Aug  1 20:18:04 2005
@@ -52,8 +52,9 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 
-public class CommonsHTTPTransportSender extends AbstractHandler implements
-        TransportSender {
+public class CommonsHTTPTransportSender
+    extends AbstractHandler
+    implements TransportSender {
     private boolean chuncked = false;
 
     private String httpVersion = HTTPConstants.HEADER_PROTOCOL_11;
@@ -71,6 +72,14 @@
 
     public void invoke(MessageContext msgContext) throws AxisFault {
         try {
+            String charSetEnc =
+                (String) msgContext.getProperty(
+                    MessageContext.CHARACTER_SET_ENCODING);
+            if (charSetEnc != null) {
+                omOutput.setCharSetEncoding(charSetEnc);
+            }
+            omOutput.setSoap11(msgContext.isSOAP11());
+
             //Check for the REST behaviour, if you desire rest beahaviour
             //put a <parameter name="doREST" value="true"/> at the
             // server.xml/client.xml file
@@ -78,16 +87,16 @@
 
             EndpointReference epr = null;
             if (msgContext.getTo() != null
-                    && !AddressingConstants.Submission.WSA_ANONYMOUS_URL
-                    .equals(msgContext.getTo().getAddress())
-                    && !AddressingConstants.Final.WSA_ANONYMOUS_URL
-                    .equals(msgContext.getTo().getAddress())) {
+                && !AddressingConstants.Submission.WSA_ANONYMOUS_URL.equals(
+                    msgContext.getTo().getAddress())
+                && !AddressingConstants.Final.WSA_ANONYMOUS_URL.equals(
+                    msgContext.getTo().getAddress())) {
                 epr = msgContext.getTo();
             }
 
             OMElement dataOut;
             if (msgContext.isDoingREST()) {
-                dataOut = msgContext.getEnvelope().getFirstElement();
+                dataOut = msgContext.getEnvelope().getBody().getFirstElement();
             } else {
                 dataOut = msgContext.getEnvelope();
             }
@@ -96,17 +105,24 @@
             if (epr != null) {
                 writeMessageWithCommons(msgContext, epr, dataOut);
             } else {
-                OutputStream out = (OutputStream) msgContext
-                        .getProperty(MessageContext.TRANSPORT_OUT);
-                
-                String charSetEnc = (String)msgContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
-                omOutput.setOutputStream(out, false);
-                omOutput.setCharSetEncoding(charSetEnc);
-
+                OutputStream out =
+                    (OutputStream) msgContext.getProperty(
+                        MessageContext.TRANSPORT_OUT);
+                if (msgContext.isServerSide()) {
+                    HTTPOutTransportInfo transportInfo =
+                        (HTTPOutTransportInfo) msgContext.getProperty(
+                            HTTPConstants.HTTPOutTransportInfo);
+                    if (transportInfo != null) {
+                        transportInfo.setContentType(omOutput.getContentType());
+                    }
+                }
+                omOutput.setOutputStream(out, msgContext.isDoingMTOM());
                 dataOut.serialize(omOutput);
+                omOutput.flush();
             }
             msgContext.getOperationContext().setProperty(
-                    Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE);
+                Constants.RESPONSE_WRITTEN,
+                Constants.VALUE_TRUE);
         } catch (XMLStreamException e) {
             throw new AxisFault(e);
         } catch (FactoryConfigurationError e) {
@@ -114,15 +130,17 @@
         }
     }
 
-    public void writeMessageWithToOutPutStream(MessageContext msgContext,
-                                               OutputStream out) {
+    public void writeMessageWithToOutPutStream(
+        MessageContext msgContext,
+        OutputStream out) {
 
     }
 
-        public void writeMessageWithCommons(MessageContext msgContext,
-                                        EndpointReference toURL,
-                                        OMElement dataout)
-            throws AxisFault {
+    public void writeMessageWithCommons(
+        MessageContext msgContext,
+        EndpointReference toURL,
+        OMElement dataout)
+        throws AxisFault {
         try {
             URL url = new URL(toURL.getAddress());
 
@@ -136,13 +154,22 @@
             //supporting RESTFacility..
 
             if (!msgContext.isDoingREST()) {
-                this.transportConfigurationPOST(msgContext,dataout,url,soapActionString);
-            }
-            if (msgContext.isDoingREST() && !msgContext.isRestThroughPOST()) {
-                this.transportConfigurationGET(msgContext,url);
+                this.transportConfigurationPOST(
+                    msgContext,
+                    dataout,
+                    url,
+                    soapActionString);
             }
-            if (msgContext.isDoingREST() && msgContext.isRestThroughPOST()) {
-                this.transportConfigurationPOST(msgContext,dataout,url,soapActionString);
+            if (msgContext.isDoingREST()) {
+                if (msgContext.isRestThroughPOST()) {
+                    this.transportConfigurationPOST(
+                        msgContext,
+                        dataout,
+                        url,
+                        soapActionString);
+                } else {
+                    this.transportConfigurationGET(msgContext, url);
+                }
             }
         } catch (MalformedURLException e) {
             throw new AxisFault(e);
@@ -153,20 +180,22 @@
         }
 
     }
-    protected HostConfiguration getHostConfiguration(MessageContext context,
-                                                     URL targetURL) {
+    protected HostConfiguration getHostConfiguration(
+        MessageContext context,
+        URL targetURL) {
         //TODO cheaking wheather the host is a proxy
         HostConfiguration config = new HostConfiguration();
-        config.setHost(targetURL.getHost(), targetURL.getPort() == -1 ? 80
-                : targetURL.getPort());
+        config.setHost(
+            targetURL.getHost(),
+            targetURL.getPort() == -1 ? 80 : targetURL.getPort());
         return config;
     }
 
     //get the contentLength...
     public class AxisRequestEntity implements RequestEntity {
-    	
+
         private String charSetEnc;
-    	
+
         private OMElement element;
 
         private boolean chuncked;
@@ -175,13 +204,16 @@
 
         private boolean doingMTOM = false;
 
-        public AxisRequestEntity(OMElement element, boolean chuncked,
-				boolean doingMTOM, String charSetEncoding) {
-			this.element = element;
-			this.chuncked = chuncked;
-			this.doingMTOM = doingMTOM;
-			this.charSetEnc = charSetEncoding;
-		}
+        public AxisRequestEntity(
+            OMElement element,
+            boolean chuncked,
+            boolean doingMTOM,
+            String charSetEncoding) {
+            this.element = element;
+            this.chuncked = chuncked;
+            this.doingMTOM = doingMTOM;
+            this.charSetEnc = charSetEncoding;
+        }
 
         public boolean isRepeatable() {
             return false;
@@ -190,8 +222,10 @@
         public byte[] writeBytes() throws AxisFault {
             try {
                 ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-                XMLStreamWriter outputWriter = XMLOutputFactory.newInstance()
-                        .createXMLStreamWriter(bytesOut, charSetEnc);
+                XMLStreamWriter outputWriter =
+                    XMLOutputFactory.newInstance().createXMLStreamWriter(
+                        bytesOut,
+                        charSetEnc);
                 element.serialize(outputWriter);
                 outputWriter.flush();
                 return bytesOut.toByteArray();
@@ -202,27 +236,27 @@
             }
         }
 
-        public void writeRequest(OutputStream out) throws IOException{
+        public void writeRequest(OutputStream out) throws IOException {
             try {
                 if (chuncked || doingMTOM) {
                     omOutput.setOutputStream(out, doingMTOM);
-                    omOutput.setCharSetEncoding(charSetEnc);
                     element.serialize(omOutput);
                     omOutput.flush();
-                    out.flush();
+                    
                 } else {
                     if (bytes == null) {
                         bytes = writeBytes();
                     }
                     out.write(bytes);
                 }
+                out.flush();
             } catch (XMLStreamException e) {
                 throw new AxisFault(e);
             } catch (FactoryConfigurationError e) {
                 throw new AxisFault(e);
             } catch (IOException e) {
                 throw new AxisFault(e);
-            } 
+            }
         }
 
         public long getContentLength() {
@@ -241,7 +275,7 @@
         }
 
         public String getContentType() {
-            return "text/xml; charset=" + this.charSetEnc;
+            return omOutput.getContentType();
         }
     }
 
@@ -251,37 +285,40 @@
      * @see org.apache.axis2.transport.TransportSender#cleanUp(org.apache.axis2.context.MessageContext)
      */
     public void cleanUp(MessageContext msgContext) throws AxisFault {
-        HttpMethod httpMethod = (HttpMethod) msgContext
-                .getProperty(HTTP_METHOD);
+        HttpMethod httpMethod =
+            (HttpMethod) msgContext.getProperty(HTTP_METHOD);
         if (httpMethod != null) {
             httpMethod.releaseConnection();
         }
 
     }
 
-    public void init(ConfigurationContext confContext,
-                     TransportOutDescription transportOut) throws AxisFault {
+    public void init(
+        ConfigurationContext confContext,
+        TransportOutDescription transportOut)
+        throws AxisFault {
         //<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.0</parameter> or
         //<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter> is
         // checked
-        Parameter version = transportOut
-                .getParameter(HTTPConstants.PROTOCOL_VERSION);
+        Parameter version =
+            transportOut.getParameter(HTTPConstants.PROTOCOL_VERSION);
         if (version != null) {
             if (HTTPConstants.HEADER_PROTOCOL_11.equals(version.getValue())) {
                 this.httpVersion = HTTPConstants.HEADER_PROTOCOL_11;
-                Parameter transferEncoding = transportOut
-                        .getParameter(HTTPConstants.HEADER_TRANSFER_ENCODING);
+                Parameter transferEncoding =
+                    transportOut.getParameter(
+                        HTTPConstants.HEADER_TRANSFER_ENCODING);
                 if (transferEncoding != null
-                        && HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED
-                        .equals(transferEncoding.getValue())) {
+                    && HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED.equals(
+                        transferEncoding.getValue())) {
                     this.chuncked = true;
                 }
-            } else if (HTTPConstants.HEADER_PROTOCOL_10.equals(version
-                    .getValue())) {
+            } else if (
+                HTTPConstants.HEADER_PROTOCOL_10.equals(version.getValue())) {
                 //TODO HTTP1.0 specific parameters
             } else {
                 throw new AxisFault(
-                        "Parameter "
+                    "Parameter "
                         + HTTPConstants.PROTOCOL_VERSION
                         + " Can have values only HTTP/1.0 or HTTP/1.1");
             }
@@ -289,115 +326,163 @@
 
     }
 
-    private void transportConfigurationPOST(MessageContext msgContext,
-                                                OMElement dataout, URL url, String soapActionString) throws MalformedURLException, AxisFault, IOException {
-
-            //execuite the HtttpMethodBase - a connection manager can be given for handle multiple
-            httpClient = new HttpClient();
-            //hostConfig handles the socket functions..
-            HostConfiguration hostConfig = getHostConfiguration(msgContext, url);
-
-            PostMethod postMethod = new PostMethod();
-            postMethod.setPath(url.getFile());
-            msgContext.setProperty(HTTP_METHOD, postMethod);
-            
-            String charEncoding = (String)msgContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
-            
-            postMethod.setRequestEntity(new AxisRequestEntity(dataout, chuncked,msgContext.isDoingMTOM(), charEncoding));
-
-            if (!httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10) && chuncked) {
-                ((PostMethod) postMethod).setContentChunked(true);
-            }
-            postMethod.setRequestHeader(HTTPConstants.HEADER_USER_AGENT,
-                    "Axis/2.0");
-            if (!msgContext.isDoingREST()) {
-                postMethod.setRequestHeader(HTTPConstants.HEADER_SOAP_ACTION, soapActionString);
-            }
-            postMethod.setRequestHeader(HTTPConstants.HEADER_HOST, url.getHost());
-            if(msgContext.isDoingMTOM()) {
-                postMethod.setRequestHeader(HTTPConstants.HEADER_CONTENT_TYPE,
-                        omOutput.getOptimizedContentType());
+    private void transportConfigurationPOST(
+        MessageContext msgContext,
+        OMElement dataout,
+        URL url,
+        String soapActionString)
+        throws MalformedURLException, AxisFault, IOException {
+
+        //execuite the HtttpMethodBase - a connection manager can be given for handle multiple
+        httpClient = new HttpClient();
+        //hostConfig handles the socket functions..
+        HostConfiguration hostConfig = getHostConfiguration(msgContext, url);
+
+        PostMethod postMethod = new PostMethod();
+        postMethod.setPath(url.getFile());
+        msgContext.setProperty(HTTP_METHOD, postMethod);
+
+        String charEncoding =
+            (String) msgContext.getProperty(
+                MessageContext.CHARACTER_SET_ENCODING);
+
+        postMethod.setRequestEntity(
+            new AxisRequestEntity(
+                dataout,
+                chuncked,
+                msgContext.isDoingMTOM(),
+                charEncoding));
+
+        if (!httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10)
+            && chuncked) {
+            ((PostMethod) postMethod).setContentChunked(true);
+        }
+        postMethod.setRequestHeader(
+            HTTPConstants.HEADER_USER_AGENT,
+            "Axis/2.0");
+        if (!msgContext.isDoingREST()) {
+            postMethod.setRequestHeader(
+                HTTPConstants.HEADER_SOAP_ACTION,
+                soapActionString);
+        }
+        postMethod.setRequestHeader(HTTPConstants.HEADER_HOST, url.getHost());
+//        if (msgContext.isDoingMTOM()) {
+//            postMethod.setRequestHeader(
+//                HTTPConstants.HEADER_CONTENT_TYPE,
+//                omOutput.getContentType());
+//        } else {
+//            if (charEncoding == null) //Use default encoding scheme
+//                postMethod.setRequestHeader(
+//                    HTTPConstants.HEADER_CONTENT_TYPE,
+//                    "text/xml; charset="
+//                        + MessageContext.DEFAULT_CHAR_SET_ENCODING);
+//            else
+//                postMethod.setRequestHeader(
+//                    HTTPConstants.HEADER_CONTENT_TYPE,
+//                    "text/xml; charset=" + charEncoding);
+//
+//        }
+
+        if (httpVersion != null) {
+            if (httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10)) {
+                //postMethod.setHttp11(false); todo method to findout the transport version...
+                //allowing keep-alive for 1.0
+                postMethod.setRequestHeader(
+                    HTTPConstants.HEADER_CONNECTION,
+                    HTTPConstants.HEADER_CONNECTION_KEEPALIVE);
             } else {
-            	if(charEncoding == null) //Use default encoding scheme
-            		postMethod.setRequestHeader(HTTPConstants.HEADER_CONTENT_TYPE,
-                        "text/xml; charset=" + MessageContext.DEFAULT_CHAR_SET_ENCODING);
-            	else
-            		postMethod.setRequestHeader(HTTPConstants.HEADER_CONTENT_TYPE,
-                    "text/xml; charset=" + charEncoding);
-
-            }
-
-            if (httpVersion != null) {
-                if (httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10)) {
-                    //postMethod.setHttp11(false); todo method to findout the transport version...
-                    //allowing keep-alive for 1.0
-                    postMethod.setRequestHeader(HTTPConstants.HEADER_CONNECTION,
-                            HTTPConstants.HEADER_CONNECTION_KEEPALIVE);
-                } else {
-                    // allowing keep-alive for 1.1
-                    postMethod.setRequestHeader(HTTPConstants.HEADER_CONNECTION,
-                            HTTPConstants.HEADER_CONNECTION_KEEPALIVE);
-                    postMethod.setRequestHeader(HTTPConstants.HEADER_EXPECT,
-                            HTTPConstants.HEADER_EXPECT_100_Continue);
-                }
+                // allowing keep-alive for 1.1
+                postMethod.setRequestHeader(
+                    HTTPConstants.HEADER_CONNECTION,
+                    HTTPConstants.HEADER_CONNECTION_KEEPALIVE);
+                postMethod.setRequestHeader(
+                    HTTPConstants.HEADER_EXPECT,
+                    HTTPConstants.HEADER_EXPECT_100_Continue);
             }
+        }
 
-            this.httpClient.executeMethod(hostConfig, postMethod);
-            if (postMethod.getStatusCode() == HttpStatus.SC_OK) {
-                Header header = postMethod.getResponseHeader(HTTPConstants.HEADER_CONTENT_TYPE);
-                if(header != null) {
-                    HeaderElement[] headers = header.getElements();
-                    for(int i=0;i<headers.length;i++){
-                        if(headers[i].getName().equals(HTTPConstants.HEADER_ACCEPT_MULTIPART_RELATED)){
-                            OperationContext opContext = msgContext.getOperationContext();
-                            if (opContext != null) {
-                                opContext.setProperty(
-                                        HTTPConstants.MTOM_RECIVED_CONTENT_TYPE,
-                                        header.getValue());
-                            }
+        this.httpClient.executeMethod(hostConfig, postMethod);
+        if (postMethod.getStatusCode() == HttpStatus.SC_OK) {
+            Header header =
+                postMethod.getResponseHeader(HTTPConstants.HEADER_CONTENT_TYPE);
+            if (header != null) {
+                HeaderElement[] headers = header.getElements();
+                for (int i = 0; i < headers.length; i++) {
+                    if (headers[i]
+                        .getName()
+                        .equals(
+                            HTTPConstants.HEADER_ACCEPT_MULTIPART_RELATED)) {
+                        OperationContext opContext =
+                            msgContext.getOperationContext();
+                        if (opContext != null) {
+                            opContext.setProperty(
+                                HTTPConstants.MTOM_RECIVED_CONTENT_TYPE,
+                                header.getValue());
                         }
                     }
                 }
-                InputStream in = postMethod.getResponseBodyAsStream();
-                if (in == null) {
-                    throw new AxisFault(Messages.getMessage("canNotBeNull","InputStream"));
-                }
-                msgContext.getOperationContext().setProperty(MessageContext.TRANSPORT_IN, in);
-            } else if (postMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) {
-                return;
-            } else {
-                throw new AxisFault(Messages.getMessage("transportError",String.valueOf(postMethod.getStatusCode()),postMethod.getResponseBodyAsString()));
             }
-
+            InputStream in = postMethod.getResponseBodyAsStream();
+            if (in == null) {
+                throw new AxisFault(
+                    Messages.getMessage("canNotBeNull", "InputStream"));
+            }
+            msgContext.getOperationContext().setProperty(
+                MessageContext.TRANSPORT_IN,
+                in);
+        } else if (postMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) {
+            return;
+        } else {
+            throw new AxisFault(
+                Messages.getMessage(
+                    "transportError",
+                    String.valueOf(postMethod.getStatusCode()),
+                    postMethod.getResponseBodyAsString()));
         }
-        private void transportConfigurationGET(MessageContext msgContext, URL url) throws MalformedURLException, AxisFault, IOException {
-            GetMethod getMethod = new GetMethod();
-            getMethod.setPath(url.getFile());
 
-           	String charEncoding = (String)msgContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
-        	if(charEncoding == null) //Default encoding scheme
-        		getMethod.setRequestHeader(HTTPConstants.HEADER_CONTENT_TYPE,
-                    "text/xml; charset=" + MessageContext.DEFAULT_CHAR_SET_ENCODING);
-        	else
-        		getMethod.setRequestHeader(HTTPConstants.HEADER_CONTENT_TYPE,
+    }
+    private void transportConfigurationGET(MessageContext msgContext, URL url)
+        throws MalformedURLException, AxisFault, IOException {
+        GetMethod getMethod = new GetMethod();
+        getMethod.setPath(url.getFile());
+
+        String charEncoding =
+            (String) msgContext.getProperty(
+                MessageContext.CHARACTER_SET_ENCODING);
+        if (charEncoding == null) //Default encoding scheme
+            getMethod.setRequestHeader(
+                HTTPConstants.HEADER_CONTENT_TYPE,
+                "text/xml; charset="
+                    + MessageContext.DEFAULT_CHAR_SET_ENCODING);
+        else
+            getMethod.setRequestHeader(
+                HTTPConstants.HEADER_CONTENT_TYPE,
                 "text/xml; charset=" + charEncoding);
-        	
-            this.httpClient = new HttpClient();
-            HostConfiguration hostConfig = this.getHostConfiguration(msgContext, url);
-
-            this.httpClient.executeMethod(hostConfig, getMethod);
-            if (getMethod.getStatusCode() == HttpStatus.SC_OK) {
-
-                InputStream in = getMethod.getResponseBodyAsStream();
-                if (in == null) {
-                    throw new AxisFault(Messages.getMessage("canNotBeNull","InputStream"));
-                }
-                msgContext.getOperationContext().setProperty(MessageContext.TRANSPORT_IN, in);
-            } else if (getMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) {
-                return;
-            } else {
-                throw new AxisFault(Messages.getMessage("transportError",String.valueOf(getMethod.getStatusCode()),getMethod.getResponseBodyAsString()));            }
-        }
 
+        this.httpClient = new HttpClient();
+        HostConfiguration hostConfig =
+            this.getHostConfiguration(msgContext, url);
+
+        this.httpClient.executeMethod(hostConfig, getMethod);
+        if (getMethod.getStatusCode() == HttpStatus.SC_OK) {
+
+            InputStream in = getMethod.getResponseBodyAsStream();
+            if (in == null) {
+                throw new AxisFault(
+                    Messages.getMessage("canNotBeNull", "InputStream"));
+            }
+            msgContext.getOperationContext().setProperty(
+                MessageContext.TRANSPORT_IN,
+                in);
+        } else if (getMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) {
+            return;
+        } else {
+            throw new AxisFault(
+                Messages.getMessage(
+                    "transportError",
+                    String.valueOf(getMethod.getStatusCode()),
+                    getMethod.getResponseBodyAsString()));
+        }
+    }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Mon Aug  1 20:18:04 2005
@@ -48,11 +48,11 @@
 import org.apache.axis2.om.impl.llom.mtom.MTOMStAXSOAPModelBuilder;
 import org.apache.axis2.soap.SOAPEnvelope;
 import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
 import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
 import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;
 import org.apache.axis2.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Factory;
 import org.apache.axis2.util.Utils;
 
 public class HTTPTransportUtils {
@@ -66,8 +66,9 @@
             String requestURI,
             ConfigurationContext configurationContext)
             throws AxisFault {
+            boolean soap11 = false;
             try {
-
+                
 
                 //remove the starting and trailing " from the SOAP Action
                 if (soapActionHeader != null && soapActionHeader.startsWith("\"") && soapActionHeader.endsWith("\"")) {
@@ -116,11 +117,12 @@
                         	
                         }
                         if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
+                            soap11 = false;
                             //it is SOAP 1.2
-                            msgContext.setSoapNamespaceURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                             builder = new StAXSOAPModelBuilder(xmlreader, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                             envelope = (SOAPEnvelope) builder.getDocumentElement();
                         } else if (contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
+                            soap11 = true;
                             //it is SOAP 1.1
                             Object enable = msgContext.getProperty(Constants.Configuration.ENABLE_REST);
                             if ((soapActionHeader == null || soapActionHeader.length() == 0)
@@ -128,7 +130,6 @@
                                 //If the content Type is text/xml (BTW which is the SOAP 1.1 Content type ) and
                                 //the SOAP Action is absent it is rest !!
                                 msgContext.setDoingREST(true);
-                                msgContext.setSoapNamespaceURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
 
                                 SOAPFactory soapFactory = new SOAP11Factory();
                                 builder = new StAXOMBuilder(xmlreader);
@@ -136,7 +137,6 @@
                                 envelope = soapFactory.getDefaultEnvelope();
                                 envelope.getBody().addChild(builder.getDocumentElement());
                             }else{
-                                msgContext.setSoapNamespaceURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                                 builder = new StAXSOAPModelBuilder(xmlreader, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                                 envelope = (SOAPEnvelope) builder.getDocumentElement();
                             }
@@ -154,13 +154,12 @@
                     engine.receive(msgContext);
                 }
 
-            } catch (SOAPProcessingException e) {
-                throw new AxisFault(e);
-            } catch (OMException e) {
-                throw new AxisFault(e);
-            } catch (XMLStreamException e) {
+            } catch (Exception e){
+                if(msgContext.getEnvelope() == null && !soap11){
+                    msgContext.setEnvelope(new SOAP12Factory().createSOAPEnvelope());
+                }
                 throw new AxisFault(e);
-            }
+            } 
         }
 
     
@@ -276,7 +275,6 @@
              */
             builder = new MTOMStAXSOAPModelBuilder(reader, mimeHelper, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
         } else if (mimeHelper.getAttachmentSpecType().equals(MIMEHelper.SWA_TYPE)) {
-            msgContext.setSoapNamespaceURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
             builder = new StAXSOAPModelBuilder(reader, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
         }
         return builder;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java Mon Aug  1 20:18:04 2005
@@ -132,11 +132,11 @@
                     engine.sendFault(faultContext);
                 } else {
                     log.error(e);
-//                    e.printStackTrace();
+
                 }
             } catch (Exception e1) {
                 log.error(e1);
-//                e1.printStackTrace();
+  
             }
 //            e.printStackTrace();
         } finally {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPOutputStream.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPOutputStream.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPOutputStream.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPOutputStream.java Mon Aug  1 20:18:04 2005
@@ -103,13 +103,14 @@
             written = true;
         } else {
             out.flush();
-        }
-        if (chuncked) {
-            //TODO sometimes the out stream is closed by the client
-            try {
-                ((ChunkedOutputStream) out).eos();
-            } catch (IOException e) {
+            if (chuncked) {
+                //TODO sometimes the out stream is closed by the client
+                try {
+                    ((ChunkedOutputStream) out).eos();
+                } catch (IOException e) {
+                }
             }
+
         }
     }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java Mon Aug  1 20:18:04 2005
@@ -126,7 +126,7 @@
                     soapNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
 
                 }
-                msgContext.setSoapNamespaceURI(soapNamespaceURI);
+
                 StAXBuilder builder = new StAXSOAPModelBuilder(reader, soapNamespaceURI);
 
                 SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailSorter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailSorter.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailSorter.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/MailSorter.java Mon Aug  1 20:18:04 2005
@@ -110,7 +110,6 @@
                 soapNamespaceURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
 
             }
-            msgContext.setSoapNamespaceURI(soapNamespaceURI);
             StAXBuilder builder = new StAXSOAPModelBuilder(reader, soapNamespaceURI);
 
             SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPTransportSender.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPTransportSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPTransportSender.java Mon Aug  1 20:18:04 2005
@@ -31,9 +31,7 @@
 import java.net.Socket;
 import java.net.SocketAddress;
 
-/**
- * Class HTTPTransportSender
- */
+
 public class TCPTransportSender extends AbstractTransportSender {
     /**
      * Field out

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/BadConfigOrderChange/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/BadConfigOrderChange/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/BadConfigOrderChange/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/BadConfigOrderChange/axis2.xml Mon Aug  1 20:18:04 2005
@@ -6,8 +6,11 @@
 
     <transportReceiver name="http">
     </transportReceiver>
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
+     <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
+
 
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/ConfigWithObservers/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/ConfigWithObservers/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/ConfigWithObservers/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/ConfigWithObservers/axis2.xml Mon Aug  1 20:18:04 2005
@@ -48,14 +48,13 @@
     <!-- Transport Outs -->
     <!-- ================================================= -->
 
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender"/>
+
     <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
     <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
-    <transportSender name="commons-http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
         <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
-
     <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
    <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
        <parameter name="transport.mail.smtp.host" locked="xsd:false">127.0.0.1</parameter>

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/SystemPhaseRemove/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/SystemPhaseRemove/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/SystemPhaseRemove/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/SystemPhaseRemove/axis2.xml Mon Aug  1 20:18:04 2005
@@ -6,7 +6,9 @@
 
     <transportReceiver name="http">
     </transportReceiver>
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
+     <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
 
     <phaseOrder type="inflow">

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/axis2.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/axis2.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/axis2.xml Mon Aug  1 20:18:04 2005
@@ -6,7 +6,9 @@
 
     <transportReceiver name="http">
     </transportReceiver>
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
+     <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
 
     <phaseOrder type="inflow">

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/server-transport.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/server-transport.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/server-transport.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/server-transport.xml Mon Aug  1 20:18:04 2005
@@ -3,11 +3,11 @@
     <transportReceiver name="http">
         <parameter name="para1" locked="xsd:true">10</parameter>
     </transportReceiver>
-
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
-        <parameter name="para1" locked="xsd:true">10</parameter>
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
-
+ 
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
         <phase name="TransportIn"/>

Modified: webservices/axis/trunk/java/modules/core/test-resources/deployment/server1.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test-resources/deployment/server1.xml?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test-resources/deployment/server1.xml (original)
+++ webservices/axis/trunk/java/modules/core/test-resources/deployment/server1.xml Mon Aug  1 20:18:04 2005
@@ -6,9 +6,10 @@
 
     <transportReceiver name="http">
     </transportReceiver>
-    <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
-
     <module ref="addressing"/>
 
     <phaseOrder type="inflow">

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java Mon Aug  1 20:18:04 2005
@@ -17,9 +17,10 @@
 package org.apache.axis2.engine;
 
 import junit.framework.TestCase;
+
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
-import org.apache.axis2.AxisFault;
 
 public class AbstractEngineTest extends TestCase {
 //    protected ArrayList executedHandlers = new ArrayList();

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java Mon Aug  1 20:18:04 2005
@@ -16,8 +16,13 @@
 
 package org.apache.axis2.engine;
 
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
 import junit.framework.TestCase;
-import org.apache.axis2.addressing.AddressingConstants;
+
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -30,13 +35,9 @@
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.transport.http.HTTPTransportSender;
-import org.apache.axis2.AxisFault;
+import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
 import org.apache.wsdl.WSDLService;
 
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-
 public class EnginePausingTest extends TestCase {
 
     private QName serviceName = new QName("NullService");
@@ -54,7 +55,7 @@
         AxisConfiguration engineRegistry = new AxisConfigurationImpl();
         engineContext = new ConfigurationContext(engineRegistry);
         transportOut = new TransportOutDescription(new QName("null"));
-        transportOut.setSender(new HTTPTransportSender());
+        transportOut.setSender(new CommonsHTTPTransportSender());
         transportIn = new TransportInDescription(new QName("null"));
 
     }

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java Mon Aug  1 20:18:04 2005
@@ -16,7 +16,11 @@
 
 package org.apache.axis2.engine;
 
-import org.apache.axis2.addressing.AddressingConstants;
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -28,14 +32,10 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.transport.http.HTTPTransportSender;
-import org.apache.axis2.AxisFault;
+import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
 import org.apache.wsdl.WSDLConstants;
 import org.apache.wsdl.WSDLService;
 
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-
 public class EngineWithoutPhaseResolvingTest extends AbstractEngineTest {
     private MessageContext mc;
     private ArrayList executedHandlers = new ArrayList();
@@ -60,7 +60,7 @@
 
         TransportOutDescription transport = new TransportOutDescription(
                 new QName("null"));
-        transport.setSender(new HTTPTransportSender());
+        transport.setSender(new CommonsHTTPTransportSender());
 
         TransportInDescription transportIn = new TransportInDescription(
                 new QName("null"));

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextEnabledEcho.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextEnabledEcho.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextEnabledEcho.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextEnabledEcho.java Mon Aug  1 20:18:04 2005
@@ -16,9 +16,9 @@
 
 package org.apache.axis2.engine;
 
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.om.OMElement;
-import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextInjectionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextInjectionTest.java?rev=226930&r1=226929&r2=226930&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextInjectionTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextInjectionTest.java Mon Aug  1 20:18:04 2005
@@ -18,9 +18,11 @@
 
 //todo
 
+import javax.xml.namespace.QName;
+
 import junit.framework.TestCase;
+
 import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.clientapi.MessageSender;
 import org.apache.axis2.context.ConfigurationContext;
@@ -41,8 +43,6 @@
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
 
 public class MessageContextInjectionTest extends TestCase {
     private EndpointReference targetEPR =