Author: midon
Date: Fri Mar 13 21:40:59 2009
New Revision: 753438

URL: http://svn.apache.org/viewvc?rev=753438&view=rev
Log:
ODE-533: treat the one-way case as well

Modified:
    
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java

Modified: 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java?rev=753438&r1=753437&r2=753438&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
 Fri Mar 13 21:40:59 2009
@@ -176,6 +176,7 @@
                 __log.debug("Message: " + soapEnv);
             }
 
+            client.sendReceiveNonBlocking();
             final OperationClient operationClient = 
client.createClient(isTwoWay ? ServiceClient.ANON_OUT_IN_OP
                     : ServiceClient.ANON_OUT_ONLY_OP);
             operationClient.addMessageContext(mctx);
@@ -237,7 +238,18 @@
             } else { /** one-way case * */
                 _executorService.submit(new Callable<Object>() {
                     public Object call() throws Exception {
-                        operationClient.execute(false);
+                        try {
+                            operationClient.execute(true);
+                        } catch (Throwable t) {
+                            String errmsg = "Error sending message (mex=" + 
odeMex + "): " + t.getMessage();
+                            __log.error(errmsg, t);
+                        } finally {
+                            // release the HTTP connection, we don't need it 
anymore
+                            TransportOutDescription out = 
mctx.getTransportOut();
+                            if (out != null && out.getSender() != null) {
+                                out.getSender().cleanup(mctx);
+                            }
+                        }
                         return null;
                     }
                 });


Reply via email to