axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prad...@apache.org
Subject svn commit: r613867 [1/4] - in /webservices/axis2/branches/java/jaxws21/modules: adb-codegen/src/org/apache/axis2/schema/template/ addressing/src/META-INF/ addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/a...
Date Mon, 21 Jan 2008 12:20:41 GMT
Author: pradine
Date: Mon Jan 21 04:20:38 2008
New Revision: 613867

URL: http://svn.apache.org/viewvc?rev=613867&view=rev
Log:
Sync with trunk to revision 613751.

Modified:
    webservices/axis2/branches/java/jaxws21/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
    webservices/axis2/branches/java/jaxws21/modules/addressing/src/META-INF/module.xml
    webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandler.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandlerTest.java
    webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
    webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml
    webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java
    webservices/axis2/branches/java/jaxws21/modules/clustering/test/org/apache/axis2/clustering/ContextReplicationTest.java
    webservices/axis2/branches/java/jaxws21/modules/integration/test-resources/BaseDataTypes.wsdl
    webservices/axis2/branches/java/jaxws21/modules/jaxws/pom.xml
    webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
    webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/ServiceTests.java
    webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/WSDLDescriptionTests.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java
    webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties
    webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceClientAnnot.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceRefAnnot.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
    webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/builder/SparseAnnotTests.java
    webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java

Modified: webservices/axis2/branches/java/jaxws21/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl Mon Jan 21 04:20:38 2008
@@ -691,7 +691,6 @@
 
             <xsl:if test="property/@isarray">
                int i = 0;
-               int element_found = 0;
                axutil_array_list_t *arr_list = NULL;
             </xsl:if>
             <xsl:if test="(@ordered or @choice) and property/@isarray">
@@ -1177,8 +1176,61 @@
                                       <xsl:if test="not(@nillable)">
                                       else
                                       {
-                                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
-                                            status = AXIS2_FAILURE;
+                                            /*
+                                             * axis2_qname_t *qname = NULL;
+                                             * axiom_attribute_t *the_attri = NULL;
+                                             * 
+                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
+                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
+                                             */
+                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
+
+                                            axiom_attribute_t *the_attri = NULL;
+                                            axis2_char_t *attrib_text = NULL;
+                                            axutil_hash_t *attribute_hash = NULL;
+
+                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
+
+                                            attrib_text = NULL;
+                                            if(attribute_hash)
+                                            {
+                                                 axutil_hash_index_t *hi;
+                                                 void *val;
+                                                 const void *key;
+                                        
+                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
+                                                 {
+                                                     axutil_hash_this(hi, &amp;key, NULL, &amp;val);
+                                                     
+                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
+                                                     {
+                                                         the_attri = (axiom_attribute_t*)val;
+                                                         break;
+                                                     }
+                                                 }
+                                            }
+
+                                            if(the_attri)
+                                            {
+                                                attrib_text = axiom_attribute_get_value(the_attri, env);
+                                            }
+                                            else
+                                            {
+                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
+                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
+                                            }
+
+                                            if(attrib_text &amp;&amp; 0 == axutil_strcmp(attrib_text, "1"))
+                                            {
+                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
+                                                status = AXIS2_FAILURE;
+                                            }
+                                            else
+                                            {
+                                                /* after all, we found this is a empty string */
+                                                status = <xsl:value-of select="$axis2_name"/>_set_<xsl:value-of select="$CName"/>(<xsl:value-of select="$name"/>, env,
+                                                                   "");
+                                            }
                                       }
                                       </xsl:if>
                                     </xsl:when>
@@ -1526,9 +1578,9 @@
                                   </xsl:otherwise>
                                 </xsl:choose>
                                
