axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r326839 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi: Call.java ListenerManager.java
Date Thu, 20 Oct 2005 06:30:46 GMT
Author: deepal
Date: Wed Oct 19 23:30:23 2005
New Revision: 326839

URL: http://svn.apache.org/viewcvs?rev=326839&view=rev
Log:
fixing the error in Call , described by 
http://marc.theaimsgroup.com/?t=112973686000001&r=1&w=2

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/ListenerManager.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java?rev=326839&r1=326838&r2=326839&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java Wed
Oct 19 23:30:23 2005
@@ -209,26 +209,28 @@
             ConfigurationContextFactory efac =
                     new ConfigurationContextFactory();
             sysContext = efac.buildClientConfigurationContext(clientHome);
-           // ListenerManager.configurationContext = sysContext;
+            // ListenerManager.configurationContext = sysContext;
         } else {
             sysContext = ListenerManager.configurationContext;
         }
-
-        //we will assume a Service and operations
         QName assumedServiceName = new QName("AnonymousService");
-        ServiceDescription axisService = new ServiceDescription(assumedServiceName);
+        ServiceDescription axisService =sysContext.getAxisConfiguration().getService("AnonymousService");
+        if(axisService == null) {
+            //we will assume a Service and operations
+            axisService = new ServiceDescription(assumedServiceName);
 //        operationTemplate = new OperationDescription(new QName("TemplateOperation"));
-        operationTemplate = new   OutInOperationDescription(new QName("TemplateOperation"));
+            operationTemplate = new   OutInOperationDescription(new QName("TemplateOperation"));
 
-        PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
-        //to set the operation flows
-        if(info != null){
-            info.setOperationPhases(operationTemplate);
+            PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
+            //to set the operation flows
+            if(info != null){
+                info.setOperationPhases(operationTemplate);
+            }
+            axisService.addOperation(operationTemplate);
+            sysContext.getAxisConfiguration().addService(axisService);
         }
-        axisService.addOperation(operationTemplate);
-        sysContext.getAxisConfiguration().addService(axisService);
-
-        return axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(assumedServiceName.getLocalPart());
+        return axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(
+                assumedServiceName.getLocalPart());
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/ListenerManager.java?rev=326839&r1=326838&r2=326839&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/ListenerManager.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/ListenerManager.java
Wed Oct 19 23:30:23 2005
@@ -77,6 +77,8 @@
             tsState.waitingCalls--;
             if (tsState.waitingCalls == 0) {
                 tsState.listener.stop();
+                //todo I have to properly handle this.
+                listeners.remove(transport);
             }
         }
     }



Mime
View raw message