ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r690127 [11/11] - in /webservices/sandesha/trunk/c: ./ build/win32/ config/ ides/vc8/sandesha2/sandesha2/ include/ include/sandesha2/ samples/ samples/RMSampleService/ samples/rm_echo_1_0/ samples/rm_echo_1_0_large_sequence/ samples/rm_echo...
Date Fri, 29 Aug 2008 06:56:38 GMT
Modified: webservices/sandesha/trunk/c/src/wsrm/identifier.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/identifier.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/identifier.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/identifier.c Thu Aug 28 23:56:29 2008
@@ -83,12 +83,15 @@
         AXIS2_FREE(env->allocator, identifier->ns_val);
         identifier->ns_val = NULL;
     }
+
     if(identifier->str_id)
     {
     	AXIS2_FREE(env->allocator, identifier->str_id);
         identifier->str_id = NULL;
     }
+
 	AXIS2_FREE(env->allocator, identifier);
+
 	return AXIS2_SUCCESS;
 }
 
@@ -116,47 +119,60 @@
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
     om_element = axiom_node_get_data_element(om_node, env);
-    if(NULL == om_element)
+    if(!om_element)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
-    ident_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_IDENTIFIER, 
-                        identifier->ns_val, NULL); 
-    if(NULL == ident_qname)
+
+    ident_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_IDENTIFIER, identifier->ns_val,

+            NULL); 
+
+    if(!ident_qname)
     {
         return NULL;
     }
-    ident_part = axiom_element_get_first_child_with_qname(om_element, env,
-                        ident_qname, om_node, &ident_node);
+
+    ident_part = axiom_element_get_first_child_with_qname(om_element, env, ident_qname, om_node,

+            &ident_node);
+
     if(ident_qname)
+    {
         axutil_qname_free(ident_qname, env);
-    if(NULL == ident_part)
+    }
+
+    if(!ident_part)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
+
     ident_str = axiom_element_get_text(ident_part, env, ident_node);
-    if(NULL == ident_str)
+    if(!ident_str)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_EMPTY_OM_ELEMENT,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_EMPTY_OM_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
+
+    if(identifier->str_id)
+    {
+        AXIS2_FREE(env->allocator, identifier->str_id);
+    }
+
     identifier->str_id = axutil_strdup(env, ident_str);
-    if(NULL == identifier->str_id)
+    if(!identifier->str_id)
     {
         return NULL;
     }
+
     return identifier;
 }
 
 axiom_node_t* AXIS2_CALL 
 sandesha2_identifier_to_om_node(
     sandesha2_identifier_t *identifier,
-    const axutil_env_t *env, void *om_node)
+    const axutil_env_t *env, 
+    void *om_node)
 {
     axiom_namespace_t *rm_ns = NULL;
     axiom_element_t *id_element = NULL;
@@ -164,28 +180,27 @@
     
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
-    if(!identifier->str_id || 0 == axutil_strlen(
-                        identifier->str_id))
+    if(!identifier->str_id || 0 == axutil_strlen(identifier->str_id))
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, 
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
-    rm_ns = axiom_namespace_create(env, identifier->ns_val,
-                        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+
+    rm_ns = axiom_namespace_create(env, identifier->ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
     if(!rm_ns)
     {
         return NULL;
     }
-    id_element = axiom_element_create(env, NULL, 
-                        SANDESHA2_WSRM_COMMON_IDENTIFIER, rm_ns, &id_node);
+
+    id_element = axiom_element_create(env, (axiom_node_t *) om_node, 
+            SANDESHA2_WSRM_COMMON_IDENTIFIER, rm_ns, &id_node);
     if(!id_element)
     {
         return NULL;
     }
-    axiom_element_set_text(id_element, env, identifier->str_id, 
-                        id_node);
-    axiom_node_add_child((axiom_node_t*)om_node, env, id_node);
+
+    axiom_element_set_text(id_element, env, identifier->str_id, id_node);
+
     return (axiom_node_t*)om_node;
 }
 
@@ -222,7 +237,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/last_msg.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/last_msg.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/last_msg.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/last_msg.c Thu Aug 28 23:56:29 2008
@@ -173,7 +173,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/make_connection.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/make_connection.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/make_connection.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/make_connection.c Thu Aug 28 23:56:29 2008
@@ -29,7 +29,7 @@
 struct sandesha2_make_connection_t
 {
 	sandesha2_identifier_t *identifier;
-	sandesha2_address_t *address;
+	sandesha2_mc_address_t *address;
 	axis2_char_t *ns_val;
 };
 
@@ -169,13 +169,13 @@
     }
     if(address_element)
     {
-        make_conn->address = sandesha2_address_create(env, 
+        make_conn->address = sandesha2_mc_address_create(env, 
             make_conn->ns_val, NULL);
         if(!make_conn->address)
         {
             return NULL;
         }
-        sandesha2_address_from_om_node(make_conn->address, env, om_node);
+        sandesha2_mc_address_from_om_node(make_conn->address, env, om_node);
     }
     return make_conn;
 }
@@ -194,33 +194,45 @@
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
     soap_body = (axiom_soap_body_t*)om_node;
+
     if(!make_conn->identifier && !make_conn->address)
     {
         AXIS2_ERROR_SET(env->error, 
-            SANDESHA2_ERROR_INVALID_MAKE_CONNECTION_BOTH_IDENTIFER_AND_ADDRESS_NULL, 
-            AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid MakeConnection " \
-            "object. Both Identifier and Address are null");
+            SANDESHA2_ERROR_INVALID_MAKE_CONNECTION_BOTH_IDENTIFER_AND_ADDRESS_NULL, AXIS2_FAILURE);
+
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Invalid MakeConnection object. Both Identifier and Address are null");
         return NULL;
     }
-    rm_ns = axiom_namespace_create(env, make_conn->ns_val,
-        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+
+    rm_ns = axiom_namespace_create(env, make_conn->ns_val, SANDESHA2_WSMC_COMMON_NS_PREFIX_RM);
     if(!rm_ns)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Creating namespace for make
connection failed");
         return NULL;
     }
-    make_conn_element = axiom_element_create(env, NULL, 
-        SANDESHA2_WSRM_COMMON_MAKE_CONNECTION, rm_ns, &make_conn_node);
+
+    make_conn_element = axiom_element_create(env, NULL, SANDESHA2_WSRM_COMMON_MAKE_CONNECTION,

+            rm_ns, &make_conn_node);
+
     if(!make_conn_element)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Creating make connection
element failed");
         return NULL;
     }