-                               for (i = 0, sequence_broken = 0, tmp_node = current_node = <xsl:choose>
+                               for (i = 0, sequence_broken = 0, current_node = <xsl:choose>
                                              <xsl:when test="position()=1">first_node</xsl:when>
-                                             <xsl:otherwise>(is_early_node_valid?axiom_node_get_next_sibling(current_node, env):current_node)</xsl:otherwise></xsl:choose>; current_node != NULL; <xsl:if test="not(@any)">current_node = axiom_node_get_next_sibling(current_node, env)</xsl:if>) 
+                                             <xsl:otherwise>(is_early_node_valid?axiom_node_get_next_sibling(current_node, env):current_node)</xsl:otherwise></xsl:choose>; !sequence_broken &amp;&amp; current_node != NULL;) 
                                              <!-- We are not moving current_node to next sibling here if it an any type, because we already have done the move -->
                                {
                                   if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
@@ -1543,20 +1595,6 @@
                                   {
                                   </xsl:if>
                                       is_early_node_valid = AXIS2_TRUE;
-                                      <xsl:if test="not(@any)">
-                                      if (sequence_broken)
-                                      {
-                                        /* found element out of order */
-                                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "elements found out of order for array<xsl:value-of select="$propertyName"/> missing");
-                                        if(element_qname)
-                                        {
-                                           axutil_qname_free(element_qname, env);
-                                        }
-                                        return AXIS2_FAILURE;
-                                      }
-                                      </xsl:if>
-                                      tmp_node = current_node; /* always update the current node */
-                                      element_found = 1;
                                       <!-- changes to following choose tag should be changed in another 2 places -->
                                      <xsl:choose>
                                         <xsl:when test="@ours">
@@ -1583,8 +1621,61 @@
                                           <xsl:if test="not(@nillable)">
                                           else
                                           {
-                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
-                                                status = AXIS2_FAILURE;
+                                              /*
+                                               * axis2_qname_t *qname = NULL;
+                                               * axiom_attribute_t *the_attri = NULL;
+                                               * 
+                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
+                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
+                                               */
+                                           
+                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
+                                             
+                                              axiom_attribute_t *the_attri = NULL;
+                                              axis2_char_t *attrib_text = NULL;
+                                              axutil_hash_t *attribute_hash = NULL;
+                                             
+                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
+                                             
+                                              attrib_text = NULL;
+                                              if(attribute_hash)
+                                              {
+                                                   axutil_hash_index_t *hi;
+                                                   void *val;
+                                                   const void *key;
+                                             
+                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
+                                                   {
+                                                       axutil_hash_this(hi, &amp;key, NULL, &amp;val);
+                                                       
+                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
+                                                       {
+                                                           the_attri = (axiom_attribute_t*)val;
+                                                           break;
+                                                       }
+                                                   }
+                                              }
+                                             
+                                              if(the_attri)
+                                              {
+                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
+                                              }
+                                              else
+                                              {
+                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
+                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
+                                              }
+                                             
+                                              if(attrib_text &amp;&amp; 0 == axutil_strcmp(attrib_text, "1"))
+                                              {
+                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
+                                                  status = AXIS2_FAILURE;
+                                              }
+                                              else
+                                              {
+                                                  /* after all, we found this is a empty string */
+                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
+                                              }
                                           }
                                           </xsl:if>
                                         </xsl:when>
@@ -1892,20 +1983,43 @@
                                          {
                                             axutil_qname_free(element_qname, env);
                                          }
+                                         if(arr_list)
+                                         {
+                                            axutil_array_list_free(arr_list, env);
+                                         }
                                          return AXIS2_FAILURE;
                                      }
 
                                      i ++;
+                                    <xsl:if test="not(@any)">current_node = axiom_node_get_next_sibling(current_node, env);</xsl:if>
+
                                  <xsl:if test="not(@any)">
                                   }
                                   else
                                   {
+                                      is_early_node_valid = AXIS2_FALSE;
                                       sequence_broken = 1;
                                   }
                                   </xsl:if>
                                }
 
-                               current_node = tmp_node;
+                               <xsl:if test="not(@any)">
+                                   if (i &lt; <xsl:value-of select="@minOccurs"/>)
+                                   {
+                                     /* found element out of order */
+                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "<xsl:value-of select="$propertyName"/> (@minOccurs = '<xsl:value-of select="@minOccurs"/>') only have %d elements", i);
+                                     if(element_qname)
+                                     {
+                                        axutil_qname_free(element_qname, env);
+                                     }
+                                     if(arr_list)
+                                     {
+                                        axutil_array_list_free(arr_list, env);
+                                     }
+                                     return AXIS2_FAILURE;
+                                   }
+                               </xsl:if>
+
                                if(0 == axutil_array_list_size(arr_list,env))
                                {
                                     axutil_array_list_free(arr_list, env);
@@ -1947,7 +2061,6 @@
                                   </xsl:if>
                                        /* found the requried element */
                                        is_early_node_valid = AXIS2_TRUE;
-                                       element_found = 1;
                                       <!-- changes to following choose tag should be changed in another 2 places -->
                                      <xsl:choose>
                                         <xsl:when test="@ours">
@@ -1975,8 +2088,61 @@
                                           <xsl:if test="not(@nillable)">
                                           else
                                           {
-                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
-                                                status = AXIS2_FAILURE;
+                                             /*
+                                               * axis2_qname_t *qname = NULL;
+                                               * axiom_attribute_t *the_attri = NULL;
+                                               * 
+                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
+                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
+                                               */
+                                           
+                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
+                                             
+                                              axiom_attribute_t *the_attri = NULL;
+                                              axis2_char_t *attrib_text = NULL;
+                                              axutil_hash_t *attribute_hash = NULL;
+                                             
+                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
+                                             
+                                              attrib_text = NULL;
+                                              if(attribute_hash)
+                                              {
+                                                   axutil_hash_index_t *hi;
+                                                   void *val;
+                                                   const void *key;
+                                             
+                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
+                                                   {
+                                                       axutil_hash_this(hi, &amp;key, NULL, &amp;val);
+                                                       
+                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
+                                                       {
+                                                           the_attri = (axiom_attribute_t*)val;
+                                                           break;
+                                                       }
+                                                   }
+                                              }
+                                             
+                                              if(the_attri)
+                                              {
+                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
+                                              }
+                                              else
+                                              {
+                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
+                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
+                                              }
+                                             
+                                              if(attrib_text &amp;&amp; 0 == axutil_strcmp(attrib_text, "1"))
+                                              {
+                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$propertyName"/>");
+                                                  status = AXIS2_FAILURE;
+                                              }
+                                              else
+                                              {
+                                                  /* after all, we found this is a empty string */
+                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
+                                              }
                                           }
                                           </xsl:if>
                                         </xsl:when>
