axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r804934 - in /webservices/axis2/trunk/c/neethi/src: assertion.c engine.c
Date Mon, 17 Aug 2009 10:50:40 GMT
Author: shankar
Date: Mon Aug 17 10:50:40 2009
New Revision: 804934

URL: http://svn.apache.org/viewvc?rev=804934&view=rev
Log:
fixing assertion serialization

Modified:
    webservices/axis2/trunk/c/neethi/src/assertion.c
    webservices/axis2/trunk/c/neethi/src/engine.c

Modified: webservices/axis2/trunk/c/neethi/src/assertion.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/assertion.c?rev=804934&r1=804933&r2=804934&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/assertion.c (original)
+++ webservices/axis2/trunk/c/neethi/src/assertion.c Mon Aug 17 10:50:40 2009
@@ -16,6 +16,7 @@
  */
 
 #include <neethi_assertion.h>
+#include <axiom_util.h>
 #include <rp_x509_token.h>
 #include <rp_property.h>
 #include <rp_layout.h>
@@ -317,7 +318,16 @@
     const axutil_env_t *env,
     axiom_node_t * node)
 {
-    neethi_assertion->node = node;
+    if(neethi_assertion->node)
+    {
+        axiom_node_free_tree(neethi_assertion->node, env);
+        neethi_assertion->node = NULL;
+    }
+
+    if(node)
+    {
+        neethi_assertion->node = axiom_util_clone_node(env, node);
+    }
     return AXIS2_SUCCESS;
 }
 
@@ -396,20 +406,19 @@
     axiom_node_t *parent,
     const axutil_env_t *env)
 {
-    axiom_namespace_t *namespace = NULL;
-    axiom_element_t *element = NULL;
     axiom_node_t *node = NULL;
-    axis2_char_t *localname = NULL;
-
-    namespace = axiom_element_get_namespace(assertion->element, env, assertion->node);
-    localname = axiom_element_get_localname(assertion->element, env);
-    element = axiom_element_create(env, parent, localname, namespace, &node);
+    if(assertion->node)
+    {
+        node = axiom_util_clone_node(env, assertion->node);
+    }
 
     if(!node)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-            "%s node creation failed. Cannot serialize %s assertion", localname, localname);
+            "assertion node creation failed. Cannot serialize assertion");
         return AXIS2_FAILURE;
     }
+
+    axiom_node_add_child(parent, env, node);
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/neethi/src/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/engine.c?rev=804934&r1=804933&r2=804934&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/engine.c (original)
+++ webservices/axis2/trunk/c/neethi/src/engine.c Mon Aug 17 10:50:40 2009
@@ -562,6 +562,7 @@
                                 neethi_operator_set_value(operator, env, assertion,
                                                           OPERATOR_TYPE_ASSERTION);
                                 neethi_engine_add_policy_component(env, neethi_operator,
operator);
+                                neethi_assertion_set_node(assertion, env, child_node);
                             }
                             else
                             {



Mime
View raw message