+
     if(make_conn->identifier)
-        sandesha2_identifier_to_om_node(make_conn->identifier, env, 
-            make_conn_node);
+    {
+        sandesha2_identifier_to_om_node(make_conn->identifier, env, make_conn_node);
+    }
+
     if(make_conn->address)
-        sandesha2_address_to_om_node(make_conn->address, env, make_conn_node);
+    {
+        sandesha2_mc_address_to_om_node(make_conn->address, env, make_conn_node);
+    }
+
     axiom_soap_body_add_child(soap_body, env, make_conn_node);
+
     return axiom_soap_body_get_base_node(soap_body, env);
 }
 
@@ -242,7 +254,7 @@
  	return AXIS2_SUCCESS;
 }
 
-sandesha2_address_t * AXIS2_CALL
+sandesha2_mc_address_t * AXIS2_CALL
 sandesha2_make_connection_get_address(
     sandesha2_make_connection_t *make_conn,
     const axutil_env_t *env)
@@ -254,7 +266,7 @@
 sandesha2_make_connection_set_address(
     sandesha2_make_connection_t *make_conn,
     const axutil_env_t *env, 
-    sandesha2_address_t *address)
+    sandesha2_mc_address_t *address)
 {
 	make_conn->address = address;
  	return AXIS2_SUCCESS;
@@ -274,7 +286,7 @@
     axutil_qname_t *make_conn_qname = NULL;
     
     AXIS2_PARAM_CHECK(env->error, envelope, AXIS2_FAILURE);
-	
+    
     soap_body = axiom_soap_envelope_get_body(envelope, env);
     if(soap_body)
         body_node = axiom_soap_body_get_base_node(soap_body, env);
@@ -284,6 +296,7 @@
         SANDESHA2_WSRM_COMMON_MAKE_CONNECTION, make_conn->ns_val, NULL);
     if(!make_conn_qname)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create qname for
make connection");
         return AXIS2_FAILURE;
     }
     if(body_element)
@@ -296,6 +309,7 @@
      */
     if(node)
         axiom_node_detach(node, env);
+
     sandesha2_make_connection_to_om_node(make_conn, env, soap_body);
 	return AXIS2_SUCCESS;
 }
@@ -305,14 +319,21 @@
     const axutil_env_t *env, 
     axis2_char_t *namespace)
 {
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2005_02_NS_URI))
+    if(!axutil_strcmp(namespace, SANDESHA2_SPEC_2005_02_NS_URI))
     {
         return AXIS2_FALSE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+
+    if(!axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
+    {
+        return AXIS2_FALSE;
+    }
+    
+    if(!axutil_strcmp(namespace, MAKE_CONNECTION_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }
+
     return AXIS2_FALSE;
 }
 

Modified: webservices/sandesha/trunk/c/src/wsrm/msg_number.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/msg_number.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/msg_number.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/msg_number.c Thu Aug 28 23:56:29 2008
@@ -160,7 +160,8 @@
     axiom_namespace_t *rm_ns = NULL;
     axiom_element_t *mn_element = NULL;
     axiom_node_t *mn_node = NULL;
-    axis2_char_t *str_num = NULL;
+    /*axis2_char_t *str_num = NULL;*/
+    axis2_char_t str_num[32];
     
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
@@ -182,7 +183,8 @@
     {
         return NULL;
     }
-    str_num = AXIS2_MALLOC(env->allocator, 32*sizeof(axis2_char_t));
+
+    /*str_num = AXIS2_MALLOC(env->allocator, 32 * sizeof(axis2_char_t));*/
     sprintf(str_num, "%ld", msg_number->msg_num);
     axiom_element_set_text(mn_element, env, str_num, mn_node);
     axiom_node_add_child((axiom_node_t*)om_node, env, mn_node);
@@ -216,7 +218,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/msg_pending.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/msg_pending.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/msg_pending.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/msg_pending.c Thu Aug 28 23:56:29 2008
@@ -254,7 +254,7 @@
     {
         return AXIS2_FALSE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/nack.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/nack.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/nack.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/nack.c Thu Aug 28 23:56:29 2008
@@ -205,7 +205,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/rm_elements.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Thu Aug 28 23:56:29 2008
@@ -179,48 +179,53 @@
             rm_elements->create_seq, env, create_seq_node);
     }
     
-    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_CREATE_SEQ_RESPONSE, 
-                        rm_ns_val, NULL);
-    create_seq_res_element = axiom_element_get_first_child_with_qname(
-        body_element, env, qname, body_node, &create_seq_res_node);
+    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_CREATE_SEQ_RESPONSE, rm_ns_val,
NULL);
+    create_seq_res_element = axiom_element_get_first_child_with_qname(body_element, env,
qname, 
+            body_node, &create_seq_res_node);
+
     if(qname)