@@ -3017,7 +3183,7 @@
                         <xsl:when test="$nativePropertyType='axutil_uri_t*'">
                            text_value = axutil_uri_to_string(<xsl:value-of select="$propertyInstanceName"/>, env, AXIS2_URI_UNP_OMITUSERINFO);
                            string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
-                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT) +
+                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                              axutil_strlen(text_value) + 
                                                              axutil_strlen("<xsl:value-of select="$propertyName"/>")));
                            sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix &amp;&amp; axutil_strcmp(p_prefix, ""))?":":"",

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/META-INF/module.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/META-INF/module.xml?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/META-INF/module.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/META-INF/module.xml Mon Jan 21 04:20:38 2008
@@ -19,10 +19,7 @@
 <module name="addressing">
     <Description>This is the WS-Addressing implementation on Axis2, supporting the WS-Addressing 1.0 Recommendation, as well as the Submission version (2004/08).</Description>
     <InFlow>
-        <handler name="AddressingFinalInHandler" class="org.apache.axis2.handlers.addressing.AddressingFinalInHandler">
-            <order phase="Addressing" before="AddressingBasedDispatcher"/>
-        </handler>
-        <handler name="AddressingSubmissionInHandler" class="org.apache.axis2.handlers.addressing.AddressingSubmissionInHandler">
+        <handler name="AddressingInHandler" class="org.apache.axis2.handlers.addressing.AddressingInHandler">
             <order phase="Addressing" before="AddressingBasedDispatcher"/>
         </handler>
         <handler name="AddressingValidationHandler" class="org.apache.axis2.handlers.addressing.AddressingValidationHandler">
@@ -44,10 +41,7 @@
     </OutFaultFlow>
 
     <InFaultFlow>
-        <handler name="AddressingFinalInHandler" class="org.apache.axis2.handlers.addressing.AddressingFinalInHandler">
-            <order phase="Addressing" before="AddressingBasedDispatcher"/>
-        </handler>
-        <handler name="AddressingSubmissionInHandler" class="org.apache.axis2.handlers.addressing.AddressingSubmissionInHandler">
+        <handler name="AddressingInHandler" class="org.apache.axis2.handlers.addressing.AddressingInHandler">
             <order phase="Addressing" before="AddressingBasedDispatcher"/>
         </handler>
         <handler name="AddressingInFaultHandler" class="org.apache.axis2.handlers.addressing.AddressingInFaultHandler">

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java Mon Jan 21 04:20:38 2008
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.axis2.handlers.addressing;
-
-import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.SOAPHeader;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.AddressingFaultsHelper;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.context.MessageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-public class AddressingFinalInHandler extends AddressingInHandler {
-
-    private static final Log log = LogFactory.getLog(AddressingFinalInHandler.class);
-
-    public AddressingFinalInHandler() {
-        addressingNamespace = Final.WSA_NAMESPACE;
-        addressingVersion = "WS-Addressing Final";
-    }
-
-    protected void extractToEprReferenceParameters(EndpointReference toEPR, SOAPHeader header,
-                                                   String namespace) {
-        Iterator headerBlocks = header.getChildElements();
-        while (headerBlocks.hasNext()) {
-            OMElement headerElement = (OMElement)headerBlocks.next();
-            OMAttribute isRefParamAttr =
-                    headerElement.getAttribute(new QName(namespace, "IsReferenceParameter"));
-            if (log.isTraceEnabled()) {
-                log.trace("extractToEprReferenceParameters: Checking header: " +
-                        headerElement.getQName());
-            }
-            if (isRefParamAttr != null && "true".equals(isRefParamAttr.getAttributeValue())) {
-                toEPR.addReferenceParameter(headerElement);
-                if (log.isTraceEnabled()) {
-                    log.trace("extractToEprReferenceParameters: Header: " +
-                            headerElement.getQName() +
-                            " has IsReferenceParameter attribute. Adding to toEPR.");
-                }
-            }
-        }
-    }
-
-    /** @see AddressingValidationHandler#checkMessageIDHeader */
-    protected void checkForMandatoryHeaders(boolean[] alreadyFoundAddrHeader,
-                                            MessageContext messageContext) throws AxisFault {
-        //Unable to validate the wsa:MessageID header here as we do not yet know which MEP
-        //is in effect.
-
-        if (!alreadyFoundAddrHeader[ACTION_FLAG]) {
-            AddressingFaultsHelper
-                    .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION);
-        }
-    }
-
-    protected void setDefaults(boolean[] alreadyFoundAddrHeader, MessageContext messageContext) {
-        //According to the WS-Addressing spec, we should default the wsa:To header to the
-        //anonymous URI. Doing that, however, might prevent a different value from being
-        //used instead, such as the transport URL. Therefore, we only apply the default
-        //on the inbound response side of a synchronous request-response exchange.
-        if (!alreadyFoundAddrHeader[TO_FLAG] && !messageContext.isServerSide()) {
-            if (log.isTraceEnabled()) {
-                log.trace(messageContext.getLogIDString() +
-                        " setDefaults: Setting WS-Addressing default value for the To property.");
-            }
-            messageContext.setTo(new EndpointReference(Final.WSA_ANONYMOUS_URL));
-        }
-
-        if (!alreadyFoundAddrHeader[REPLYTO_FLAG]) {
-        	messageContext.setReplyTo(new EndpointReference(Final.WSA_ANONYMOUS_URL));
-            if (log.isTraceEnabled()) {
-                log.trace(messageContext.getLogIDString() +
-                        " setDefaults: Setting WS-Addressing default value for the ReplyTo property.");
-            }
-        }
-    }
-}

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInFaultHandler.java Mon Jan 21 04:20:38 2008
@@ -37,7 +37,6 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.handlers.AbstractHandler;
 
