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 da...@apache.org on 2006/03/22 12:22:42 UTC

svn commit: r387835 - in /webservices/axis2/trunk/c/modules/wsdl: wsdl_ext_soap_body.c wsdl_ext_soap_header.c

Author: damitha
Date: Wed Mar 22 03:22:40 2006
New Revision: 387835

URL: http://svn.apache.org/viewcvs?rev=387835&view=rev
Log:
Added some soap extension files

Added:
    webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_body.c
    webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_header.c

Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_body.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_body.c?rev=387835&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_body.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_body.c Wed Mar 22 03:22:40 2006
@@ -0,0 +1,227 @@
+/*
+ * 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_wsdl_ext_soap_body.h>
+#include <axis2_wsdl.h>
+
+/** 
+ * @brief Wsdl Extension Soap Body struct impl
+ *	 Wsdl Extention Soap Body  
+ */ 
+typedef struct axis2_wsdl_ext_soap_body_impl
+{
+	axis2_wsdl_ext_soap_body_t ext_soap_body;
+    axis2_char_t *use;
+    axis2_char_t *namespc_uri;
+    
+} axis2_wsdl_ext_soap_body_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ext_soap_body) \
+		((axis2_wsdl_ext_soap_body_impl_t *)ext_soap_body)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+	axis2_wsdl_ext_soap_body_free (axis2_wsdl_ext_soap_body_t *ext_soap_body,
+									axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_body_get_use(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_body_set_use(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env,
+                                axis2_char_t *use);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_body_get_namespc_uri(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_body_set_namespc_uri(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env,
+                                axis2_char_t *namespc_uri);
+                                
+/************************** End of function prototypes ************************/
+
+axis2_wsdl_ext_soap_body_t * AXIS2_CALL 
+axis2_wsdl_ext_soap_body_create (axis2_env_t **env,
+                                 axis2_qname_t *qtype)
+{
+    axis2_wsdl_ext_soap_body_impl_t *ext_soap_body_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+	
+	ext_soap_body_impl = (axis2_wsdl_ext_soap_body_impl_t *) AXIS2_MALLOC((*env)->allocator,
+			sizeof(axis2_wsdl_ext_soap_body_impl_t));
+	
+	
+	if(NULL == ext_soap_body_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    ext_soap_body_impl->use = NULL;
+    ext_soap_body_impl->namespc_uri = NULL;
+    ext_soap_body_impl->ext_soap_body.ops = NULL;
+    ext_soap_body_impl->ext_soap_body.ext_element = NULL;
+	
+    ext_soap_body_impl->ext_soap_body.ext_element = 
+        axis2_wsdl_extensible_element_create(env);
+    if(NULL == ext_soap_body_impl->ext_soap_body.ext_element)
+    {
+        axis2_wsdl_ext_soap_body_free(&(ext_soap_body_impl->ext_soap_body), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }    
+    
+	ext_soap_body_impl->ext_soap_body.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_ext_soap_body_ops_t));
+	if(NULL == ext_soap_body_impl->ext_soap_body.ops)
+    {
+        axis2_wsdl_ext_soap_body_free(&(ext_soap_body_impl->ext_soap_body), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    if(!qtype)
+    {
+        qtype = axis2_qname_create(env, "body", AXIS2_SOAP_11_BODY, NULL);
+        if(!qtype) return NULL;
+    }    
+    AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(
+        (&(ext_soap_body_impl->ext_soap_body))->ext_element, env, qtype);
+
+	ext_soap_body_impl->ext_soap_body.ops->free =  axis2_wsdl_ext_soap_body_free;
+	ext_soap_body_impl->ext_soap_body.ops->get_use = 
+        axis2_wsdl_ext_soap_body_get_use;
+    ext_soap_body_impl->ext_soap_body.ops->set_use = 
+        axis2_wsdl_ext_soap_body_set_use;
+	ext_soap_body_impl->ext_soap_body.ops->get_namespc_uri = 
+        axis2_wsdl_ext_soap_body_get_namespc_uri;
+    ext_soap_body_impl->ext_soap_body.ops->set_namespc_uri = 
+        axis2_wsdl_ext_soap_body_set_namespc_uri;
+	
+	return &(ext_soap_body_impl->ext_soap_body);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_wsdl_ext_soap_body_free (axis2_wsdl_ext_soap_body_t *ext_soap_body, 
+                            axis2_env_t **env)
+{
+    axis2_wsdl_ext_soap_body_impl_t *exp_soap_body_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    exp_soap_body_impl = AXIS2_INTF_TO_IMPL(ext_soap_body);
+    
+	if(NULL != ext_soap_body->ops)
+        AXIS2_FREE((*env)->allocator, ext_soap_body->ops);
+    
+    if(NULL != exp_soap_body_impl->use)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_body_impl->use);
+        exp_soap_body_impl->use = NULL;
+    }
+    
+    if(NULL != exp_soap_body_impl->namespc_uri)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_body_impl->namespc_uri);
+        exp_soap_body_impl->namespc_uri = NULL;
+    }
+    
+    if(NULL != ext_soap_body->ext_element)
+    {
+        AXIS2_WSDL_EXTENSIBLE_ELEMENT_FREE(ext_soap_body->ext_element, env);
+        ext_soap_body->ext_element = NULL;
+    }
+    
+    AXIS2_FREE((*env)->allocator, exp_soap_body_impl);
+    exp_soap_body_impl = NULL;
+    
+	return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_body_get_use(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env) 
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return AXIS2_INTF_TO_IMPL(ext_soap_body)->use;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_body_set_use(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env,
+                                axis2_char_t *use) 
+{
+    axis2_wsdl_ext_soap_body_impl_t *exp_soap_body_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, use, AXIS2_FAILURE);
+    
+    exp_soap_body_impl = AXIS2_INTF_TO_IMPL(ext_soap_body);
+    
+    if(exp_soap_body_impl->use)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_body_impl->use);
+        exp_soap_body_impl->use = NULL;
+    }
+    exp_soap_body_impl->use = AXIS2_STRDUP(use, env);
+    if(!exp_soap_body_impl->use)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_body_get_namespc_uri(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env) 
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    return AXIS2_INTF_TO_IMPL(ext_soap_body)->namespc_uri;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_body_set_namespc_uri(axis2_wsdl_ext_soap_body_t *ext_soap_body,
+                                axis2_env_t **env,
+                                axis2_char_t *namespc_uri) 
+{
+    axis2_wsdl_ext_soap_body_impl_t *exp_soap_body_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc_uri, AXIS2_FAILURE);
+    exp_soap_body_impl = AXIS2_INTF_TO_IMPL(ext_soap_body); 
+
+    if(exp_soap_body_impl->namespc_uri)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_body_impl->namespc_uri);
+        exp_soap_body_impl->namespc_uri = NULL;
+    }
+    exp_soap_body_impl->namespc_uri = AXIS2_STRDUP(namespc_uri, env);
+    if(!exp_soap_body_impl->namespc_uri)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+