+    {
         axutil_qname_free(qname, env);
+    }
+
     if(create_seq_res_node)
     {
-        rm_elements->create_seq_res = sandesha2_create_seq_res_create(env, 
-                        rm_ns_val, addr_ns_val);
-        sandesha2_create_seq_res_from_om_node(
-            rm_elements->create_seq_res, env, create_seq_res_node);
+        rm_elements->create_seq_res = sandesha2_create_seq_res_create(env, rm_ns_val,
addr_ns_val);
+        sandesha2_create_seq_res_from_om_node(rm_elements->create_seq_res, env, create_seq_res_node);
     }
     
-    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, 
-                        rm_ns_val, NULL);
-    terminate_seq_element = axiom_element_get_first_child_with_qname(
-        body_element, env, qname, body_node, &terminate_seq_node);
+    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, rm_ns_val, NULL);
+    terminate_seq_element = axiom_element_get_first_child_with_qname(body_element, env, qname,

+            body_node, &terminate_seq_node);
+
     if(qname)
+    {
         axutil_qname_free(qname, env);
+    }
+
     if(terminate_seq_node)
     {
-        rm_elements->terminate_seq = sandesha2_terminate_seq_create(env, 
-            rm_ns_val);
-        sandesha2_terminate_seq_from_om_node(
-            rm_elements->terminate_seq, env, terminate_seq_node);
+        rm_elements->terminate_seq = sandesha2_terminate_seq_create(env, rm_ns_val);
+        sandesha2_terminate_seq_from_om_node(rm_elements->terminate_seq, env, terminate_seq_node);
     }
-    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ_RESPONSE, 
-        rm_ns_val, NULL);
-    terminate_seq_res_element = axiom_element_get_first_child_with_qname(
-        body_element, env, qname, body_node, &terminate_seq_res_node);
+
+    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ_RESPONSE, rm_ns_val,
NULL);
+    terminate_seq_res_element = axiom_element_get_first_child_with_qname(body_element, env,
qname, 
+            body_node, &terminate_seq_res_node);
+
     if(qname)
+    {
         axutil_qname_free(qname, env);
+    }
+
     if(terminate_seq_res_node)
     {
-        rm_elements->terminate_seq_res = sandesha2_terminate_seq_res_create(
-            env, rm_ns_val);
-        sandesha2_terminate_seq_res_from_om_node(
-            rm_elements->terminate_seq_res, env, terminate_seq_res_node);
+        rm_elements->terminate_seq_res = sandesha2_terminate_seq_res_create(env, rm_ns_val);
+        sandesha2_terminate_seq_res_from_om_node(rm_elements->terminate_seq_res, env,

+                terminate_seq_res_node);
     }
-    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_CLOSE_SEQ, rm_ns_val, 
-        NULL);
+
+    qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_CLOSE_SEQ, rm_ns_val, NULL);
     close_seq_element = axiom_element_get_first_child_with_qname(body_element, 
         env, qname, body_node, &close_seq_node);
     if(qname)
@@ -557,25 +562,49 @@
     {
         axutil_array_list_t *headers = NULL;
         
-        headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
-            soap_header, env, SANDESHA2_SPEC_2005_02_NS_URI);
+        headers = axiom_soap_header_get_header_blocks_with_namespace_uri(soap_header, env,

+                SANDESHA2_SPEC_2005_02_NS_URI);
         if(headers && 0 < axutil_array_list_size(headers, env))
         {
             if(headers)
+            {
                 axutil_array_list_free(headers, env);
+            }
+
             return SANDESHA2_SPEC_2005_02_NS_URI;
         }
-        headers = axiom_soap_header_get_header_blocks_with_namespace_uri(
-            soap_header, env, SANDESHA2_SPEC_2006_08_NS_URI);                
+
+        headers = axiom_soap_header_get_header_blocks_with_namespace_uri(soap_header, env,

+                SANDESHA2_SPEC_2007_02_NS_URI);
+
         if(headers && 0 < axutil_array_list_size(headers, env))
         {
             if(headers)
+            {
                 axutil_array_list_free(headers, env);
-            return SANDESHA2_SPEC_2006_08_NS_URI;
+            }
+
+            return SANDESHA2_SPEC_2007_02_NS_URI;
+        }
+        
+        headers = axiom_soap_header_get_header_blocks_with_namespace_uri(soap_header, env,

+                MAKE_CONNECTION_SPEC_2007_02_NS_URI);
+
+        if(headers && 0 < axutil_array_list_size(headers, env))
+        {
+            if(headers)
+            {
+                axutil_array_list_free(headers, env);
+            }
+
+            return MAKE_CONNECTION_SPEC_2007_02_NS_URI;
         }
     }