-import javax.xml.namespace.QName;
 import java.util.Iterator;
 
 /**

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java Mon Jan 21 04:20:38 2008
@@ -20,17 +20,20 @@
 package org.apache.axis2.handlers.addressing;
 
 import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.RolePlayer;
-import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.*;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.AddressingFaultsHelper;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.addressing.EndpointReferenceHelper;
+import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.LoggingControl;
@@ -41,31 +44,17 @@
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.List;
 
-public abstract class AddressingInHandler extends AbstractHandler implements AddressingConstants {
+public class AddressingInHandler extends AbstractHandler implements AddressingConstants {
 
-    protected String addressingNamespace = Final.WSA_NAMESPACE;  // defaulting to final version
-    protected String addressingVersion = null;
-
-    public static final String DISABLE_REF_PARAMETER_EXTRACT = "disableRefParamExtract";
+    private static final int TO_FLAG = 1, FROM_FLAG = 2, REPLYTO_FLAG = 3,
+            FAULTO_FLAG = 4, MESSAGEID_FLAG = 6, ACTION_FLAG = 0;
 
     private static final Log log = LogFactory.getLog(AddressingInHandler.class);
 
-    private boolean disableRefparamExtract = false;
-
-    public void init(HandlerDescription handlerdesc) {
-        super.init(handlerdesc);
-        disableRefparamExtract = JavaUtils.isTrueExplicitly(
-                Utils.getParameterValue(handlerdesc.getParameter(DISABLE_REF_PARAMETER_EXTRACT)));
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-            log.debug("AddressingInHandler.init disableRefparamExtract=" + disableRefparamExtract);
-        }
-    }
-
     public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
-    	//Determine if we want to ignore addressing headers.
-    	Parameter disableParam = msgContext.getParameter(DISABLE_ADDRESSING_HANDLERS);
+        //Determine if we want to ignore addressing headers.
+        Parameter disableParam = msgContext.getParameter(DISABLE_ADDRESSING_HANDLERS);
         String value = Utils.getParameterValue(disableParam);
         if (JavaUtils.isTrueExplicitly(value)) {
             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
@@ -73,38 +62,18 @@
                         "The handler has been disabled. No further processing will take place.");
             }
             msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
-            return InvocationResponse.CONTINUE;        	
+            return InvocationResponse.CONTINUE;         
         }
 
-        // if another handler has already processed the addressing headers, do not do anything here.
-        if (JavaUtils.isTrueExplicitly(msgContext.getLocalProperty(IS_ADDR_INFO_ALREADY_PROCESSED),
-                                       false)) {
-            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-                log.debug(
-                        "Another handler has processed the addressing headers. Nothing to do here.");
-            }
-            return InvocationResponse.CONTINUE;
-        }
+        // check whether to process reference parameters.
+        Parameter param = msgContext.getParameter(DISABLE_REF_PARAMETER_EXTRACT);
+        value = Utils.getParameterValue(param);
+        boolean disableRefparamExtract = JavaUtils.isTrueExplicitly(value);
 
-        // check whether someone has explicitly set which addressing handler should run.
-    	Parameter namespaceParam = msgContext.getParameter(WS_ADDRESSING_VERSION);
-        String namespace = Utils.getParameterValue(namespaceParam);
-        if (namespace == null) {
-        	namespace = (String)msgContext.getProperty(WS_ADDRESSING_VERSION);
-        	if (namespace == null) {
-        		namespace = addressingNamespace;
-        	}
+        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+            log.debug("disableRefparamExtract=" + disableRefparamExtract);
         }
-        
-        if (!namespace.equals(addressingNamespace)) {
-    		if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-    			log.debug("This addressing handler does not match the specified namespace, " +
-    					namespace);
-    		}
-    		
-    		return InvocationResponse.CONTINUE;
-    	}
-        
+
         SOAPHeader header = msgContext.getEnvelope().getHeader();
         RolePlayer rolePlayer = (RolePlayer) msgContext.getConfigurationContext()
                 .getAxisConfiguration().getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
@@ -115,35 +84,57 @@
             return InvocationResponse.CONTINUE;
         }
 
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-            log.debug("Starting " + addressingVersion + " IN handler ...");
+        // check whether someone has explicitly set which addressing namespace to expect.
+        Iterator iterator = null;
+        String namespace = (String) msgContext.getProperty(WS_ADDRESSING_VERSION);
+        
+        if (namespace == null) {
+            namespace = Final.WSA_NAMESPACE;
+            iterator = header.getHeadersToProcess(rolePlayer, namespace);
+
+            if (!iterator.hasNext()) {
+                if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+                    log.debug("No Headers present corresponding to " + namespace);
+                }
+
+                namespace = Submission.WSA_NAMESPACE;
+                iterator = header.getHeadersToProcess(rolePlayer, namespace);
+            }
+        }
+        else if (Final.WSA_NAMESPACE.equals(namespace) || Submission.WSA_NAMESPACE.equals(namespace)) {
+            iterator = header.getHeadersToProcess(rolePlayer, namespace);
+        }
+        else {
+            msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
+            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+                log.debug("No Headers present corresponding to any supported WS-Addresing namespace.");
+            }            
+
+            return InvocationResponse.CONTINUE;
         }
 
-        Iterator iterator = header.getHeadersToProcess(rolePlayer, namespace);
         if (iterator.hasNext()) {
             msgContext.setProperty(WS_ADDRESSING_VERSION, namespace);
             msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.FALSE);
 
             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-                log.debug(addressingVersion +
+                log.debug(namespace +
                           " Headers present in the SOAP message. Starting to process ...");
             }
-            if (extractAddressingInformation(header, msgContext, iterator, namespace)) {
+            if (extractAddressingInformation(header, msgContext, iterator, namespace, disableRefparamExtract)) {
                 msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.TRUE);
             }
-        } else {
+        }
+        else {
             msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-                log.debug("No Headers present corresponding to " + addressingVersion);
+                log.debug("No Headers present corresponding to " + namespace);
             }
         }
 
         return InvocationResponse.CONTINUE;
     }
 
-    protected static final int TO_FLAG = 1, FROM_FLAG = 2, REPLYTO_FLAG = 3,
-            FAULTO_FLAG = 4, MESSAGEID_FLAG = 6, ACTION_FLAG = 0;
-
     /**
      * Pull addressing headers out from the SOAP message.
      *
@@ -151,11 +142,12 @@
      * @param messageContext the active MessageContext
      * @param headers an Iterator over the addressing headers targeted to me
      * @param namespace the addressing namespace
+     * @param disableRefparamExtract whether to disable processing of reference parameters or not.
      * @return true if addressing information was found
      * @throws AxisFault if an error occurs
      */
