axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r488593 - /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
Date Tue, 19 Dec 2006 09:07:47 GMT
Author: deepal
Date: Tue Dec 19 01:07:46 2006
New Revision: 488593

URL: http://svn.apache.org/viewvc?view=rev&rev=488593
Log:
fixing AXIS2-1564
 - dims pls revert the changes if I have done anything wrong


Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=488593&r1=488592&r2=488593
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
Tue Dec 19 01:07:46 2006
@@ -199,25 +199,8 @@
         } else {
             if (block) {
                 // Send the SOAP Message and receive a response
-                MessageContext response = send(mc);
+                send(mc);
                 // check for a fault and return the result
-                if (response != null) {
-                    SOAPEnvelope resEnvelope = response.getEnvelope();
-                    if (resEnvelope.getBody().hasFault()) {
-                        SOAPFault soapFault = resEnvelope.getBody().getFault();
-
-                        //we need to call engine.receiveFault
-                        AxisEngine engine = new AxisEngine(mc.getConfigurationContext());
-                        engine.receiveFault(response);
-                        if (options.isExceptionToBeThrownOnSOAPFault()) {
-                            // does the SOAPFault has a detail element for Excpetion
-
-                            throw new AxisFault(soapFault.getCode(), soapFault.getReason(),
-                                    soapFault.getNode(), soapFault.getRole(), soapFault.getDetail());
-
-                        }
-                    }
-                }
                 completed = true;
             } else {
                 sc.getConfigurationContext().getThreadPool().execute(
@@ -266,20 +249,34 @@
         if (responseMessageContext.getEnvelope() == null) {
             // If request is REST we assume the responseMessageContext is REST, so
             // set the variable
-
             SOAPEnvelope resenvelope = TransportUtils.createSOAPMessage(
                     responseMessageContext, msgctx.getEnvelope().getNamespace()
                     .getNamespaceURI());
-            if (resenvelope != null) {
+             if (resenvelope != null) {
                 responseMessageContext.setEnvelope(resenvelope);
+            } else {
+                throw new AxisFault(Messages
+                        .getMessage("blockingInvocationExpectsResponse"));
+            }
+        }
+        SOAPEnvelope resenvelope = responseMessageContext.getEnvelope();
+        if (resenvelope != null) {
+            if (resenvelope.getBody().hasFault()) {
+                SOAPFault soapFault = resenvelope.getBody().getFault();
+                //we need to call engine.receiveFault
+                engine = new AxisEngine(msgctx.getConfigurationContext());
+                engine.receiveFault(responseMessageContext);
+                if (options.isExceptionToBeThrownOnSOAPFault()) {
+                    // does the SOAPFault has a detail element for Excpetion
+                    throw new AxisFault(soapFault.getCode(), soapFault.getReason(),
+                            soapFault.getNode(), soapFault.getRole(), soapFault.getDetail());
+                }
+            } else {
                 engine = new AxisEngine(msgctx.getConfigurationContext());
                 engine.receive(responseMessageContext);
                 if (responseMessageContext.getReplyTo() != null) {
                     sc.setTargetEPR(responseMessageContext.getReplyTo());
                 }
-            } else {
-                throw new AxisFault(Messages
-                        .getMessage("blockingInvocationExpectsResponse"));
             }
         }
         return responseMessageContext;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message