axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r202377 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/ core/src/org/apache/axis/transport/ core/src/org/apache/axis/transport/http/ samples/test/org/apache/axis/engine/
Date Wed, 29 Jun 2005 13:50:49 GMT
Author: hemapani
Date: Wed Jun 29 06:50:48 2005
New Revision: 202377

URL: http://svn.apache.org/viewcvs?rev=202377&view=rev
Log:
improving MTOM, still we are short of where we need to be in :(

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPWorker.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawMTOMTest.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java Wed Jun 29
06:50:48 2005
@@ -185,7 +185,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/axis/transport/AbstractTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java
Wed Jun 29 06:50:48 2005
@@ -81,6 +81,8 @@
 		if (doREST != null && Constants.VALUE_TRUE.equals(doREST)) {
 			this.doREST = true;
 		}
+        
+        msgContext.setDoMTOM(HTTPTransportUtils.doWriteMTOM(msgContext));
 
 		OutputStream out = null;
 
@@ -135,12 +137,8 @@
 		if (outputMessage != null) {
 			OMOutput omOutput = null;
 
-			boolean doMTOM = msgContext.isDoMTOM();
-			if (!doMTOM){
-				doMTOM = HTTPTransportUtils.doWriteMTOM(msgContext);
-			}
 			try {
-				if (doMTOM) {
+				if (msgContext.isDoMTOM()) {
 					omOutput = new OMOutput(out, true);
 					outputMessage.serialize(omOutput);
 					omOutput.flush();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
Wed Jun 29 06:50:48 2005
@@ -55,7 +55,7 @@
             String soapActionString =
                 soapAction == null ? "" : soapAction.toString();
             
-            boolean doMTOM = HTTPTransportUtils.doWriteMTOM(msgContext);
+            boolean doMTOM = msgContext.isDoMTOM();
             StringBuffer buf = new StringBuffer();
             buf.append(HTTPConstants.HEADER_POST).append(" ");
             buf.append(url.getFile()).append(" ").append(httpVersion).append("\n");

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportUtils.java
Wed Jun 29 06:50:48 2005
@@ -84,8 +84,7 @@
 				mimetype = st.nextToken();
 			}
 
-			if (HTTPConstants.HEADER_ACCEPT_MULTIPART_RELATED
-					.equalsIgnoreCase(mimetype)) {
+			if (contentType.indexOf(HTTPConstants.HEADER_ACCEPT_MULTIPART_RELATED) >= 0){
 				builder = selectBuilderForMIME(msgContext, in, contentType);
 				envelope = (SOAPEnvelope) builder.getDocumentElement();
 			} else if (contentType != null
@@ -186,6 +185,7 @@
 			InputStream inStream, String contentTypeString) throws OMException,
 			XMLStreamException, FactoryConfigurationError {
 		StAXBuilder builder = null;
+
 		MIMEHelper mimeHelper = new MIMEHelper(inStream, contentTypeString);
 		XMLStreamReader reader = XMLInputFactory.newInstance()
 				.createXMLStreamReader(
@@ -213,16 +213,17 @@
 
 	private static boolean isOptimised(OMElement element) {
 		Iterator childrenIter = element.getChildren();
+        boolean isOptimized = false;
 		while (childrenIter.hasNext()) {
 			OMNode node = (OMNode) childrenIter.next();
 			if (OMNode.TEXT_NODE == node.getType()
 					&& ((OMText) node).isOptimized()) {
-				return true;
+                        isOptimized =  true;
 			} else if (OMNode.ELEMENT_NODE == node.getType()) {
-				return isOptimised((OMElement) node);
+                isOptimized = isOptimised((OMElement) node);
 			}
 		}
-		return false;
+		return isOptimized;
 	}
 
 	public static boolean doWriteMTOM(MessageContext msgContext) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPWorker.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPWorker.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPWorker.java
Wed Jun 29 06:50:48 2005
@@ -67,6 +67,7 @@
                 // let us put the information about incoming transport
                 HTTPTransportReceiver reciver = new HTTPTransportReceiver();
                 Map map = reciver.parseTheHeaders(inStream, true);
+                
 
                 SimpleHTTPOutputStream out;
                 String transferEncoding = (String) map.get(HTTPConstants.HEADER_TRANSFER_ENCODING);

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawMTOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawMTOMTest.java?rev=202377&r1=202376&r2=202377&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawMTOMTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawMTOMTest.java
Wed Jun 29 06:50:48 2005
@@ -47,7 +47,7 @@
 public class EchoRawMTOMTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                    "http://127.0.0.1:5556"
+                    "http://127.0.0.1:5555"
            // + (UtilServer.TESTING_PORT)
             + "/axis/services/EchoXMLService/echoMTOMtoBase64");
     private Log log = LogFactory.getLog(getClass());



Mime
View raw message