axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r209032 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi: AsyncResult.java Call.java CallbackReceiver.java InOutMEPClient.java
Date Mon, 04 Jul 2005 07:50:55 GMT
Author: hemapani
Date: Mon Jul  4 00:50:53 2005
New Revision: 209032

URL: http://svn.apache.org/viewcvs?rev=209032&view=rev
Log:
give a way to accsess the response Message context

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

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/AsyncResult.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/AsyncResult.java?rev=209032&r1=209031&r2=209032&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/AsyncResult.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/AsyncResult.java
Mon Jul  4 00:50:53 2005
@@ -15,28 +15,36 @@
  */
 package org.apache.axis2.clientapi;
 
+import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.soap.SOAPEnvelope;
 
 /**
  * Class AsyncResult
  */
 public class AsyncResult {
+    
+    public AsyncResult(MessageContext result){
+        this.result = result;
+    }
     /**
      * Field result
      */
-    private SOAPEnvelope result;
+    private MessageContext result;
 
-    /**
-     * @param result
-     */
-    public void setResult(SOAPEnvelope result) {
-        this.result = result;
-    }
+ 
 
     /**
      * @return SOAPEnvelope
      */
     public SOAPEnvelope getResponseEnvelope() {
+        if(result != null){
+            return result.getEnvelope();
+        }else{
+            return null;
+        }
+        
+    }
+    public MessageContext getResponseMessageContext(){
         return result;
     }
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java?rev=209032&r1=209031&r2=209032&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java Mon
Jul  4 00:50:53 2005
@@ -37,6 +37,7 @@
 
     private HashMap properties;
     protected static OperationDescription operationTemplate;
+    private MessageContext lastResponseMessage;
     /**
      * this is a convenience Class, here the Call will assume a Annoynmous Service.
      * @throws AxisFault
@@ -91,8 +92,8 @@
 //        }
         MessageContext msgctx = prepareTheSystem(toSend);
 
-        MessageContext responseContext = super.invokeBlocking(axisConfig, msgctx);
-        SOAPEnvelope resEnvelope = responseContext.getEnvelope();
+        this.lastResponseMessage = super.invokeBlocking(axisConfig, msgctx);
+        SOAPEnvelope resEnvelope = lastResponseMessage.getEnvelope();
         return resEnvelope.getBody().getFirstElement();
     }
     /**
@@ -161,4 +162,11 @@
     public void set(String key, Object value) {
         serviceContext.getEngineContext().setProperty(key, value);
     }
+    /**
+     * @return
+     */
+    public MessageContext getLastResponseMessage() {
+        return lastResponseMessage;
+    }
+
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/CallbackReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/CallbackReceiver.java?rev=209032&r1=209031&r2=209032&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/CallbackReceiver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/CallbackReceiver.java
Mon Jul  4 00:50:53 2005
@@ -34,9 +34,7 @@
 
         String messageID = relatesTO.getValue();
         Callback callback = (Callback) callbackstore.get(messageID);
-        AsyncResult result = new AsyncResult();
-        result.setResult(messgeCtx.getEnvelope());
-
+        AsyncResult result = new AsyncResult(messgeCtx);
         if (callback != null) {
             callback.onComplete(result);
             callback.setComplete(true);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java?rev=209032&r1=209031&r2=209032&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
Mon Jul  4 00:50:53 2005
@@ -337,8 +337,7 @@
                 msgctx.setServiceContext(serviceContext);
                 MessageContext response = TwoChannelBasedSender.send(msgctx, listenerTransport);
                 SOAPEnvelope resenvelope = response.getEnvelope();
-                AsyncResult asyncResult = new AsyncResult();
-                asyncResult.setResult(resenvelope);
+                AsyncResult asyncResult = new AsyncResult(response);
                 callback.onComplete(asyncResult);
                 callback.setComplete(true);
             } catch (Exception e) {



Mime
View raw message