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/06/30 10:08:37 UTC

svn commit: r202505 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/ core/src/org/apache/axis/receivers/ core/src/org/apache/axis/transport/http/ samples/test/org/apache/axis/mail/

Author: hemapani
Date: Thu Jun 30 01:08:36 2005
New Revision: 202505

URL: http://svn.apache.org/viewcvs?rev=202505&view=rev
Log:
fixing the error found at the transport sender in doing MTOM

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.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=202505&r1=202504&r2=202505&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 Thu Jun 30 01:08:36 2005
@@ -177,7 +177,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/receivers/AbstractInOutSyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java?rev=202505&r1=202504&r2=202505&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractInOutSyncMessageReceiver.java Thu Jun 30 01:08:36 2005
@@ -21,6 +21,7 @@
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.AxisFault;
+import org.apache.axis.transport.http.HTTPConstants;
 
 /**
  * This is the Absract IN-OUT MEP MessageReciver. The
@@ -55,6 +56,7 @@
         newmsgCtx.setOperationContext(messgeCtx.getOperationContext());
         newmsgCtx.setServiceContext(messgeCtx.getServiceContext());
         newmsgCtx.setProperty(MessageContext.TRANSPORT_OUT,messgeCtx.getProperty(MessageContext.TRANSPORT_OUT));
+        newmsgCtx.setProperty(HTTPConstants.HTTPOutTransportInfo,messgeCtx.getProperty(HTTPConstants.HTTPOutTransportInfo));
         newmsgCtx.setDoingREST(messgeCtx.isDoingREST());
         newmsgCtx.setDoingMTOM(messgeCtx.isDoingMTOM());
         

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=202505&r1=202504&r2=202505&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 Thu Jun 30 01:08:36 2005
@@ -213,7 +213,12 @@
         throws AxisFault {
         if(msgContext.isDoingMTOM()){
             HTTPOutTransportInfo httpOutTransportInfo = (HTTPOutTransportInfo)msgContext.getProperty(HTTPConstants.HTTPOutTransportInfo);
-            httpOutTransportInfo.setContentType(OMOutput.getContentType(true));
+            if(httpOutTransportInfo != null){
+                httpOutTransportInfo.setContentType(OMOutput.getContentType(true));
+            }else{
+                throw new AxisFault("Property "+ HTTPConstants.HTTPOutTransportInfo + " not set by the Server");
+            }
+            
         }
         return out;
     }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java?rev=202505&r1=202504&r2=202505&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java Thu Jun 30 01:08:36 2005
@@ -132,7 +132,6 @@
         org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call(serviceContext);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
 
-        try {
             call.setTo(targetEPR);
             call.setTransportInfo(Constants.TRANSPORT_MAIL, Constants.TRANSPORT_MAIL, true);
             Callback callback = new Callback() {
@@ -158,13 +157,11 @@
             while (!finish) {
                 Thread.sleep(1000);
                 index++;
-//                if (index > 10) {
-//                    throw new AxisFault("Server is shutdown as the Async response take too longs time");
-//                }
+                if (index > 10) {
+                    throw new AxisFault("Server is shutdown as the Async response take too longs time");
+                }
             }
-        } finally {
             call.close();
-        }
 
     }
     public ConfigurationContext createServerConfigurationContext() throws Exception {