You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2005/12/23 07:07:46 UTC

svn commit: r358733 - in /webservices/axis2/trunk/c: include/axis2_soap_body.h include/axis2_soap_envelope.h include/axis2_soap_fault.h include/axis2_soap_header.h include/axis2_soap_header_block.h modules/xml/soap/src/axis2_soap_header_block.c

Author: nandika
Date: Thu Dec 22 22:07:36 2005
New Revision: 358733

URL: http://svn.apache.org/viewcvs?rev=358733&view=rev
Log:
axis2_soap_header_block added 

Added:
    webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_header_block.c
Modified:
    webservices/axis2/trunk/c/include/axis2_soap_body.h
    webservices/axis2/trunk/c/include/axis2_soap_envelope.h
    webservices/axis2/trunk/c/include/axis2_soap_fault.h
    webservices/axis2/trunk/c/include/axis2_soap_header.h
    webservices/axis2/trunk/c/include/axis2_soap_header_block.h

Modified: webservices/axis2/trunk/c/include/axis2_soap_body.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_body.h?rev=358733&r1=358732&r2=358733&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_body.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_body.h Thu Dec 22 22:07:36 2005
@@ -22,11 +22,13 @@
     * @file axis2_soap_body.h
     * @brief axis2_soap_body struct
     */
-#include <axis2_soap_envelope.h>    
 #include <axis2_env.h>
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
-#include <axis2_om_namespace.h>
+#include <axis2_om_namespace.h>    
+#include <axis2_soap_envelope.h>    
+
+
 
 #ifdef __cplusplus
 extern "C"

Modified: webservices/axis2/trunk/c/include/axis2_soap_envelope.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_envelope.h?rev=358733&r1=358732&r2=358733&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_envelope.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_envelope.h Thu Dec 22 22:07:36 2005
@@ -22,26 +22,21 @@
  * @brief axis2_soap_envelope struct
  *        corresponds to root element of soap message
  */
- #include <axis2_soap_fault.h>
 #include <axis2_env.h>
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
 #include <axis2_om_namespace.h>
 
-
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
-    typedef struct axis2_soap_body        axis2_soap_body_t;
-    typedef struct axis2_soap_header      axis2_soap_header_t;
-    typedef struct axis2_soap_header_block_t axis2_soap_header_block_t;
-    
-
     typedef struct axis2_soap_envelope        axis2_soap_envelope_t;
     typedef struct axis2_soap_envelope_ops    axis2_soap_envelope_ops_t;
     
+    typedef struct axis2_soap_body            axis2_soap_body_t;
+    typedef struct axis2_soap_header          axis2_soap_header_t;
     
 /**
  * @defgroup axis2_soap_envelope

Modified: webservices/axis2/trunk/c/include/axis2_soap_fault.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_fault.h?rev=358733&r1=358732&r2=358733&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_fault.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_fault.h Thu Dec 22 22:07:36 2005
@@ -22,11 +22,13 @@
     * @file axis2_soap_fault.h
     * @brief axis2_soap_fault struct
     */
-#include <axis2_soap.h>    
+#include <axis2_soap_envelope.h>
+#include <axis2_soap_body.h>
+#include <axis2_soap.h> 
 #include <axis2_env.h>
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
-#include <axis2_soap_body.h>
+
 
 #ifdef __cplusplus
 extern "C"

Modified: webservices/axis2/trunk/c/include/axis2_soap_header.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_header.h?rev=358733&r1=358732&r2=358733&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_header.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_header.h Thu Dec 22 22:07:36 2005
@@ -28,14 +28,19 @@
 #include <axis2_om_children_qname_iterator.h>
 #include <axis2_om_children_with_specific_attribute_iterator.h>
 #include <axis2_hash.h>