+
     if(!action)
+    {
         return NULL;
+    }
     
     if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2005_02_ACTION_CREATE_SEQ))
         return SANDESHA2_SPEC_2005_02_NS_URI;
@@ -586,22 +615,25 @@
     if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2005_02_ACTION_TERMINATE_SEQ))
         return SANDESHA2_SPEC_2005_02_NS_URI;
         
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_CREATE_SEQ))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_CREATE_SEQ_RESPONSE))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_SEQ_ACKNOWLEDGEMENT))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_TERMINATE_SEQ))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_CLOSE_SEQ))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_TERMINATE_SEQ_RESPONSE))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_CLOSE_SEQ_RESPONSE))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
-    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2006_08_ACTION_MAKE_CONNECTION))
-        return SANDESHA2_SPEC_2006_08_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_CREATE_SEQ))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_CREATE_SEQ_RESPONSE))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_SEQ_ACKNOWLEDGEMENT))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_TERMINATE_SEQ))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_CLOSE_SEQ))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_TERMINATE_SEQ_RESPONSE))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+    if(0 == axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_CLOSE_SEQ_RESPONSE))
+        return SANDESHA2_SPEC_2007_02_NS_URI;
+
+    if(!axutil_strcmp(action, SANDESHA2_SPEC_2007_02_ACTION_MAKE_CONNECTION))
+    {
+        return MAKE_CONNECTION_SPEC_2007_02_NS_URI;
+    }
     
     return NULL;
     

Modified: webservices/sandesha/trunk/c/src/wsrm/seq_ack.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/seq_ack.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/seq_ack.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/seq_ack.c Thu Aug 28 23:56:29 2008
@@ -33,6 +33,7 @@
 	sandesha2_ack_final_t *ack_final;
 	axis2_bool_t must_understand;
 	axis2_char_t *ns_val;
+    int ref;
 };
 
 static axis2_bool_t AXIS2_CALL 
@@ -69,6 +70,7 @@
     seq_ack->ack_none = NULL;
     seq_ack->ack_final = NULL;
     seq_ack->must_understand = AXIS2_FALSE;
