Author: keith
Date: Thu Aug  7 08:04:48 2008
New Revision: 20550
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20550

Log:
Setting readyState to 4 when fireandforget is used                              
            



Modified:
   
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java

Modified: 
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java?rev=20550&r1=20549&r2=20550&view=diff
==============================================================================
--- 
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
      (original)
+++ 
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
      Thu Aug  7 08:04:48 2008
@@ -738,18 +738,21 @@
                     setSSLProperties(wsRequest);
                     if (IN_ONLY.equalsIgnoreCase(wsRequest.mep)) {
                         wsRequest.sender.fireAndForget(operationName, 
payloadElement);
+                        wsRequest.readyState = 4;
                     } else {
                         wsRequest.sender.sendReceiveNonBlocking(operationName, 
payloadElement, callback);
+                        wsRequest.readyState = 2;
                     }
                 } else {
                     setSSLProperties(wsRequest);
                     if (IN_ONLY.equalsIgnoreCase(wsRequest.mep)) {
                         wsRequest.sender.fireAndForget(payloadElement);
+                        wsRequest.readyState = 4;
                     } else {
                         
wsRequest.sender.sendReceiveNonBlocking(payloadElement, callback);
+                        wsRequest.readyState = 2;
                     }
                 }
-                wsRequest.readyState = 2;
             } else { // synchronous call to send()
                 wsRequest.readyState = 2;
                 // TODO do we need to call onreadystatechange here too
@@ -758,20 +761,18 @@
                     setSSLProperties(wsRequest);
                     if (IN_ONLY.equalsIgnoreCase(wsRequest.mep)) {
                         wsRequest.sender.fireAndForget(operationName, 
payloadElement);
-                        wsRequest.readyState = 2;
                     } else {
                         wsRequest.responseXML = 
wsRequest.sender.sendReceive(operationName, payloadElement);
-                        wsRequest.readyState = 4;
                     }
+                    wsRequest.readyState = 4;
                 } else {
                     setSSLProperties(wsRequest);
                     if (IN_ONLY.equalsIgnoreCase(wsRequest.mep)) {
                         wsRequest.sender.fireAndForget(payloadElement);
-                        wsRequest.readyState = 2;
                     } else {
                         wsRequest.responseXML = 
wsRequest.sender.sendReceive(payloadElement);
-                        wsRequest.readyState = 4;
                     }
+                    wsRequest.readyState = 4;
                 }
             }
             // Calling onreadystatechange function

_______________________________________________
Mashup-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to