You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/11/14 09:35:04 UTC

svn commit: r344079 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi: InOutMEPClient.java MEPClient.java

Author: chinthaka
Date: Mon Nov 14 00:34:56 2005
New Revision: 344079

URL: http://svn.apache.org/viewcvs?rev=344079&view=rev
Log:
Fixing a miheaders bug. Once you set miheaders, and if you try to send another message before sending the earlier one, the information within the miheaders was overriden.
Fixed that.

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java?rev=344079&r1=344078&r2=344079&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/InOutMEPClient.java Mon Nov 14 00:34:56 2005
@@ -123,7 +123,7 @@
 
         // The message ID is sent all the time
         String messageID = String.valueOf("uuid:" + UUIDGenerator.getUUID());
-        this.messageInformationHeaders.setMessageId(messageID);
+        msgctx.setMessageID(messageID);
         //
         if (useSeparateListener) {
             //This mean doing a Request-Response invocation using two channel. If the
@@ -216,7 +216,7 @@
             checkTransport(msgctx);
             //Use message id all the time!
             String messageID = String.valueOf("uuid:" + UUIDGenerator.getUUID());
-            this.messageInformationHeaders.setMessageId(messageID);
+            msgctx.setMessageID(messageID);
             ////
             if (useSeparateListener) {
                 //the invocation happen via a seperate Channel, so we should set up the

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java?rev=344079&r1=344078&r2=344079&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/MEPClient.java Mon Nov 14 00:34:56 2005
@@ -95,8 +95,11 @@
         if (msgCtx.getMessageInformationHeaders() != null && msgCtx.getMessageInformationHeaders().getAction() != null) {
             messageInformationHeaders.setAction(msgCtx.getMessageInformationHeaders().getAction());
         }
-        msgCtx.setMessageInformationHeaders(messageInformationHeaders);
-        msgCtx.setSoapAction(soapAction);
+
+        msgCtx.setMessageInformationHeaders(cloneMIHeaders());
+
+        //msgCtx.setMessageInformationHeaders(messageInformationHeaders);
+        msgCtx.setSoapAction(soapAction + "");
 
         // check user has put any SOAPHeader using the call MEPClient methods and add them, if any, to the
         // the SOAP message
@@ -202,6 +205,17 @@
         }
     }
 
+    public MessageInformationHeaders cloneMIHeaders() {
+        MessageInformationHeaders messageInformationHeaders = new MessageInformationHeaders();
+        messageInformationHeaders.setAction(this.messageInformationHeaders.getAction());
+        messageInformationHeaders.setFaultTo(this.messageInformationHeaders.getFaultTo());
+        messageInformationHeaders.setFrom(this.messageInformationHeaders.getFrom());
+        messageInformationHeaders.setMessageId(this.messageInformationHeaders.getMessageId());
+        messageInformationHeaders.setRelatesTo(this.messageInformationHeaders.getRelatesTo());
+        messageInformationHeaders.setReplyTo(this.messageInformationHeaders.getReplyTo());
+        messageInformationHeaders.setTo(this.messageInformationHeaders.getTo());
+        return messageInformationHeaders;
+    }
     /**
      * @param string
      */