+    seq_ack->ref = 1;
     
     seq_ack->ns_val = (axis2_char_t *)axutil_strdup(env, ns_val);
     seq_ack->ack_range_list = axutil_array_list_create(env, 
@@ -95,11 +97,18 @@
     sandesha2_seq_ack_t *seq_ack, 
     const axutil_env_t *env)
 {
+
+    if (--(seq_ack->ref) > 0)
+    {
+        return AXIS2_SUCCESS;
+    }
+
     if(NULL != seq_ack->ns_val)
     {
         AXIS2_FREE(env->allocator, seq_ack->ns_val);
         seq_ack->ns_val = NULL;
     }
+
     if(seq_ack->identifier)
     {
         sandesha2_identifier_free(seq_ack->identifier, env);
@@ -140,6 +149,15 @@
 	return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+sandesha2_seq_ack_increment_ref(
+    sandesha2_seq_ack_t * seq_ack,
+    const axutil_env_t * env)
+{
+    seq_ack->ref++;
+    return AXIS2_SUCCESS;
+}
+
 axis2_char_t* AXIS2_CALL 
 sandesha2_seq_ack_get_namespace_value (
     sandesha2_seq_ack_t *seq_ack,
@@ -304,7 +322,8 @@
 axiom_node_t* AXIS2_CALL 
 sandesha2_seq_ack_to_om_node(
     sandesha2_seq_ack_t *seq_ack,
-    const axutil_env_t *env, void *om_node)
+    const axutil_env_t *env, 
+    void *om_node)
 {
     axiom_namespace_t *rm_ns = NULL;
     axiom_node_t *sa_node = NULL;
@@ -317,68 +336,68 @@
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
     soap_header = (axiom_soap_header_t*)om_node;
-    rm_ns = axiom_namespace_create(env, seq_ack->ns_val,
-        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
-    if(NULL == rm_ns)
+    rm_ns = axiom_namespace_create(env, seq_ack->ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+    if(!rm_ns)
     {
         return NULL;
     }
-    sa_block = axiom_soap_header_add_header_block(soap_header, env, 
-        SANDESHA2_WSRM_COMMON_SEQ_ACK, rm_ns);
-    if(NULL == sa_block)
+
+    sa_block = axiom_soap_header_add_header_block(soap_header, env, SANDESHA2_WSRM_COMMON_SEQ_ACK,

+            rm_ns);
+    
+    if (rm_ns)
+    {
+        axiom_namespace_free(rm_ns, env);
+        rm_ns = NULL;
+    }
+
+    if(!sa_block)
     {
         return NULL;
     }
-    if(NULL == seq_ack->identifier)
+
+    if(!seq_ack->identifier)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, 
-            AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
-    axiom_soap_header_block_set_must_understand_with_bool(sa_block, env, 
-        seq_ack->must_understand);
+
+    axiom_soap_header_block_set_must_understand_with_bool(sa_block, env, seq_ack->must_understand);
     sa_node = axiom_soap_header_block_get_base_node(sa_block, env);
     sandesha2_identifier_to_om_node(seq_ack->identifier, env, sa_node);
     size = axutil_array_list_size(seq_ack->ack_range_list, env);
+
     for(i = 0; i < size; i++)
     {
         sandesha2_ack_range_t *ack_range = NULL;
-        ack_range = (sandesha2_ack_range_t*)axutil_array_list_get(
-                        seq_ack->ack_range_list, env, i);
+        ack_range = (sandesha2_ack_range_t*)axutil_array_list_get(seq_ack->ack_range_list,
env, i);
         sandesha2_ack_range_to_om_node(ack_range, env, sa_node);
     }
     for(i = 0; i < axutil_array_list_size(seq_ack->nack_list, env); i++)
     {
         sandesha2_nack_t *nack = NULL;
-        nack = (sandesha2_nack_t*)axutil_array_list_get(
-                        seq_ack->nack_list, env, i);
-        sandesha2_seq_ack_to_om_node((sandesha2_seq_ack_t *)nack, env, sa_node);
-    }
-    rm_spec_ver = sandesha2_spec_specific_consts_get_spec_ver_str(env,
-                        seq_ack->ns_val);
-    if(NULL == seq_ack->ack_none && 0 == axutil_array_list_size(
-        seq_ack->ack_range_list, env) &&
+        nack = (sandesha2_nack_t*)axutil_array_list_get(seq_ack->nack_list, env, i);
+        sandesha2_nack_to_om_node((sandesha2_nack_t *)nack, env, sa_node);
+    }
+
+    rm_spec_ver = sandesha2_spec_specific_consts_get_spec_ver_str(env, seq_ack->ns_val);
+    if(!seq_ack->ack_none && 0 == axutil_array_list_size(seq_ack->ack_range_list,
env) &&
         0 == axutil_array_list_size(seq_ack->nack_list, env)
-        && AXIS2_TRUE == 
-        sandesha2_spec_specific_consts_is_ack_none_allowed(env,
-        rm_spec_ver))
-    {
-        seq_ack->ack_none = sandesha2_ack_none_create(env, 
-                        seq_ack->ns_val);
-        if(NULL == seq_ack->ack_none)
+        && sandesha2_spec_specific_consts_is_ack_none_allowed(env, rm_spec_ver))
+    {
+        seq_ack->ack_none = sandesha2_ack_none_create(env, seq_ack->ns_val);
+        if(!seq_ack->ack_none)
         {
             return NULL;
         }
     }
-    if(NULL != seq_ack->ack_none)
+    if(seq_ack->ack_none)
     {
-        if(AXIS2_TRUE != sandesha2_spec_specific_consts_is_ack_none_allowed(env,
-            rm_spec_ver) || 0 != axutil_array_list_size(
-            seq_ack->ack_range_list, env) || 0 != 
+        if(!sandesha2_spec_specific_consts_is_ack_none_allowed(env, rm_spec_ver) || 
+                0 != axutil_array_list_size(seq_ack->ack_range_list, env) || 0 != 
             axutil_array_list_size(seq_ack->nack_list, env))
         {
-            AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACK_NONE_NOT_ALLOWED, 
-                AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACK_NONE_NOT_ALLOWED, AXIS2_FAILURE);
             return NULL;
         }
         else
@@ -386,14 +405,12 @@
             sandesha2_ack_none_to_om_node(seq_ack->ack_none, env, sa_node);   
         }                            
     }
-    if(NULL != seq_ack->ack_final)
+    if(seq_ack->ack_final)
     {
-        if(AXIS2_TRUE != sandesha2_spec_specific_consts_is_ack_final_allowed(
-            env, rm_spec_ver) ||  0 != axutil_array_list_size(
-            seq_ack->nack_list, env))
+        if(!sandesha2_spec_specific_consts_is_ack_final_allowed(env, rm_spec_ver) ||  
+                0 != axutil_array_list_size(seq_ack->nack_list, env))
         {
-            AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACK_FINAL_NOT_ALLOWED, 
-                AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACK_FINAL_NOT_ALLOWED, AXIS2_FAILURE);
             return NULL;
         }
         else
@@ -401,9 +418,11 @@
             sandesha2_ack_final_to_om_node(seq_ack->ack_final, env, sa_node);  
         }
     }
+
     /**
      *  we do not need to add the header block as it is already done
      */
+
     return sa_node;
 }
 
@@ -486,7 +505,7 @@
     axiom_soap_envelope_t *envelope)
 {
     axiom_soap_header_t *soap_header = NULL;
-    axutil_qname_t *seq_ack_qname = NULL;
+    /*axutil_qname_t *seq_ack_qname = NULL;*/
     
     AXIS2_PARAM_CHECK(env->error, envelope, AXIS2_FAILURE);
     
@@ -494,16 +513,20 @@
     /**
      * Remove if old exists
      */
-    seq_ack_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ_ACK,
-        seq_ack->ns_val, NULL);
+    /*seq_ack_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ_ACK, seq_ack->ns_val,
NULL);
     if(!seq_ack_qname)
     {
         return AXIS2_FAILURE;
     }
+
     axiom_soap_header_remove_header_block(soap_header, env, seq_ack_qname);
     if(seq_ack_qname)
+    {
         axutil_qname_free(seq_ack_qname, env);
+    }*/
+
     sandesha2_seq_ack_to_om_node(seq_ack, env, soap_header);