+#include <axis2_soap_envelope.h>
+#include <axis2_soap_body.h>
+
 
 #ifdef __cplusplus
 extern "C"
 {
 #endif
-
-    typedef struct axis2_soap_header_ops axis2_soap_header_ops_t;
     
+typedef struct axis2_soap_header_block  axis2_soap_header_block_t;
+
+typedef struct axis2_soap_header_ops    axis2_soap_header_ops_t;
+
     
 /**
  * @defgroup axis2_soap_header
@@ -88,7 +93,7 @@
                                      axis2_env_t **env,
                                      axis2_char_t* param_role);
     
-        axis2_om_children_qname_iterator_t* (AXIS2_CALL examine_all_header_blocks)
+        axis2_om_children_qname_iterator_t* (AXIS2_CALL *examine_all_header_blocks)
                                     (axis2_soap_header_t* header,
                                      axis2_env_t **env);
         
@@ -148,7 +153,7 @@
 #define AXIS2_SOAP_HEADER_EXAMINE_HEADER_BLOCKS(header, env, param_role) \
         ((header)->ops->examine_header_blocks(header, env, param_role))
 
-#define AXIS2_SOAP_HEADER_EXAMINE_ALL_HEADER_BLOCKS(header, env)
+#define AXIS2_SOAP_HEADER_EXAMINE_ALL_HEADER_BLOCKS(header, env) \
         ((header)->ops->examine_all_header_blocks(header, env))
         
 #define AXIS2_SOAP_HEADER_EXTRACT_HEADER_BLOCKS(header, env) \

Modified: webservices/axis2/trunk/c/include/axis2_soap_header_block.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_header_block.h?rev=358733&r1=358732&r2=358733&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_header_block.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_header_block.h Thu Dec 22 22:07:36 2005
@@ -26,6 +26,7 @@
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
 #include <axis2_array_list.h>
+#include <axis2_soap_header.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -82,7 +83,7 @@
                             (axis2_soap_header_block_t *header_block,
                              axis2_env_t **env);
                              
-        axis2_bool_t (AXIS2_CALL *set_processed)
+        axis2_status_t (AXIS2_CALL *set_processed)
                             (axis2_soap_header_block_t *header_block,
                              axis2_env_t **env);                                                                                                                                                                                    
                                                                                                                                     
@@ -90,10 +91,23 @@
         axis2_char_t* (AXIS2_CALL *get_role)
                             (axis2_soap_header_block_t *header_block,
                              axis2_env_t **env);
+          
+        axis2_status_t (AXIS2_CALL *set_attribute)
+                            (axis2_soap_header_block_t *header_block,
+                             axis2_env_t **env,
+                             axis2_char_t *attr_name,
+                             axis2_char_t *attr_value,
+                             axis2_char_t *soap_envelope_namespace_uri);
+                             
+        axis2_char_t* (AXIS2_CALL *get_attribute)
+                            (axis2_soap_header_block_t *header_block,
+                             axis2_env_t **env,
+                             axis2_char_t *attr_name,
+                             axis2_char_t *soap_envelope_namespace_uri);                            
+                                       
                                                                                           
        /**
         * This is only intended to be used by the builder,
-        * do not use this function in other places
         */
         axis2_status_t (AXIS2_CALL *set_base_node)
                             (axis2_soap_header_block_t *header_block,
@@ -128,17 +142,18 @@
     * creates a soap struct 
     * @param env Environment. MUST NOT be NULL
     */
-AXIS2_DECLARE(axis2_soap_header_block_t *)
-axis2_soap_header_block_create_with_parent(axis2_env_t **env,
-                                       axis2_soap_envelope_t *envelope);
-                            
 
 AXIS2_DECLARE(axis2_soap_header_block_t *)
 axis2_soap_header_block_create(axis2_env_t **env);
 
+AXIS2_DECLARE(axis2_soap_header_block_t *)
+axis2_soap_header_block_create_with_parent(axis2_env_t **env,
+                                           axis2_char_t *localname,
+                                           axis2_om_namespace_t *ns,
+                                           axis2_soap_header_t *parent);
+                            
 /******************** Macros **************************************************/
     
-    
 /** free soap_header_block */
 #define AXIS2_SOAP_HEADER_BLOCK_FREE(header_block , env) \
         ((header_block)->ops->free_fn(header_block, env))
@@ -176,6 +191,16 @@
         
 #define AXIS2_SOAP_HEADER_BLOCK_GET_SOAP_VERSION(header_block, env) \
         ((header_block)->ops->get_soap_version(header_block, env))
+        
+#define AXIS2_SOAP_HEADER_BLOCK_GET_ATTRIBUTE(header_block, env,\
+            attr_name, soap_envelope_namespace_uri)  \
+        ((header_block)->ops->get_attribute(header_block, env, \
+            attr_name, soap_envelope_namespace_uri))
+            
+#define AXIS2_SOAP_HEADER_BLOCK_SET_ATTRIBUTE(header_block, env,\
+            attr_name, soap_envelope_namespace_uri)  \
+        ((header_block)->ops->set_attribute(header_block, env, \
+            attr_name, soap_envelope_namespace_uri))            
 /** @} */
 
 #ifdef __cplusplus

