axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jal...@apache.org
Subject svn commit: r180265 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi: Call.java CallbackReceiver.java InOutMEPClient.java
Date Mon, 06 Jun 2005 08:51:13 GMT
Author: jaliya
Date: Mon Jun  6 01:51:12 2005
New Revision: 180265

URL: http://svn.apache.org/viewcvs?rev=180265&view=rev
Log:
Fix a simple prob with callbacks. Now the Client can wait by checkig isComplete method of
the Callback class

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/CallbackReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?rev=180265&r1=180264&r2=180265&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Mon Jun
 6 01:51:12 2005
@@ -36,6 +36,7 @@
  */
 public class Call extends InOutMEPClient {
     private HashMap properties;
+    private static OperationDescription opreationTemplate;
 
     /**
      * this is a convenience Class, here the Call will assume a Annoynmous Service.
@@ -91,6 +92,10 @@
             serviceContext.getServiceConfig().getOperation(new QName(axisop));
         if (axisConfig == null) {
             axisConfig = new OperationDescription(new QName(axisop));
+            axisConfig.setRemainingPhasesInFlow(opreationTemplate.getRemainingPhasesInFlow());
+            axisConfig.setPhasesOutFlow(opreationTemplate.getPhasesOutFlow());
+            axisConfig.setPhasesInFaultFlow(opreationTemplate.getPhasesInFaultFlow());
+            axisConfig.setPhasesOutFaultFlow(opreationTemplate.getPhasesOutFaultFlow());
             serviceContext.getServiceConfig().addOperation(axisConfig);
         }
         MessageContext msgctx = prepareTheSystem(toSend);
@@ -115,6 +120,8 @@
         //create new service
         QName assumedServiceName = new QName("AnonnoymousService");
         ServiceDescription axisService = new ServiceDescription(assumedServiceName);
+        opreationTemplate = new OperationDescription(new QName("TemplateOperatin"));
+        axisService.addOperation(opreationTemplate);
         sysContext.getAxisConfiguration().addService(axisService);
         ServiceContext service = sysContext.createServiceContext(assumedServiceName);
         return service;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/CallbackReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/CallbackReceiver.java?rev=180265&r1=180264&r2=180265&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/CallbackReceiver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/CallbackReceiver.java
Mon Jun  6 01:51:12 2005
@@ -39,6 +39,7 @@
 
         if (callback != null) {
             callback.onComplete(result);
+            callback.setComplete(true);
         }else{
             throw new AxisFault("The Callback realtes to MessageID "+ messageID + " is not
found");
         }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=180265&r1=180264&r2=180265&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
Mon Jun  6 01:51:12 2005
@@ -215,10 +215,8 @@
                             SOAPEnvelope resenvelope = response.getEnvelope();
                             AsyncResult asyncResult = new AsyncResult();
                             asyncResult.setResult(resenvelope);
-                            synchronized(callback){
                             callback.onComplete(asyncResult);
                             callback.setComplete(true);
-                            }
                         } catch (AxisFault e) {
                             callback.reportError(e);
                         }



Mime
View raw message