axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prad...@apache.org
Subject svn commit: r495227 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java kernel/src/org/apache/axis2/addressing/EndpointReference.java
Date Thu, 11 Jan 2007 13:57:46 GMT
Author: pradine
Date: Thu Jan 11 05:57:46 2007
New Revision: 495227

URL: http://svn.apache.org/viewvc?view=rev&rev=495227
Log:
Refactor ws-addressing code to allow it to recognize WS-RM anonymous and behave accordingly.
See the comments in the code for details.

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=495227&r1=495226&r2=495227
==============================================================================
--- 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 11 05:57:46 2007
@@ -331,20 +331,19 @@
         String anonymous = isFinalAddressingNamespace ?
                 Final.WSA_ANONYMOUS_URL : Submission.WSA_ANONYMOUS_URL;
 
-        EndpointReference eprCopy = epr;
-        
-        if (eprCopy == null) {
-            eprCopy = new EndpointReference(anonymous);
+        if (epr == null) {
+            epr = new EndpointReference(anonymous);
         }
-        else if (!isFinalAddressingNamespace && eprCopy.hasNoneAddress()) {
+        else if (!isFinalAddressingNamespace && epr.hasNoneAddress()) {
             return; //Omit the header.
         }
-//        else if (eprCopy.hasAnonymousAddress()) {
-//            eprCopy.setAddress(anonymous);
-//        }
+        else if (Final.WSA_ANONYMOUS_URL.equals(epr.getAddress()) ||      //Don't use epr.hasAnonymousAddress()
here as it may
+                 Submission.WSA_ANONYMOUS_URL.equals(epr.getAddress())) { //recognize none
WS-Addressing anonymous values.
+            epr.setAddress(anonymous);                                    
+        }
 
         OMElement soapHeaderBlock = EndpointReferenceHelper.toOM(envelope.getOMFactory(),

-                                        eprCopy, 
+                                        epr, 
                                         new QName(namespace, headerName, prefix), namespace);
         envelope.getHeader().addChild(soapHeaderBlock);
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java?view=diff&rev=495227&r1=495226&r2=495227
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java
Thu Jan 11 05:57:46 2007
@@ -140,13 +140,17 @@
     /**
      * hasAnonymousAddress
      * 
-     * @return true if address is 'Anonymous URI' from either supported addressing version
+     * @return true if address is 'Anonymous URI'
      */
     public boolean hasAnonymousAddress(){
-        // TODO davidillsley 2006-12-14 Find a way of supporting the WS-RM Anon when
-        // Sandesha is engaged and not supporting it when it's not.
         boolean result  = (AddressingConstants.Final.WSA_ANONYMOUS_URL.equals(address) ||
                            AddressingConstants.Submission.WSA_ANONYMOUS_URL.equals(address)
||
+                           
+                           //The following is added to give WS-RM anonymous a semantics to
indicate
+                           //that any response messages should be sent synchronously, using
the
+                           //transports back channel, as opposed to asynchronously. No other
+                           //semantics normally associated with WS-Addressing anonymous values
should
+                           //be assumed, by it's presence here.
                            (address != null && address.startsWith("http://docs.oasis-open.org/ws-rx/wsrm/200608/anonymous?id=")));
         if(log.isTraceEnabled()){
             log.trace("hasAnonymousAddress: "+address+" is Anonymous: "+result);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message