Added: webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_header_block.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_header_block.c?rev=358733&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_header_block.c (added)
+++ webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_header_block.c Thu Dec 22 22:07:36 2005
@@ -0,0 +1,381 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+ 
+#include <axis2_soap.h> 
+#include <axis2_soap_header_block.h>
+#include <axis2_soap_header.h>
+#include <axis2_soap_envelope.h>
+
+/******************* impl struct **********************************************/
+
+typedef struct axis2_soap_header_block_impl_t
+{
+    axis2_soap_header_block_t header_block;
+    
+    axis2_om_node_t *om_ele_node;
+    
+    axis2_om_element_t *om_ele;
+    
+    int soap_version;
+    
+    axis2_soap_header_t *parent;
+
+    axis2_bool_t processed;
+    
+}axis2_soap_header_block_impl_t;
+
+/***************** Macro ******************************************************/
+
+#define AXIS2_INTF_TO_IMPL(hblock) ((axis2_soap_header_block_impl_t*)hblock) 
+
+/***************** function prototypes ****************************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_free(axis2_soap_header_block_t *header_block,
+                             axis2_env_t **env);
+                                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_role(axis2_soap_header_block_t *header_block,
+                                 axis2_env_t **env,
+                                 axis2_char_t *uri);  
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_must_understand_with_bool
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_bool_t *must_understand);
+                        
+axis2_status_t AXIS2_CALL
+axis2_soap_header_block_set_must_understand_with_string
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_char_t *must_understand);
+                                        
+axis2_bool_t AXIS2_CALL 
+axis2_soap_header_block_get_must_understand
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);
+                        
+                        
+axis2_bool_t AXIS2_CALL 
+axis2_soap_header_block_is_processed
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);
+                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_processed
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);                                                                                                                                                                                    
+                                                                                                                            
+                            
+axis2_char_t* AXIS2_CALL 
+axis2_soap_header_block_get_role
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);
+                                                                                    
+axis2_status_t AXIS2_CALL axis2_soap_header_block_set_base_node
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_om_node_t *node);
+                                        
+axis2_om_node_t* AXIS2_CALL 
+axis2_soap_header_block_get_base_node
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);
+                                                                                                                                                                                
+int AXIS2_CALL 
+axis2_soap_header_block_get_soap_version  
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env);
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_soap_version  
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         int soap_version); 
+                         
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_attribute
+                       (axis2_soap_header_block_t *header_block,
+                        axis2_env_t **env,
+                        axis2_char_t *attr_name,
+                        axis2_char_t *attr_value,
+                        axis2_char_t *soap_envelope_namespace_uri);
+                        
+axis2_char_t* AXIS2_CALL 
+axis2_soap_header_block_get_attribute
+                       (axis2_soap_header_block_t *header_block,
+                        axis2_env_t **env,
+                        axis2_char_t *attr_name,
+                        axis2_char_t *soap_envelope_namespace_uri);                             
+                         
+/*************** function implementations *************************************/                                                                                             
+
+AXIS2_DECLARE(axis2_soap_header_block_t *)
+axis2_soap_header_block_create(axis2_env_t **env)
+{
+    axis2_soap_header_block_impl_t *header_block_impl = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    header_block_impl = (axis2_soap_header_block_impl_t*)AXIS2_MALLOC(
+                         (*env)->allocator, 
+                         sizeof(axis2_soap_header_block_impl_t));
+    if(!header_block_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);    
+        return NULL;
+    }                         
+    
+    header_block_impl->header_block.ops = NULL;
+    header_block_impl->om_ele           = NULL;
+    header_block_impl->om_ele_node      = NULL;
+    header_block_impl->parent           = NULL;
+    header_block_impl->soap_version     = AXIS2_SOAP_VERSION_NOT_SET;
+    
+    header_block_impl->header_block.ops = (axis2_soap_header_block_ops_t *)AXIS2_MALLOC(
+                                            (*env)->allocator,
+                                            sizeof(axis2_soap_header_block_ops_t));
+    if(!(header_block_impl->header_block.ops))
+    {
+        AXIS2_FREE((*env)->allocator, header_block_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    } 
+    
+    header_block_impl->header_block.ops->free_fn =
+        axis2_soap_header_block_free;
+    header_block_impl->header_block.ops->set_role =
+        axis2_soap_header_block_set_role;
+    header_block_impl->header_block.ops->set_must_understand_with_bool =
+        axis2_soap_header_block_set_must_understand_with_bool;
+    header_block_impl->header_block.ops->set_must_understand_with_string =
+        axis2_soap_header_block_set_must_understand_with_string;                                                                   
+    header_block_impl->header_block.ops->get_must_understand =
+        axis2_soap_header_block_get_must_understand;
+    header_block_impl->header_block.ops->is_processed =
+        axis2_soap_header_block_is_processed;
+    header_block_impl->header_block.ops->set_processed =
+        axis2_soap_header_block_set_processed;
+    header_block_impl->header_block.ops->get_role =
+        axis2_soap_header_block_get_role;
+    header_block_impl->header_block.ops->set_soap_version =
+        axis2_soap_header_block_set_soap_version;
+    header_block_impl->header_block.ops->get_soap_version =
+        axis2_soap_header_block_get_soap_version;
+    header_block_impl->header_block.ops->set_base_node =
+        axis2_soap_header_block_set_base_node;
+    header_block_impl->header_block.ops->get_base_node =
+        axis2_soap_header_block_get_base_node;                                                        
+
+    return &(header_block_impl->header_block);
+}
+
+
+AXIS2_DECLARE(axis2_soap_header_block_t *)
+axis2_soap_header_block_create_with_parent(axis2_env_t **env,
+                                           axis2_char_t *localname,
+                                           axis2_om_namespace_t *ns,
+                                           axis2_soap_header_t *header)
+{
+    axis2_soap_header_block_impl_t *header_block_impl = NULL;
+    axis2_soap_header_block_t *header_block = NULL;
+    axis2_om_node_t *this_node = NULL;
+    axis2_om_node_t *parent_node = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, localname, NULL);
+    
+    header_block = axis2_soap_header_block_create(env);
+    if(!header_block)
+        return NULL;   
+    
+    parent_node = AXIS2_SOAP_HEADER_GET_BASE_NODE(header, env);    
+    header_block_impl = AXIS2_INTF_TO_IMPL(header_block);
+    header_block_impl->om_ele = axis2_om_element_create( env,
+                                    parent_node, localname, ns , &this_node);
+                                    
+    header_block_impl->om_ele_node = this_node; 
+    header_block_impl->parent = header;               
+    return &(header_block_impl->header_block);                                
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_free(axis2_soap_header_block_t *header_block,
+                             axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, AXIS2_FAILURE);
+    if(header_block->ops)
+    {
+        AXIS2_FREE((*env)->allocator, header_block->ops);
+        header_block->ops = NULL;
+    }
+    AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(header_block));
+    header_block = NULL;
+    return AXIS2_SUCCESS;
+}
+                                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_role(axis2_soap_header_block_t *header_block,
+                                 axis2_env_t **env,
+                                 axis2_char_t *uri)
+{
+
+
+}
+
+axis2_char_t* AXIS2_CALL 
+axis2_soap_header_block_get_role
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+
+
+}  
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_must_understand_with_bool
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_bool_t *must_understand)
+{
+
+}
+                        
+axis2_status_t AXIS2_CALL
+axis2_soap_header_block_set_must_understand_with_string
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_char_t *must_understand)
+{
+
+}
+                                        
+axis2_bool_t AXIS2_CALL 
+axis2_soap_header_block_get_must_understand
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+
+}
+                        
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_attribute
+                       (axis2_soap_header_block_t *header_block,
+                        axis2_env_t **env,
+                        axis2_char_t *attr_name,
+                        axis2_char_t *attr_value,
+                        axis2_char_t *soap_envelope_namespace_uri)
+{
+
+}
+                        
+axis2_char_t* AXIS2_CALL 
+axis2_soap_header_block_get_attribute
+                       (axis2_soap_header_block_t *header_block,
+                        axis2_env_t **env,
+                        axis2_char_t *attr_name,
+                        axis2_char_t *soap_envelope_namespace_uri)
+{
+    axis2_soap_header_block_impl_t *header_block_impl = NULL;
+    axis2_om_attribute_t* om_attr = NULL;
+    axis2_char_t *attr_value = NULL;
+    axis2_qname_t *qn = NULL;
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, attr_name, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, soap_envelope_namespace_uri, NULL);
+    
+    qn = axis2_qname_create(env, attr_name, soap_envelope_namespace_uri, NULL);
+    if(!qn)
+        return NULL;
+    om_attr = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(header_block_impl->om_ele, env, qn);
+    if(om_attr)
+       attr_value = AXIS2_OM_ATTRIBUTE_GET_VALUE(om_attr, env);
+    AXIS2_QNAME_FREE(qn, env);
+
+    return attr_value;       
+}
+                       
+axis2_bool_t AXIS2_CALL 
+axis2_soap_header_block_is_processed
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, AXIS2_FAILURE);
+    return AXIS2_INTF_TO_IMPL(header_block)->processed;
+}
+                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_processed
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(header_block)->processed = AXIS2_TRUE;
+    return AXIS2_SUCCESS;
+}                                                                                                                                                                                    
+                                                                                                                            
+                            
+
+                                                                                    
+axis2_status_t AXIS2_CALL axis2_soap_header_block_set_base_node
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         axis2_om_node_t *node)
+{
+   axis2_soap_header_block_impl_t *header_block_impl = NULL;
+   AXIS2_FUNC_PARAM_CHECK( header_block, env, AXIS2_FAILURE);
+   AXIS2_PARAM_CHECK((*env)->error, node, AXIS2_FAILURE);
+   header_block_impl = AXIS2_INTF_TO_IMPL(header_block);
+   
+   if(AXIS2_OM_NODE_GET_NODE_TYPE(node, env) != AXIS2_OM_ELEMENT)
+   {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+   }
+   header_block_impl->om_ele_node = node;
+   header_block_impl->om_ele = (axis2_om_element_t *)
+            AXIS2_OM_NODE_GET_DATA_ELEMENT(node, env);
+   return AXIS2_SUCCESS;
+
+}
+                                        
+axis2_om_node_t* AXIS2_CALL 
+axis2_soap_header_block_get_base_node
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, NULL);
+    return AXIS2_INTF_TO_IMPL(header_block)->om_ele_node;
+}
+                                                                                                                                                                                
+int AXIS2_CALL 
+axis2_soap_header_block_get_soap_version  
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, AXIS2_FAILURE);
+    return AXIS2_INTF_TO_IMPL(header_block)->soap_version;
+}
+axis2_status_t AXIS2_CALL 
+axis2_soap_header_block_set_soap_version  
+                        (axis2_soap_header_block_t *header_block,
+                         axis2_env_t **env,
+                         int soap_version)
+{
+    AXIS2_FUNC_PARAM_CHECK(header_block, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, soap_version, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(header_block)->soap_version = soap_version;
+    return AXIS2_SUCCESS;
+} 
\ No newline at end of file