+
 	return AXIS2_SUCCESS;
 }
 
@@ -516,7 +539,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/seq_fault.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/seq_fault.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/seq_fault.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/seq_fault.c Thu Aug 28 23:56:29 2008
@@ -211,7 +211,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/seq_offer.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/seq_offer.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/seq_offer.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/seq_offer.c Thu Aug 28 23:56:29 2008
@@ -24,8 +24,10 @@
 struct sandesha2_seq_offer_t
 {
 	sandesha2_identifier_t *identifier;
+	sandesha2_endpoint_t *endpoint;
 	sandesha2_expires_t *expires;
 	axis2_char_t *ns_val;
+    axis2_char_t *addr_ns_val;
 };
 
 static axis2_bool_t AXIS2_CALL 
@@ -36,10 +38,12 @@
 AXIS2_EXTERN sandesha2_seq_offer_t* AXIS2_CALL
 sandesha2_seq_offer_create(
     const axutil_env_t *env,  
-    axis2_char_t *ns_val)
+    axis2_char_t *ns_val,
+	axis2_char_t *addr_ns_val)
 {
     sandesha2_seq_offer_t *seq_offer = NULL;
     AXIS2_PARAM_CHECK(env->error, ns_val, NULL);
+    AXIS2_PARAM_CHECK(env->error, addr_ns_val, NULL);
     
     if(AXIS2_FALSE == sandesha2_seq_offer_is_namespace_supported(env, ns_val))
     {
@@ -55,8 +59,11 @@
 		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
 	}
+
     seq_offer->ns_val = (axis2_char_t *)axutil_strdup(env, ns_val);
+    seq_offer->addr_ns_val = (axis2_char_t *)axutil_strdup(env, addr_ns_val);
     seq_offer->identifier = NULL;
+    seq_offer->endpoint = NULL;
     seq_offer->expires = NULL;
     
 	return seq_offer;
@@ -73,7 +80,25 @@
         AXIS2_FREE(env->allocator, seq_offer->ns_val);
         seq_offer->ns_val = NULL;
     }
-    seq_offer->identifier = NULL;
+
+    if(seq_offer->addr_ns_val)
+    {
+        AXIS2_FREE(env->allocator, seq_offer->addr_ns_val);
+        seq_offer->addr_ns_val = NULL;
+    }
+
+    if(seq_offer->identifier)
+    {
+        sandesha2_identifier_free(seq_offer->identifier, env);
+        seq_offer->identifier = NULL;
+    }
+    
+    if(seq_offer->endpoint)
+    {
+        sandesha2_endpoint_free(seq_offer->endpoint, env);
+        seq_offer->endpoint = NULL;
+    }
+
     seq_offer->expires = NULL;
 	AXIS2_FREE(env->allocator, seq_offer);
 	return AXIS2_SUCCESS;
@@ -126,13 +151,25 @@
             AXIS2_FAILURE);
         return NULL;
     }
-    seq_offer->identifier = sandesha2_identifier_create(env, 
-        seq_offer->ns_val); 
-    if(NULL == seq_offer->identifier)
+
+    seq_offer->identifier = sandesha2_identifier_create(env, seq_offer->ns_val); 
+    if(!seq_offer->identifier)
     {
         return NULL;
     }
+
     sandesha2_identifier_from_om_node(seq_offer->identifier, env, so_node);
+
+    seq_offer->endpoint = sandesha2_endpoint_create(env, NULL, seq_offer->ns_val, 
+            seq_offer->addr_ns_val); 
+
+    if(!seq_offer->endpoint)
+    {
+        return NULL;
+    }
+
+    sandesha2_endpoint_from_om_node(seq_offer->endpoint, env, so_node);
+
     exp_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_EXPIRES,
         seq_offer->ns_val, NULL);
     if(NULL == exp_qname)
@@ -168,31 +205,38 @@
     
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
     
-    if(NULL == seq_offer->identifier)
+    if(!seq_offer->identifier)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, 
-            AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
-    rm_ns = axiom_namespace_create(env, seq_offer->ns_val,
-        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
-    if(NULL == rm_ns)
+    
+    rm_ns = axiom_namespace_create(env, seq_offer->ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+    if(!rm_ns)
     {
         return NULL;
     }
-    so_element = axiom_element_create(env, NULL, 
-        SANDESHA2_WSRM_COMMON_SEQ_OFFER, rm_ns, &so_node);
-    if(NULL == so_element)
+
+    so_element = axiom_element_create(env, NULL, SANDESHA2_WSRM_COMMON_SEQ_OFFER, rm_ns,
&so_node);
+    if(!so_element)
     {
         return NULL;
     }
+
     sandesha2_identifier_to_om_node(seq_offer->identifier, env, so_node);
-    if(NULL != seq_offer->expires)
+
+    if(seq_offer->endpoint)
+    {
+        sandesha2_endpoint_to_om_node(seq_offer->endpoint, env, so_node);
+    }
+
+    if(seq_offer->expires)
     {
-        sandesha2_seq_offer_to_om_node((sandesha2_seq_offer_t *)
-            seq_offer->expires, env, so_node);
+        sandesha2_seq_offer_to_om_node((sandesha2_seq_offer_t *) seq_offer->expires, env,
so_node);
     }
+
     axiom_node_add_child((axiom_node_t*)om_node, env, so_node);
+
     return (axiom_node_t*)om_node;
 }
 
@@ -210,17 +254,40 @@
     const axutil_env_t *env, 
     sandesha2_identifier_t *identifier)
 {
- 	if(NULL != seq_offer->identifier)
+ 	if(seq_offer->identifier)
 	{
-	/*
-		SANDESHA2_IDENTIFIER_FREE(seq_offer->identifier, env);
-		seq_offer->identifier = NULL;
-    */		
+		sandesha2_identifier_free(seq_offer->identifier, env);
+		seq_offer->identifier = NULL;	
 	}
+
 	seq_offer->identifier = identifier;
  	return AXIS2_SUCCESS;
 }
 
