You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/01/20 06:52:39 UTC

svn commit: r370736 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java core/src/org/apache/axis2/context/ServiceContext.java

Author: chinthaka
Date: Thu Jan 19 21:52:21 2006
New Revision: 370736

URL: http://svn.apache.org/viewcvs?rev=370736&view=rev
Log:
Adding AddressingOutHandler to get the replyTo information from the service context.

Deepal : please fill the method in the service context to return the replyToEPR.

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=370736&r1=370735&r2=370736&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Thu Jan 19 21:52:21 2006
@@ -40,8 +40,8 @@
 public class AddressingOutHandler extends AddressingHandler {
 
     private static final long serialVersionUID = -2623986992336863995L;
-    
-	private Log log = LogFactory.getLog(getClass());
+
+    private Log log = LogFactory.getLog(getClass());
 
 
     public void invoke(MessageContext msgContext) throws AxisFault {
@@ -122,12 +122,17 @@
         if (!isAddressingHeaderAlreadyAvailable(WSA_REPLY_TO, envelope, addressingNamespaceObject)) {
             epr = messageContextOptions.getReplyTo();
             if (epr == null) {//optional
-                // setting anonymous URI. Defaulting to Final.
-                String anonymousURI = Final.WSA_ANONYMOUS_URL;
-                if (Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
-                    anonymousURI = Submission.WSA_ANONYMOUS_URL;
+
+                if (msgContext.getServiceContext() != null & msgContext.getServiceContext().getMyEPR() != null) {
+                    epr = new EndpointReference(msgContext.getServiceContext().getMyEPR());
+                } else {
+                    // setting anonymous URI. Defaulting to Final.
+                    String anonymousURI = Final.WSA_ANONYMOUS_URL;
+                    if (Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
+                        anonymousURI = Submission.WSA_ANONYMOUS_URL;
+                    }
+                    epr = new EndpointReference(anonymousURI);
                 }
-                epr = new EndpointReference(anonymousURI);
             }
             // add the service group id as a reference parameter
             String serviceGroupContextId = msgContext.getServiceGroupContextId();
@@ -260,7 +265,7 @@
 
             // Note : We are not handling ServiceName purposely here. Most of the time, it will not
             // and even from the final version this has been removed.
-            }
+        }
 
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java?rev=370736&r1=370735&r2=370736&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java Thu Jan 19 21:52:21 2006
@@ -98,4 +98,10 @@
     public void setReplyTorefpars(ArrayList replyTorefpars) {
         this.replyTorefpars = replyTorefpars;
     }
+
+    public String getMyEPR() {
+
+        // TODO : Fix me Deepal
+        return null;  //To change body of created methods use File | Settings | File Templates.
+    }
 }