Added: webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_header.c?rev=387835&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_header.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_ext_soap_header.c Wed Mar 22 03:22:40 2006
@@ -0,0 +1,283 @@
+/*
+ * 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_wsdl_ext_soap_header.h>
+#include <axis2_wsdl_ext_soap_body.h>
+#include <axis2_wsdl.h>
+
+/** 
+ * @brief Wsdl Extension Soap Header struct impl
+ *	 Wsdl Extention Soap Header  
+ */ 
+typedef struct axis2_wsdl_ext_soap_header_impl
+{
+	axis2_wsdl_ext_soap_header_t ext_soap_header;
+    
+    axis2_qname_t *msg_qname;
+    axis2_char_t *part;
+    axis2_qname_t *qelement;
+} axis2_wsdl_ext_soap_header_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ext_soap_header) \
+		((axis2_wsdl_ext_soap_header_impl_t *)ext_soap_header)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+	axis2_wsdl_ext_soap_header_free (axis2_wsdl_ext_soap_header_t *ext_soap_header,
+									axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_part(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_part(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_char_t *part);
+                                
+axis2_qname_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_msg_qname(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_msg_qname(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_qname_t *msg_qname);
+
+axis2_qname_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_qelement(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_qelement(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_qname_t *qelement);
+
+/************************** End of function prototypes ************************/
+
+axis2_wsdl_ext_soap_header_t * AXIS2_CALL 
+axis2_wsdl_ext_soap_header_create (axis2_env_t **env,
+                                 axis2_qname_t *qtype)
+{
+    axis2_wsdl_ext_soap_header_impl_t *ext_soap_header_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+	
+	ext_soap_header_impl = (axis2_wsdl_ext_soap_header_impl_t *) AXIS2_MALLOC((*env)->allocator,
+			sizeof(axis2_wsdl_ext_soap_header_impl_t));
+	
+	
+	if(NULL == ext_soap_header_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    ext_soap_header_impl->part = NULL;
+    ext_soap_header_impl->msg_qname = NULL;
+    ext_soap_header_impl->qelement = NULL;
+    ext_soap_header_impl->ext_soap_header.ops = NULL;
+    ext_soap_header_impl->ext_soap_header.ext_soap_body = NULL;
+	
+    ext_soap_header_impl->ext_soap_header.ext_soap_body = 
+        axis2_wsdl_ext_soap_body_create(env, NULL);
+    if(NULL == ext_soap_header_impl->ext_soap_header.ext_soap_body)
+    {
+        axis2_wsdl_ext_soap_header_free(&(ext_soap_header_impl->ext_soap_header), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }    
+    
+	ext_soap_header_impl->ext_soap_header.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_ext_soap_header_ops_t));
+	if(NULL == ext_soap_header_impl->ext_soap_header.ops)
+    {
+        axis2_wsdl_ext_soap_header_free(&(ext_soap_header_impl->ext_soap_header), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    if(!qtype)
+    {
+        qtype = axis2_qname_create(env, "header", AXIS2_SOAP_11_HEADER, NULL);
+        if(!qtype) return NULL;
+    }    
+    AXIS2_WSDL_EXTENSIBLE_ELEMENT_SET_TYPE(
+        (&(ext_soap_header_impl->ext_soap_header))->ext_soap_body->ext_element, 
+            env, qtype);
+
+	ext_soap_header_impl->ext_soap_header.ops->free =  axis2_wsdl_ext_soap_header_free;
+	ext_soap_header_impl->ext_soap_header.ops->get_part = 
+        axis2_wsdl_ext_soap_header_get_part;
+    ext_soap_header_impl->ext_soap_header.ops->set_part = 
+        axis2_wsdl_ext_soap_header_set_part;
+	ext_soap_header_impl->ext_soap_header.ops->get_msg_qname = 
+        axis2_wsdl_ext_soap_header_get_msg_qname;
+    ext_soap_header_impl->ext_soap_header.ops->set_msg_qname = 
+        axis2_wsdl_ext_soap_header_set_msg_qname;
+	ext_soap_header_impl->ext_soap_header.ops->get_qelement = 
+        axis2_wsdl_ext_soap_header_get_qelement;
+    ext_soap_header_impl->ext_soap_header.ops->set_qelement = 
+        axis2_wsdl_ext_soap_header_set_qelement;
+	
+	return &(ext_soap_header_impl->ext_soap_header);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_wsdl_ext_soap_header_free (axis2_wsdl_ext_soap_header_t *ext_soap_header, 
+                            axis2_env_t **env)
+{
+    axis2_wsdl_ext_soap_header_impl_t *exp_soap_header_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    exp_soap_header_impl = AXIS2_INTF_TO_IMPL(ext_soap_header);
+    
+	if(NULL != ext_soap_header->ops)
+        AXIS2_FREE((*env)->allocator, ext_soap_header->ops);
+    
+    if(NULL != exp_soap_header_impl->part)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_header_impl->part);
+        exp_soap_header_impl->part = NULL;
+    }
+    
+    if(NULL != exp_soap_header_impl->msg_qname)
+    {
+        AXIS2_QNAME_FREE(exp_soap_header_impl->msg_qname, env);
+        exp_soap_header_impl->msg_qname = NULL;
+    }
+    
+    if(NULL != exp_soap_header_impl->qelement)
+    {
+        AXIS2_QNAME_FREE(exp_soap_header_impl->qelement, env);
+        exp_soap_header_impl->qelement = NULL;
+    }
+    
+    if(NULL != ext_soap_header->ext_soap_body)
+    {
+        AXIS2_WSDL_EXT_SOAP_BODY_FREE(ext_soap_header->ext_soap_body, env);
+        ext_soap_header->ext_soap_body = NULL;
+    }
+    
+    AXIS2_FREE((*env)->allocator, exp_soap_header_impl);
+    exp_soap_header_impl = NULL;
+    
+	return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_part(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env) 
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return AXIS2_INTF_TO_IMPL(ext_soap_header)->part;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_part(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_char_t *part) 
+{
+    axis2_wsdl_ext_soap_header_impl_t *exp_soap_header_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, part, AXIS2_FAILURE);
+    
+    exp_soap_header_impl = AXIS2_INTF_TO_IMPL(ext_soap_header);
+    
+    if(exp_soap_header_impl->part)
+    {
+        AXIS2_FREE((*env)->allocator, exp_soap_header_impl->part);
+        exp_soap_header_impl->part = NULL;
+    }
+    exp_soap_header_impl->part = AXIS2_STRDUP(part, env);
+    if(!exp_soap_header_impl->part)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_msg_qname(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env) 
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    return AXIS2_INTF_TO_IMPL(ext_soap_header)->msg_qname;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_msg_qname(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_qname_t *msg_qname) 
+{
+    axis2_wsdl_ext_soap_header_impl_t *exp_soap_header_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_qname, AXIS2_FAILURE);
+    exp_soap_header_impl = AXIS2_INTF_TO_IMPL(ext_soap_header); 
+
+    if(exp_soap_header_impl->msg_qname)
+    {
+        AXIS2_QNAME_FREE(exp_soap_header_impl->msg_qname, env);
+        exp_soap_header_impl->msg_qname = NULL;
+    }
+    exp_soap_header_impl->msg_qname = AXIS2_QNAME_CLONE(msg_qname, env);
+    if(!exp_soap_header_impl->msg_qname)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_wsdl_ext_soap_header_get_qelement(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env) 
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    return AXIS2_INTF_TO_IMPL(ext_soap_header)->qelement;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_ext_soap_header_set_qelement(axis2_wsdl_ext_soap_header_t *ext_soap_header,
+                                axis2_env_t **env,
+                                axis2_qname_t *qelement) 
+{
+    axis2_wsdl_ext_soap_header_impl_t *exp_soap_header_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qelement, AXIS2_FAILURE);
+    exp_soap_header_impl = AXIS2_INTF_TO_IMPL(ext_soap_header); 
+
+    if(exp_soap_header_impl->qelement)
+    {
+        AXIS2_QNAME_FREE(exp_soap_header_impl->qelement, env);
+        exp_soap_header_impl->qelement = NULL;
+    }
+    exp_soap_header_impl->qelement = AXIS2_QNAME_CLONE(qelement, env);
+    if(!exp_soap_header_impl->qelement)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+