+sandesha2_endpoint_t * AXIS2_CALL
+sandesha2_seq_offer_get_endpoint(
+    sandesha2_seq_offer_t *seq_offer,
+    const axutil_env_t *env)
+{
+	return seq_offer->endpoint;
+}                    	
+
+axis2_status_t AXIS2_CALL                 
+sandesha2_seq_offer_set_endpoint(
+    sandesha2_seq_offer_t *seq_offer,
+    const axutil_env_t *env, 
+    sandesha2_endpoint_t *endpoint)
+{
+ 	if(seq_offer->endpoint)
+	{
+		sandesha2_endpoint_free(seq_offer->endpoint, env);
+		seq_offer->endpoint = NULL;	
+	}
+
+	seq_offer->endpoint = endpoint;
+ 	return AXIS2_SUCCESS;
+}
+
 sandesha2_expires_t * AXIS2_CALL                    	
 sandesha2_seq_offer_get_expires(
     sandesha2_seq_offer_t *seq_offer,
@@ -247,7 +314,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/sequence.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/sequence.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/sequence.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/sequence.c Thu Aug 28 23:56:29 2008
@@ -131,45 +131,61 @@
     axiom_node_t *lm_node = NULL;
     axutil_qname_t *lm_qname = NULL; 
     AXIS2_PARAM_CHECK(env->error, seq_node, NULL);
+        
     seq_part = axiom_node_get_data_element(seq_node, env);
     if(!seq_part)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT,
-            AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[sandesha2] Sequence element not found in the sequence node");
+
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_OM_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
+
     seq->identifier = sandesha2_identifier_create(env, seq->ns_val);
     if(!seq->identifier)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[sandesha2] Sequence identifier not found in the sequence node");
+
         return NULL;
     }
+
     sandesha2_identifier_from_om_node(seq->identifier, env, seq_node);
     seq->msg_num= sandesha2_msg_number_create(env, seq->ns_val);
     if(!seq->msg_num)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[sandesha2] Sequence message number not found in the sequence node");
+
         return NULL;
     }
+
     sandesha2_msg_number_from_om_node(seq->msg_num, env, seq_node);
-    lm_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_LAST_MSG,
-        seq->ns_val, NULL);
+    lm_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_LAST_MSG, seq->ns_val, NULL);
+    
     if(!lm_qname)
     {
         return NULL;
     }
-    lm_part = axiom_element_get_first_child_with_qname(seq_part, env, 
-        lm_qname, seq_node, &lm_node);
+
+    lm_part = axiom_element_get_first_child_with_qname(seq_part, env, lm_qname, seq_node,
&lm_node);
     if(lm_qname)
+    {
         axutil_qname_free(lm_qname, env);
+    }
+
     if(lm_part)
     {
-        seq->last_msg = sandesha2_last_msg_create(env, 
-            seq->ns_val);
+        seq->last_msg = sandesha2_last_msg_create(env, seq->ns_val);
         if(!seq->last_msg)
         {
             return NULL;
         }
+
         sandesha2_last_msg_from_om_node(seq->last_msg, env, lm_node);
     }
+
     return seq;
 }
 
@@ -192,25 +208,28 @@
             AXIS2_FAILURE);
         return NULL;
     }
-    rm_ns = axiom_namespace_create(env, seq->ns_val,
-        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
-    if(!rm_ns)
+    rm_ns = axiom_namespace_create(env, seq->ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+    if(rm_ns)
     {
-        return NULL;
+        seq_block = axiom_soap_header_add_header_block(soap_header, env, SANDESHA2_WSRM_COMMON_SEQ,

+                rm_ns);
+        axiom_namespace_free(rm_ns, env);
     }
-    seq_block = axiom_soap_header_add_header_block(soap_header, env, 
-        SANDESHA2_WSRM_COMMON_SEQ, rm_ns);
+
     if(!seq_block)
     {
         return NULL;
     }
-    axiom_soap_header_block_set_must_understand_with_bool(seq_block, env, 
-         seq->must_understand);
+
+    axiom_soap_header_block_set_must_understand_with_bool(seq_block, env, seq->must_understand);
     seq_node = axiom_soap_header_block_get_base_node(seq_block, env);
     sandesha2_identifier_to_om_node(seq->identifier, env, seq_node);
     sandesha2_msg_number_to_om_node(seq->msg_num, env, seq_node);
     if(seq->last_msg)
+    {
         sandesha2_last_msg_to_om_node(seq->last_msg, env, seq_node);
+    }
+
     return seq_node;
 }
 
@@ -292,22 +311,27 @@
 {
 	axiom_soap_header_t *soap_header = NULL;
     axutil_qname_t *seq_qname = NULL;
+
     AXIS2_PARAM_CHECK(env->error, envelope, AXIS2_FAILURE);
     soap_header = axiom_soap_envelope_get_header(envelope, env);
+
     /**
      * Remove if old exists
      */
-    seq_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ, 
-        seq->ns_val, NULL);
+    seq_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ, seq->ns_val, NULL);
     if(!seq_qname)
     {
         return AXIS2_FAILURE;
     }
     axiom_soap_header_remove_header_block(soap_header, env, seq_qname);