-    protected boolean extractAddressingInformation(SOAPHeader header, MessageContext messageContext,
-                                                   Iterator headers, String namespace)
+    boolean extractAddressingInformation(SOAPHeader header, MessageContext messageContext,
+                                                   Iterator headers, String namespace, boolean disableRefparamExtract)
             throws AxisFault {
         Options messageContextOptions = messageContext.getOptions();
 
@@ -226,7 +218,8 @@
             extractToEPRInformation(toBlock,
                                     messageContextOptions,
                                     header,
-                                    namespace);
+                                    namespace,
+                                    disableRefparamExtract);
         }
         if (messageIDBlock != null && !ignoreHeaders[MESSAGEID_FLAG]) {
             extractMessageIDInformation(messageIDBlock, messageContext);
@@ -257,55 +250,84 @@
         }
 
         // check for the presence of madatory addressing headers
-        checkForMandatoryHeaders(checkedHeaderNames, messageContext);
+        checkForMandatoryHeaders(checkedHeaderNames, messageContext, namespace);
 
         // provide default values for headers that have not been found.
-        setDefaults(checkedHeaderNames, messageContext);
+        setDefaults(checkedHeaderNames, messageContext, namespace);
 
         return true;
     }
 
-    // Copied from SOAPHeaderImpl.java - some reconciliation probably a good idea....
-    protected boolean isInRole(SOAPHeaderBlock soapHeaderBlock,
-                               RolePlayer rolePlayer,
-                               boolean isSOAP11) {
-        String role = soapHeaderBlock.getRole();
-
-        // 1. If role is ultimatedest, go by what the rolePlayer says
-        if (role == null || role.equals("") ||
-            (!isSOAP11 &&
-             role.equals(SOAP12Constants.SOAP_ROLE_ULTIMATE_RECEIVER))) {
-            return (rolePlayer == null || rolePlayer.isUltimateDestination());
+    private void checkForMandatoryHeaders(boolean[] alreadyFoundAddrHeader,
+                                            MessageContext messageContext,
+                                            String namespace) throws AxisFault {
+        if (Final.WSA_NAMESPACE.equals(namespace)) {
+            //Unable to validate the wsa:MessageID header here as we do not yet know which MEP
+            //is in effect.
+            // @see AddressingValidationHandler#checkMessageIDHeader
+            
+            if (!alreadyFoundAddrHeader[ACTION_FLAG]) {
+                AddressingFaultsHelper
+                .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION);
+            }
         }
+        else {
+            if (!alreadyFoundAddrHeader[TO_FLAG]) {
+                AddressingFaultsHelper.triggerMessageAddressingRequiredFault(messageContext, WSA_TO);
+            }
 
-        // 2. If role is next, always return true
-        if (role.equals(soapHeaderBlock.getVersion().getNextRoleURI())) return true;
+            if (!alreadyFoundAddrHeader[ACTION_FLAG]) {
+                AddressingFaultsHelper
+                        .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION);
+            }
 
-        // 3. If role is none, always return false
-        if (!isSOAP11 && role.equals(SOAP12Constants.SOAP_ROLE_NONE)) {
-            return false;
+            if (alreadyFoundAddrHeader[REPLYTO_FLAG] ||
+                    alreadyFoundAddrHeader[FAULTO_FLAG]) {
+
+                if (!alreadyFoundAddrHeader[MESSAGEID_FLAG]) {
+                    AddressingFaultsHelper
+                            .triggerMessageAddressingRequiredFault(messageContext, WSA_MESSAGE_ID);
+                }
+            }            
         }
+    }
 
-        // 4. Return t/f depending on match
-        List roles = (rolePlayer == null) ? null : rolePlayer.getRoles();
-        if (roles != null) {
-            for (int i = 0; i < roles.size(); i++) {
-                String thisRole = (String) roles.get(i);
-                if (thisRole.equals(role)) return true;
+    private void setDefaults(boolean[] alreadyFoundAddrHeader, MessageContext messageContext, String namespace) {
+        if (Final.WSA_NAMESPACE.equals(namespace)) {
+            //According to the WS-Addressing spec, we should default the wsa:To header to the
+            //anonymous URI. Doing that, however, might prevent a different value from being
+            //used instead, such as the transport URL. Therefore, we only apply the default
+            //on the inbound response side of a synchronous request-response exchange.
+            if (!alreadyFoundAddrHeader[TO_FLAG] && !messageContext.isServerSide()) {
+                if (log.isTraceEnabled()) {
+                    log.trace(messageContext.getLogIDString() +
+                    " setDefaults: Setting WS-Addressing default value for the To property.");
+                }
+                messageContext.setTo(new EndpointReference(Final.WSA_ANONYMOUS_URL));
+            }
+            
+            if (!alreadyFoundAddrHeader[REPLYTO_FLAG]) {
+                messageContext.setReplyTo(new EndpointReference(Final.WSA_ANONYMOUS_URL));
+                if (log.isTraceEnabled()) {
+                    log.trace(messageContext.getLogIDString() +
+                    " setDefaults: Setting WS-Addressing default value for the ReplyTo property.");
+                }
             }
         }
-
-        return false;
+        else {
+            //The none URI is not defined in the 2004/08 spec, but it is used here anyway
+            //as a flag to indicate the correct semantics to apply, i.e. in the 2004/08 spec
+            //the absence of a ReplyTo header indicates that a response is NOT required.
+            if (!alreadyFoundAddrHeader[REPLYTO_FLAG]) {
+                messageContext.setReplyTo(new EndpointReference(Final.WSA_NONE_URI));
+                if (log.isTraceEnabled()) {
+                    log.trace(
+                            "setDefaults: Setting WS-Addressing default value for the ReplyTo property.");
+                }
+            }            
+        }
     }
 
-    protected abstract void checkForMandatoryHeaders(boolean[] alreadyFoundAddrHeader,
-                                                     MessageContext messageContext)
-            throws AxisFault;
-
-    protected abstract void setDefaults(boolean[] alreadyFoundAddrHeader,
-                                        MessageContext messageContext) throws AxisFault;
-
-
     private void checkDuplicateHeaders(String addressingHeaderName, int headerFlag,
                                        boolean[] checkedHeaderNames, boolean[] ignoreHeaders,
                                        ArrayList duplicateHeaderNames) {//throws AxisFault {
@@ -325,10 +347,6 @@
         }
     }
 
-    protected abstract void extractToEprReferenceParameters(EndpointReference toEPR,
-                                                            SOAPHeader header, String namespace);
-
-
     private void extractRelatesToInformation(SOAPHeaderBlock soapHeaderBlock,
                                              Options messageContextOptions) {
         String address = soapHeaderBlock.getText();
@@ -409,7 +427,7 @@
 
     private void extractToEPRInformation(SOAPHeaderBlock soapHeaderBlock,
                                          Options messageContextOptions, SOAPHeader header,
-                                         String namespace) {
+                                         String namespace, boolean disableRefparamExtract) {
 
         EndpointReference epr;
         //here the addressing epr overidde what ever already there in the message context
@@ -435,6 +453,37 @@
 
         if (log.isTraceEnabled()) {
             log.trace("extractToEPRInformation: Extracted To EPR: " + epr);
+        }
+    }
+
+    private void extractToEprReferenceParameters(EndpointReference toEPR, SOAPHeader header,
+                                                   String namespace) {
+        if (Final.WSA_NAMESPACE.equals(namespace)) {
+            Iterator headerBlocks = header.getChildElements();
+            while (headerBlocks.hasNext()) {
+                OMElement headerElement = (OMElement)headerBlocks.next();
+                OMAttribute isRefParamAttr =
+                    headerElement.getAttribute(new QName(namespace, "IsReferenceParameter"));
+                if (log.isTraceEnabled()) {
+                    log.trace("extractToEprReferenceParameters: Checking header: " +
+                            headerElement.getQName());
+                }
+                if (isRefParamAttr != null && "true".equals(isRefParamAttr.getAttributeValue())) {
+                    toEPR.addReferenceParameter(headerElement);
+                    if (log.isTraceEnabled()) {
+                        log.trace("extractToEprReferenceParameters: Header: " +
+                                headerElement.getQName() +
+                        " has IsReferenceParameter attribute. Adding to toEPR.");
+                    }
+                }
+            }
+        }
+        else {
+            // there is no exact way to identify ref parameters for Submission version. So let's have a handler
+            // at the end of the flow, which puts all the handlers (which are of course mustUnderstand=false)
+            // as reference parameters
+
+            // TODO : Chinthaka
         }
     }
 

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandler.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandler.java Mon Jan 21 04:20:38 2008
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.axis2.handlers.addressing;
-
-import org.apache.axiom.soap.SOAPHeader;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.AddressingFaultsHelper;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.context.MessageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.ArrayList;
-
-public class AddressingSubmissionInHandler extends AddressingInHandler {
-
-    private static final Log log = LogFactory.getLog(AddressingSubmissionInHandler.class);
-
-    public AddressingSubmissionInHandler() {
-        addressingNamespace = Submission.WSA_NAMESPACE;
-        addressingVersion = "WS-Addressing Submission";
-    }
-
-
-    protected void extractToEprReferenceParameters(EndpointReference toEPR, SOAPHeader header,
-                                                   String namespace) {
-        // there is no exact way to identify ref parameters for Submission version. So let's have a handler
-        // at the end of the flow, which puts all the handlers (which are of course mustUnderstand=false)
-        // as reference parameters
-
-        // TODO : Chinthaka
-    }
-
-    protected void checkForMandatoryHeaders(boolean[] alreadyFoundAddrHeader,
-                                            MessageContext messageContext) throws AxisFault {
-        if (!alreadyFoundAddrHeader[TO_FLAG]) {
-            AddressingFaultsHelper.triggerMessageAddressingRequiredFault(messageContext, WSA_TO);
-        }
-
-        if (!alreadyFoundAddrHeader[ACTION_FLAG]) {
-            AddressingFaultsHelper
-                    .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION);
-        }
-
-        if (alreadyFoundAddrHeader[REPLYTO_FLAG] ||
-                alreadyFoundAddrHeader[FAULTO_FLAG]) {
-
-            if (!alreadyFoundAddrHeader[MESSAGEID_FLAG]) {
-                AddressingFaultsHelper
-                        .triggerMessageAddressingRequiredFault(messageContext, WSA_MESSAGE_ID);
-            }
-        }
-    }
-
-    protected void setDefaults(boolean[] alreadyFoundAddrHeader, MessageContext messageContext) {
-        //The none URI is not defined in the 2004/08 spec, but it is used here anyway
-        //as a flag to indicate the correct semantics to apply, i.e. in the 2004/08 spec
-        //the absence of a ReplyTo header indicates that a response is NOT required.
-        if (!alreadyFoundAddrHeader[REPLYTO_FLAG]) {
-        	messageContext.setReplyTo(new EndpointReference(Final.WSA_NONE_URI));
-            if (log.isTraceEnabled()) {
-                log.trace(
-                        "setDefaults: Setting WS-Addressing default value for the ReplyTo property.");
-            }
-        }
-    }
-}

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java Mon Jan 21 04:20:38 2008
@@ -46,7 +46,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        inHandler = new AddressingFinalInHandler();
+        inHandler = new AddressingInHandler();
         addressingNamespace = AddressingConstants.Final.WSA_NAMESPACE;
         versionDirectory = "final";
         fromAddress = "http://www.w3.org/2005/08/addressing/anonymous";

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInFaultHandlerTest.java Mon Jan 21 04:20:38 2008
@@ -87,7 +87,7 @@
         MessageContext msgContext = new MessageContext();
         msgContext.setConfigurationContext(ConfigurationContextFactory.createDefaultConfigurationContext());
         msgContext.setEnvelope(envelope);
-        AddressingFinalInHandler afih = new AddressingFinalInHandler();
+        AddressingInHandler afih = new AddressingInHandler();
         afih.invoke(msgContext);
         AddressingInFaultHandler aifh = new AddressingInFaultHandler();
         aifh.invoke(msgContext);

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java Mon Jan 21 04:20:38 2008
@@ -35,7 +35,6 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.handlers.util.TestUtil;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -76,7 +75,7 @@
                 .getAxisConfiguration().getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
         Iterator addressingHeaderBlocks = header.getHeadersToProcess(rolePlayer, addressingNamespace);
         inHandler.extractAddressingInformation(header, mc, addressingHeaderBlocks,
-                                               addressingNamespace);
+                                               addressingNamespace, false);
     }
 
     protected Options extractAddressingInformationFromHeaders(RolePlayer rolePlayer) throws Exception{

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandlerTest.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandlerTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingSubmissionInHandlerTest.java Mon Jan 21 04:20:38 2008
@@ -41,7 +41,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        inHandler = new AddressingSubmissionInHandler();
+        inHandler = new AddressingInHandler();
         addressingNamespace = AddressingConstants.Submission.WSA_NAMESPACE;
         versionDirectory = "submission";
         fromAddress = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";

Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java Mon Jan 21 04:20:38 2008
@@ -34,7 +34,7 @@
 import javax.xml.namespace.QName;
 
 public class AddressingValidationHandlerTest extends TestCase implements AddressingConstants {
-    AddressingInHandler inHandler = new AddressingFinalInHandler();
+    AddressingInHandler inHandler = new AddressingInHandler();
     AddressingValidationHandler validationHandler = new AddressingValidationHandler();
     String addressingNamespace = AddressingConstants.Final.WSA_NAMESPACE;
     String versionDirectory = "final";

Modified: webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml Mon Jan 21 04:20:38 2008
@@ -69,6 +69,16 @@
                 <inherited>true</inherited>
                 <configuration>
                     <skip>false</skip>
+                    <systemProperties>
+                        <property>
+                            <name>maven.test.haltafterfailure</name>
+                            <value>false</value>
+                        </property>
+                        <property>
+                            <name>run.clustering.tests</name>
+                            <value>true</value>
+                        </property>
+                    </systemProperties>
                     <excludes>
                         <exclude>**/UpdateStateTest.java</exclude>
                         <exclude>**/ConfigurationManagerTest.java</exclude>

Modified: webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java Mon Jan 21 04:20:38 2008
@@ -65,7 +65,9 @@
                                  Channel.SEND_OPTIONS_SYNCHRONIZED_ACK |
                                  TribesClusterManager.MSG_ORDER_OPTION);
                 } else {
-                    channel.send(members, toByteMessage(msg), Channel.SEND_OPTIONS_ASYNCHRONOUS);
+                    channel.send(members, toByteMessage(msg),
+                                 Channel.SEND_OPTIONS_ASYNCHRONOUS |
+                                 TribesClusterManager.MSG_ORDER_OPTION);
                 }
                 if (log.isDebugEnabled()) {
                     log.debug("Sent " + msg + " to group");



---------------------------------------------------------------------
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