-    sandesha2_seq_to_om_node((sandesha2_seq_t*)seq, env, 
-        soap_header);
+
     if(seq_qname)
+    {
         axutil_qname_free(seq_qname, env);
+    }
+    
+    sandesha2_seq_to_om_node((sandesha2_seq_t*)seq, env, soap_header);
+
 	return AXIS2_SUCCESS;
 }
 
@@ -320,7 +344,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c Thu Aug 28 23:56:29 2008
@@ -118,6 +118,7 @@
             AXIS2_FAILURE);
         return NULL;
     }
+
     terminate_seq->identifier = sandesha2_identifier_create(env, 
         terminate_seq->ns_val);
     if(!terminate_seq->identifier)
@@ -144,25 +145,25 @@
     
     if(!terminate_seq->identifier)
     {
-        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, 
-            AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_OM_NULL_ELEMENT, AXIS2_FAILURE);
         return NULL;
     }
-    rm_ns = axiom_namespace_create(env, terminate_seq->ns_val,
-        SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
+
+    rm_ns = axiom_namespace_create(env, terminate_seq->ns_val, SANDESHA2_WSRM_COMMON_NS_PREFIX_RM);
     if(!rm_ns)
     {
         return NULL;
     }
-    ts_element = axiom_element_create(env, NULL, 
-        SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, rm_ns, &ts_node);
+
+    ts_element = axiom_element_create(env, (axiom_node_t *) om_node, 
+            SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, rm_ns, &ts_node);
+
     if(!ts_element)
     {
         return NULL;
     }
-    sandesha2_identifier_to_om_node(terminate_seq->identifier, env, 
-        ts_node);
-    axiom_node_add_child((axiom_node_t*)om_node, env, ts_node);
+
+    sandesha2_identifier_to_om_node(terminate_seq->identifier, env, ts_node);
     return (axiom_node_t*)om_node;
 }
 
@@ -182,9 +183,10 @@
 {
  	if(terminate_seq->identifier)
 	{
-/*		SANDESHA2_IDENTIFIER_FREE(terminate_seq->identifier, env); 
-		terminate_seq->identifier = NULL;  */
+		sandesha2_identifier_free(terminate_seq->identifier, env); 
+		terminate_seq->identifier = NULL; 
 	}
+
 	terminate_seq->identifier = identifier;
  	return AXIS2_SUCCESS;
 }
@@ -201,18 +203,22 @@
 	/**
      * Remove if old exists
      */
-    ts_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, 
-        terminate_seq->ns_val, NULL);
+    ts_qname = axutil_qname_create(env, SANDESHA2_WSRM_COMMON_TERMINATE_SEQ, terminate_seq->ns_val,

+            NULL);
+
     if(!ts_qname)
     {
         return AXIS2_FAILURE;
     }
+
     sandesha2_utils_remove_soap_body_part(env, envelope, ts_qname);
-    body_node = axiom_soap_body_get_base_node(axiom_soap_envelope_get_body(
-        envelope, env), env);  
+    body_node = axiom_soap_body_get_base_node(axiom_soap_envelope_get_body(envelope, env),
env);  
     sandesha2_terminate_seq_to_om_node(terminate_seq, env, body_node);
     if(ts_qname)
+    {
         axutil_qname_free(ts_qname, env);
+    }
+
 	return AXIS2_SUCCESS;
 }
 
@@ -225,7 +231,7 @@
     {
         return AXIS2_TRUE;
     }
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }

Modified: webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c?rev=690127&r1=690126&r2=690127&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c Thu Aug 28 23:56:29 2008
@@ -178,10 +178,10 @@
 {
  	if(terminate_seq_res->identifier)
 	{
-/*		SANDESHA2_IDENTIFIER_FREE(terminate_seq_res->identifier, env);
+		sandesha2_identifier_free(terminate_seq_res->identifier, env);
 		terminate_seq_res->identifier = NULL;
-*/		
 	}
+
 	terminate_seq_res->identifier = identifier;
  	return AXIS2_SUCCESS;
 }
@@ -222,7 +222,7 @@
     const axutil_env_t *env, 
     axis2_char_t *namespace)
 {
-    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2006_08_NS_URI))
+    if(0 == axutil_strcmp(namespace, SANDESHA2_SPEC_2007_02_NS_URI))
     {
         return AXIS2_TRUE;
     }



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


Mime
View raw message