All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.axis2.schema.template.CADBBeanTemplateSource.xsl Maven / Gradle / Ivy

There is a newer version: 1.8.2
Show newest version



    

     
    
        
        adb_
        /**
         * .c
         *
         * This file was auto-generated from WSDL
         * by the Apache Axis2/Java version: #axisVersion# #today#
         */
         
        #include ".h"

        
    
    
    
        
    

    
        _
        
        
        adb_
        

        
        
        
        
        
         
         
       
        
        

        
        
          
            1
            0
          
        

        
        

        /**
         * .c
         *
         * This file was auto-generated from WSDL
         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
         */

        #include ".h"
        
            
                /*
                 * This type was generated from the piece of schema that had
                 * name = 
                 * Namespace URI = 
                 * Namespace Prefix = 
                 */
           
           
               /*
                * implmentation of the | element
                */
           
        


        struct 
        {
            axis2_char_t *property_Type;

            
                axutil_qname_t* qname;
            

            
                
                   
                     axutil_array_list_t*
                     axiom_node_t* 
                     
                   
                
                
                

                 property_;

                
                axis2_bool_t is_valid_;
            

            
            
                axutil_array_list_t*
                
                
 
                 property_;
                axis2_bool_t is_valid_;

            


            
                axis2_char_t *current_choice;
            

            
            
                /* for unions we are keeping members in a union */

                union {
                
                    
                    _
                     ;
                
                } member_type;
                
                /* here too we keep the choice */
                axis2_char_t *current_value;
            
        };


       /************************* Private Function prototypes ********************************/
        
            
            
                axutil_array_list_t*
                axiom_node_t* 
                
            
            
            
            

             
               
                 axiom_node_t* 
                 
               
            
               
                 
                   axiom_node_t* 
                   *
                   
                 
              
            
                
                    Array of s.
                    
                
            

            
                
                 axis2_status_t AXIS2_CALL
                 _set__nil_at(
                        _t* , 
                        const axutil_env_t *env, int i);
                

                axis2_status_t AXIS2_CALL
                _set__nil(
                        _t* ,
                        const axutil_env_t *env);
            

          


       /************************* Function Implmentations ********************************/
        _t* AXIS2_CALL
        _create(
            const axutil_env_t *env)
        {
            _t * = NULL;
            
                axutil_qname_t* qname = NULL;
            
            AXIS2_ENV_CHECK(env, NULL);

             = (_t *) AXIS2_MALLOC(env->
                allocator, sizeof(_t));

            if(NULL == )
            {
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                return NULL;
            }

            memset(, 0, sizeof(_t));

            ->property_Type = axutil_strdup(env, "");
            
                
                
                  
                    ->property_  = NULL;
                  
                  
                
                ->is_valid_  = AXIS2_FALSE;
            

            
              
                
                  qname =  axutil_qname_create (env,
                        "",
                        "",
                        NULL);
                
                
                  qname =  axutil_qname_create (env,
                        "",
                        NULL,
                        NULL);
                
              

              ->qname = qname;
            

            
                ->current_choice = "";
            
            
                ->current_value = "";
            

            return ;
        }

        
            
                
                
                    axutil_array_list_t*
                    axiom_node_t* 
                    
                
                
                _
                ,
                 
            
        

        
        _t* AXIS2_CALL
        _create_with_values(
            const axutil_env_t *env)
        {
            _t* adb_obj = NULL;
            axis2_status_t status = AXIS2_SUCCESS;

            adb_obj = _create(env);

            
              _
              status = _set_(
                                     adb_obj,
                                     env,
                                     );
              if(status == AXIS2_FAILURE) {
                  _free (adb_obj, env);
                  return NULL;
              }
            
           
            
            /* this function is not implemented for union types */
            

            return adb_obj;
        }
      
        
            
                
                
                
                    axutil_array_list_t*
                    axiom_node_t* 
                    
                
                
                

                 AXIS2_CALL
                _free_popping_value(
                        _t* ,
                        const axutil_env_t *env)
                {
                     value;

                    
                    /* this function is not completely implemented for union types */
                    
                    
                    value = ->property_;

                    
                      ->property_ = ()NULL;
                    
                    _free(, env);

                    return value;
                }
            
            
                void* AXIS2_CALL
                _free_popping_value(
                        _t* ,
                        const axutil_env_t *env)
                {
                    _free(, env);
                    return NULL;
                }
            

        

        axis2_status_t AXIS2_CALL
        _free(
                _t* ,
                const axutil_env_t *env)
        {
            
            
            
            return axis2_extension_mapper_free(
                (adb_type_t*) ,
                env,
                "");
            
            
            return _free_obj(
                ,
                env);
            
            
        }

        axis2_status_t AXIS2_CALL
        _free_obj(
                _t* ,
                const axutil_env_t *env)
        {
            
                int i = 0;
                int count = 0;
                void *element = NULL;
            

            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
            AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

            if (->property_Type != NULL)
            {
              AXIS2_FREE(env->allocator, ->property_Type);
            }

            
                
                _reset_(, env);
            

            
            
                
                _reset_(, env);
            

            
            _reset_members(, env);
            

            
              if(->qname)
              {
                  axutil_qname_free (->qname, env);
                  ->qname = NULL;
              }
            

            if()
            {
                AXIS2_FREE(env->allocator, );
                 = NULL;
            }

            return AXIS2_SUCCESS;
        }


        
            axis2_status_t AXIS2_CALL
            _deserialize_from_string(
                            _t* ,
                                            const axutil_env_t *env,
                                            const axis2_char_t *node_value,
                                            axiom_node_t *parent)
            {
              axis2_status_t status = AXIS2_SUCCESS;
            
              void *element = NULL;
            
            
              void *element = NULL;
            
            
              const axis2_char_t *cp_ro = NULL;
              axis2_bool_t prefix_found = AXIS2_FALSE;
              axiom_namespace_t *qname_ns;
            

            
               int i;
               axis2_char_t *token_value = NULL;
               axis2_char_t *original_node_value = NULL;
               axis2_char_t *dupd_node_value = NULL;
               axis2_bool_t the_last_token = AXIS2_FALSE;
            

               
                 
                  
                     
                       axutil_array_list_t*
                       axiom_node_t* 
                       
                     
                  
                   
                     
                       axiom_node_t* 
                       
                     
                  
                  
                  
    
                  
                  
                    
                    
                       _set_(,
                                                      env, atoi(node_value));
                    

                    
                    
                       _set_(,
                                                      env, (char)(*node_value)); 
                    

                    
                    
                       _set_(,
                                                      env, atoi(node_value));
                    

                    
                    
                       _set_(,
                                                      env, axutil_strtol(node_value, (char**)NULL, 0));
                    
                    
                       _set_(,
                                                      env, axutil_strtoul(node_value, (char**)NULL, 0));
                    

                    
                    
                       _set_(,
                                                      env, atof(node_value));
                    
                    
                    
                       _set_(,
                                                      env, atof(node_value));
                    

                    
                    
                       _set_(,
                                                      env, node_value);
                    

                    
                    

                        prefix_found = AXIS2_FALSE;
                        for(cp_ro = node_value; *cp_ro; cp_ro ++)
                        {
                            if(*cp_ro == ':')
                            {
                                cp_ro ++;
                                prefix_found  = AXIS2_TRUE;
                                break;
                            }
                        }

                        if(prefix_found)
                        {
                            /* node value contain the prefix */
                            char *prefix_value = AXIS2_MALLOC(env->allocator, (cp_ro - node_value - 1) + 1);
                            strncpy(prefix_value, node_value, (cp_ro - node_value - 1));
                            prefix_value[cp_ro - node_value - 1] = '\0';
                            qname_ns = axiom_element_find_namespace_uri((axiom_element_t*)axiom_node_get_data_element(parent, env), env, prefix_value, parent);
                            AXIS2_FREE(env->allocator, prefix_value);
                        }
                        else
                        {
                            /* Then it is the default namespace */
                            cp_ro = node_value;
                            qname_ns = axiom_element_get_default_namespace((axiom_element_t*)axiom_node_get_data_element(parent, env), env, parent);
                        }

                         

                         _set_(,
                                                        env,
                                                        axutil_qname_create(
                                                              env, 
                                                              cp_ro, /* cp contain the localname */
                                                              axiom_namespace_get_uri(qname_ns, env),
                                                              axiom_namespace_get_prefix(qname_ns, env)));
                      



                    
                    
                       _set_(,
                                                      env, axutil_uri_parse_string(env, node_value));
                    

                    
                    
                       _set_(,
                                                      env, axutil_duration_create_from_string(env, node_value));
                    

                    
                    
                       if (!axutil_strcmp(node_value, "TRUE") || !axutil_strcmp(node_value, "true"))
                       {
                           _set_(,
                                                      env, AXIS2_TRUE);
                       }
                       else
                       {
                           _set_(,
                                                      env, AXIS2_FALSE);
                       }
                    
                    
                    
                       _set_(,
                                                      env, atoi(node_value));
                    
                    
                    
                       element = (void*)axutil_date_time_create(env);
                       axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                  node_value);
                       _set_(,
                                                      env, ()element);
                    
                    
                    
                       element = (void*)axutil_base64_binary_create(env);
                       axutil_base64_binary_set_encoded_binary(()element, env,
                                                                  node_value);
                       _set_(,
                                                      env, ()element);
                    
                    
                      element =  (void*)_create(env);
                      _deserialize_from_string(()element, env, attrib_text, parent);
                      _set_(, env,
                                                                ()element);
                    
                    
                       
                       /* can not handle the attribute type */
                       status = AXIS2_FAILURE;
                    
                  
                
              

            
            
                axutil_array_list_t*
                
                
 
                 
                   
                     axiom_node_t* 
                     
                   
                
                   
                     
                       axiom_node_t* 
                       *
                       
                     
                  
                
                ()element
                element
                
                /* just to make sure we are not altering the original */
                dupd_node_value = original_node_value = (axis2_char_t*)axutil_strdup(env, node_value);

                for(token_value = dupd_node_value, the_last_token = AXIS2_FALSE; !the_last_token; dupd_node_value ++)
                {
                    if(*dupd_node_value == ' ' || *dupd_node_value == '\t' || *dupd_node_value == '\r'
                            || *dupd_node_value == '\n' || *dupd_node_value == '\0')
                    {
                        if(*dupd_node_value == '\0')
                        {
                            the_last_token = AXIS2_TRUE;
                        }
                        else
                        {
                            *dupd_node_value = '\0';
                        }
                        

                
                  
                  
                     _add_(,
                                                    env, atoi(token_value));
                  

                  
                  
                     _add_(,
                                                    env, (char)(*token_value)); 
                  

                  
                  
                     _add_(,
                                                    env, atoi(token_value));
                  

                  
                  
                     _add_(,
                                                    env, axutil_strtol(token_value, (char**)NULL, 0));
                  
                  
                     _add_(,
                                                    env, axutil_strtoul(token_value, (char**)NULL, 0));
                  

                  
                  
                     _add_(,
                                                    env, atof(token_value));
                  
                  
                  
                     _add_(,
                                                    env, atof(token_value));
                  

                  
                  
                     _add_(,
                                                    env, token_value);
                  

                  
                  

                    prefix_found = AXIS2_FALSE;
                    for(cp = token_value; *cp; cp ++)
                    {
                        if(*cp == ':')
                        {
                            *cp = '\0';
                            cp ++;
                            prefix_found  = AXIS2_TRUE;
                            break;
                        }
                    }

                    if(prefix_found)
                    {
                        /* node value contain the prefix */
                        qname_ns = axiom_element_find_namespace_uri((axiom_element_t*)axiom_node_get_data_element(parent, env), env, token_value, parent);
                    }
                    else
                    {
                        /* Then it is the default namespace */
                        cp = token_value;
                        qname_ns = axiom_element_get_default_namespace((axiom_element_t*)axiom_node_get_data_element(parent, env), env, parent);
                    }

                     

                     _add_(,
                                                    env,
                                                    axutil_qname_create(
                                                          env, 
                                                          cp, /* cp contain the localname */
                                                          axiom_namespace_get_uri(qname_ns, env),
                                                          axiom_namespace_get_prefix(qname_ns, env)));
                  

                 
                  
                     _add_(,
                                                    env, axutil_uri_parse_string(env, token_value));
                  

                  
                  
                     _add_(,
                                                    env, axutil_duration_create_from_string(env, token_value));
                  

                  
                  
                     if (!axutil_strcmp(token_value, "TRUE") || !axutil_strcmp(token_value, "true"))
                     {
                         _add_(,
                                                    env, AXIS2_TRUE);
                     }
                     else
                     {
                         _add_(,
                                                    env, AXIS2_FALSE);
                     }
                  
                  
                  
                     _add_(,
                                                    env, atoi(token_value));
                  
                  
                  
                     element = (void*)axutil_date_time_create(env);
                     axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                token_value);
                     _add_(,
                                                    env, ()element);
                  
                  
                  
                     element = (void*)axutil_base64_binary_create(env);
                     axutil_base64_binary_set_encoded_binary(()element, env,
                                                                token_value);
                     _add_(,
                                                    env, ()element);
                  
                  
                      element =  (void*)_create(env);
                      _deserialize_from_string(()element, env, attrib_text, parent);
                      _set_(, env,
                                                                ()element);
                  
                  
                     
                     /* can not handle the attribute type */
                     status = AXIS2_FAILURE;
                  
                   
                    token_value = dupd_node_value + 1;
                  }
              }
              AXIS2_FREE(env->allocator, original_node_value);

             

             
             
               /*
                * axis2_qname_t *qname = NULL;
                * axiom_attribute_t *the_attri = NULL;
                * 
                * qname = axutil_qname_create(env, "type", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
                * the_attri = axiom_element_get_attribute(current_element, env, qname);
                */
               /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */

               axiom_attribute_t *the_attri = NULL;
               axis2_char_t *attrib_text = NULL;
               axutil_hash_t *attribute_hash = NULL;
               void *element = NULL;
               axiom_element_t *current_element = NULL;

               current_element = (axiom_element_t*)axiom_node_get_data_element(parent, env);

               attribute_hash = axiom_element_get_all_attributes(current_element, env);

               attrib_text = NULL;
               if(attribute_hash)
               {
                    axutil_hash_index_t *hi;
                    void *val;
                    const void *key;
           
                    for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                    {
                        axutil_hash_this(hi, &key, NULL, &val);
                        
                        if(strstr((axis2_char_t*)key, "type|http://www.w3.org/2001/XMLSchema-instance"))
                        {
                            the_attri = (axiom_attribute_t*)val;
                            break;
                        }
                    }
               }

               if(the_attri)
               {
                   attrib_text = axiom_attribute_get_value(the_attri, env);
               }
               else
               {
                   /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
                   attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "type");
               }

               if(attrib_text)
               {
                    /* skipping the namespace prefix */
                    axis2_char_t *temp_attrib = NULL;
                    temp_attrib = strchr(attrib_text, ':');
                    if(temp_attrib)
                    {
                        /* take the string after the ':' character */
                        attrib_text = temp_attrib + 1;
                    }
               }

               if(!attrib_text) {
                    /* nothing is here, reset things */
                    status = _reset_members(, env);
               }
             
                
                   
               else if(!axutil_strcmp(attrib_text, ""))
               {

                
                  
                  
                     _set_(,
                                                    env, atoi(attrib_text));
                  

                  
                  
                     _set_(,
                                                    env, (char)(*attrib_text)); 
                  

                  
                  
                     _set_(,
                                                    env, atoi(attrib_text));
                  

                  
                  
                     _set_(,
                                                    env, axutil_strtol(attrib_text, (char**)NULL, 0));
                  
                  
                     _set_(,
                                                    env, axutil_strtoul(attrib_text, (char**)NULL, 0));
                  

                  
                  
                     _set_(,
                                                    env, atof(attrib_text));
                  
                  
                  
                     _set_(,
                                                    env, atof(attrib_text));
                  

                  
                  
                     _set_(,
                                                    env, attrib_text);
                  

                  
                  

                    prefix_found = AXIS2_FALSE;
                    for(cp = attrib_text; *cp; cp ++)
                    {
                        if(*cp == ':')
                        {
                            *cp = '\0';
                            cp ++;
                            prefix_found  = AXIS2_TRUE;
                            break;
                        }
                    }

                    if(prefix_found)
                    {
                        /* node value contain the prefix */
                        qname_ns = axiom_element_find_namespace_uri((axiom_element_t*)axiom_node_get_data_element(parent, env), env, attrib_text, parent);
                    }
                    else
                    {
                        /* Then it is the default namespace */
                        cp = attrib_text;
                        qname_ns = axiom_element_get_default_namespace((axiom_element_t*)axiom_node_get_data_element(parent, env), env, parent);
                    }

                     

                     _set_(,
                                                    env,
                                                    axutil_qname_create(
                                                          env, 
                                                          cp, /* cp contain the localname */
                                                          axiom_namespace_get_uri(qname_ns, env),
                                                          axiom_namespace_get_prefix(qname_ns, env)));
                  

                 
                  
                     _set_(,
                                                    env, axutil_uri_parse_string(env, attrib_text));
                  

                  
                  
                     _set_(,
                                                    env, axutil_duration_create_from_string(env, attrib_text));
                  

                  
                  
                     if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(token_value, "true"))
                     {
                         _set_(,
                                                    env, AXIS2_TRUE);
                     }
                     else
                     {
                         _set_(,
                                                    env, AXIS2_FALSE);
                     }
                  
                  
                  
                     _set_(,
                                                    env, atoi(attrib_text));
                  
                  
                  
                     element = (void*)axutil_date_time_create(env);
                     axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                attrib_text);
                     _set_(,
                                                    env, ()element);
                  
                  
                  
                     element = (void*)axutil_base64_binary_create(env);
                     axutil_base64_binary_set_encoded_binary(()element, env,
                                                                attrib_text);
                     _set_(,
                                                    env, ()element);
                  
                  
                      element =  (void*)_create(env);
                      _deserialize_from_string(()element, env, attrib_text, parent);
                      _set_(, env,
                                                                ()element);
                  
                  
                     
                     /* can not handle the attribute type */
                     status = AXIS2_FAILURE;
                  
                   

               }
             
             
              return status;
            }
        

        axis2_status_t AXIS2_CALL
        _deserialize(
                _t* ,
                const axutil_env_t *env,
                axiom_node_t **dp_parent,
                axis2_bool_t *dp_is_early_node_valid,
                axis2_bool_t dont_care_minoccurs)
        {
            
            
            
            return axis2_extension_mapper_deserialize(
                (adb_type_t*) ,
                env,
                dp_parent,
                dp_is_early_node_valid,
                dont_care_minoccurs,
                "");
            
            
            return _deserialize_obj(
                ,
                env,
                dp_parent,
                dp_is_early_node_valid,
                dont_care_minoccurs);
            
            
        }

        axis2_status_t AXIS2_CALL
        _deserialize_obj(
                _t* ,
                const axutil_env_t *env,
                axiom_node_t **dp_parent,
                axis2_bool_t *dp_is_early_node_valid,
                axis2_bool_t dont_care_minoccurs)
        {
          axiom_node_t *parent = *dp_parent;
          
          axis2_status_t status = AXIS2_SUCCESS;
          
              axiom_attribute_t *parent_attri = NULL;
              axiom_element_t *parent_element = NULL;
              axis2_char_t *attrib_text = NULL;

              axutil_hash_t *attribute_hash = NULL;

          
          
              void *element = NULL;
          

          
           
             const axis2_char_t* text_value = NULL;
             axutil_qname_t *qname = NULL;
          

          
            
              axis2_char_t *cp = NULL;
              axis2_bool_t prefix_found = AXIS2_FALSE;
              axiom_namespace_t *qname_ns;
            
          
            
            
            status = AXIS2_FAILURE;
            if(parent)
            {
                axis2_char_t *attrib_text = NULL;
                attrib_text = axiom_element_get_attribute_value_by_name(axiom_node_get_data_element(parent, env), env, "nil");
                if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))
                {
                  
                   
                   /* but the wsdl says that, this is non nillable */
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                    status = AXIS2_FAILURE;
                   
                   
                    status = _set_nil(, env);
                   
                  
                }
                else
                {
                    axiom_node_t *text_node = NULL;
                    axiom_text_t *text_element = NULL;
                    text_node = axiom_node_get_first_child(parent, env);
                    if (text_node &&
                            axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
                        text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, env);
                    text_value = "";
                    if(text_element && axiom_text_get_value(text_element, env))
                    {
                        text_value = (axis2_char_t*)axiom_text_get_value(text_element, env);
                    }
                    status = _deserialize_from_string(, env, text_value, parent);
                }
            }
            
            

            
               int i = 0;
               axutil_array_list_t *arr_list = NULL;
            
            
               int sequence_broken = 0;
               axiom_node_t *tmp_node = NULL;
            
            
                  
                    
                        yes
                    
                  
            
            
                 
            
            axutil_qname_t *element_qname = NULL; 
            
               axiom_node_t *first_node = NULL;
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
               axiom_node_t *current_node = NULL;
               axiom_element_t *current_element = NULL;
            
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
            AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

            
              
              
              
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
              {
                  parent = axiom_node_get_next_sibling(parent, env);
              }
              if (NULL == parent)
              {
                /* This should be checked before everything */
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
                            "Failed in building adb object for  : "
                            "NULL element can not be passed to deserialize");
                return AXIS2_FAILURE;
              }
              
            
            
               
                 
                    

                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent, env);
                    qname = axiom_element_get_qname(current_element, env, parent);
                    if (axutil_qname_equals(qname, env, -> qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env)))
                    {
                        
                          
                          first_node = axiom_node_get_first_child(parent, env);
                          
                          
                          first_node = parent;
                          
                        
                    }
                    else
                    {
                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
                              "Failed in building adb object for  : "
                              "Expected %s but returned %s",
                              axutil_qname_to_string(-> qname, env),
                              axutil_qname_to_string(qname, env));
                        
                        return AXIS2_FAILURE;
                    }
                    
                    
                         first_node = parent;
                    
                    
                      
                      first_node = axiom_node_get_first_child(parent, env);
                      
                    
                 
               
            
            
             
          

          
            
              
                 parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, env);
                 attribute_hash = axiom_element_get_all_attributes(parent_element, env);
              
            

            
              
                 
                   axutil_array_list_t*
                   axiom_node_t* 
                   
                 
              
               
                 
                   axiom_node_t* 
                   
                 
              
              
              

              
                 
                   ()element
                   ->property_
                 
              
              
                 
                   element
                   ->property_
                 
              
              ->property_
              
                
                
                
                
                  parent_attri = NULL;
                  attrib_text = NULL;
                  if(attribute_hash)
                  {
                       axutil_hash_index_t *hi;
                       void *val;
                       const void *key;
                       axis2_char_t *dup_key;


                       char *seperator = NULL;
                       axis2_char_t *uri = NULL;
                       axiom_namespace_t *namespace = NULL;

                       axiom_attribute_t *new_attrib = NULL;

                       for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                       {
                           axutil_hash_this(hi, &key, NULL, &val);
                          
                           dup_key = axutil_strdup(env, key);
                           seperator = strstr(dup_key, "|");
                          
                           uri = NULL;
                           if(seperator) /* this means the attribute is qualified with a namespace */
                           {
                             *seperator = '\0';
                             seperator ++; /* represent the namespace */
                             uri = seperator;
                           }

                           namespace  = axiom_namespace_create(env, uri, NULL);
                           parent_attri = (axiom_attribute_t*)val;
                           attrib_text = axiom_attribute_get_value(parent_attri, env);

                           new_attrib = axiom_attribute_create(env, dup_key, attrib_text, namespace);


                           _add_(,
                                                          env, new_attrib);
                           AXIS2_FREE(env->allocator, dup_key);
                       }
                  }
                
                
                
                
                  parent_attri = NULL;
                  attrib_text = NULL;
                  if(attribute_hash)
                  {
                       axutil_hash_index_t *hi;
                       void *val;
                       const void *key;

                       for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                       {
                           axutil_hash_this(hi, &key, NULL, &val);
                           
                           
                             
                               if(strstr((axis2_char_t*)key, "|"))
                             
                             
                               if(!strcmp((axis2_char_t*)key, ""))
                             
                           
                               {
                                   parent_attri = (axiom_attribute_t*)val;
                                   break;
                               }
                       }
                  }

                  if(parent_attri)
                  {
                    attrib_text = axiom_attribute_get_value(parent_attri, env);
                  }
                  else
                  {
                    /* this is hoping that attribute is stored in "", this happnes when name is in default namespace */
                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, env, "");
                  }

                  if(attrib_text != NULL)
                  {
                      
                      
                        
                        
                           _set_(,
                                                          env, atoi(attrib_text));
                        

                        
                        
                           _set_(,
                                                          env, (char)(*attrib_text));
                        

                        
                        
                           _set_(,
                                                          env, atoi(attrib_text));
                        

                        
                        
                           _set_(,
                                                          env, axutil_strtol(attrib_text, (char**)NULL, 0));
                        
                        
                           _set_(,
                                                          env, axutil_strtoul(attrib_text, (char**)NULL, 0));
                        

                        
                        
                           _set_(,
                                                          env, atof(attrib_text));
                        
                        
                        
                           _set_(,
                                                          env, atof(attrib_text));
                        

                        
                        
                           _set_(,
                                                          env, attrib_text);
                        


                        
                        
                          prefix_found = AXIS2_FALSE;
                          for(cp = attrib_text; *cp; cp ++)
                          {
                              if(*cp == ':')
                              {
                                  *cp = '\0';
                                  cp ++;
                                  prefix_found  = AXIS2_TRUE;
                                  break;
                              }
                          }

                          if(prefix_found)
                          {
                              /* node value contain the prefix */
                              qname_ns = axiom_element_find_namespace_uri((axiom_element_t*)axiom_node_get_data_element(parent, env), env, attrib_text, parent);
                          }
                          else
                          {
                              /* Then it is the default namespace */
                              cp = attrib_text;
                              qname_ns = axiom_element_get_default_namespace((axiom_element_t*)axiom_node_get_data_element(parent, env), env, parent);
                          }

                           

                           _set_(,
                                                          env,
                                                          axutil_qname_create(
                                                                env, 
                                                                cp, /* cp contain the localname */
                                                                axiom_namespace_get_uri(qname_ns, env),
                                                                axiom_namespace_get_prefix(qname_ns, env)));
                        


                        
                        
                           _set_(,
                                                          env, axutil_uri_parse_string(env, attrib_text));
                        

                        
                        
                           _set_(,
                                                          env, axutil_duration_create_from_string(env, attrib_text));
                        
                        
                        
                           if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true"))
                           {
                               _set_(,
                                                          env, AXIS2_TRUE);
                           }
                           else
                           {
                               _set_(,
                                                          env, AXIS2_FALSE);
                           }
                        
                        
                           _set_(,
                                                          env, atoi(attrib_text));
                        
                        
                        
                           element = (void*)axutil_date_time_create(env);
                           axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                      attrib_text);
                           _set_(,
                                                          env, ()element);
                        
                        
                        
                           element = (void*)axutil_base64_binary_create(env);
                           axutil_base64_binary_set_encoded_binary(()element), env,
                                                                      attrib_text);
                           _set_(,
                                                          env, ()element);
                        
                        
                            element =  (void*)_create(env);
                            _deserialize_from_string(()element, env, attrib_text, parent);
                           _set_(,
                                                          env, ()element);
                        
                        
                          
                          /* can not handle the attribute type */
                        
                      
                    }
                  
                  
                
                 
                 
                  
                   
                    /*
                     * building  array
                     */
                       arr_list = axutil_array_list_create(env, 10);
                   

                     
                     /*
                      * building  element
                      */
                     
                     
                     
                         
                           
                              
                               
                                 
                                   current_node = first_node;
                                   is_early_node_valid = AXIS2_FALSE;
                                   
                                   
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
                                    {
                                        current_node = axiom_node_get_next_sibling(current_node, env);
                                    }
                                    if(current_node != NULL)
                                    {
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
                                        qname = axiom_element_get_qname(current_element, env, current_node);
                                    }
                                   
                                 
                                 
                                    /*
                                     * because elements are ordered this works fine
                                     */
                                  
                                   
                                   if(current_node != NULL && is_early_node_valid)
                                   {
                                       current_node = axiom_node_get_next_sibling(current_node, env);
                                       
                                       
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
                                        {
                                            current_node = axiom_node_get_next_sibling(current_node, env);
                                        }
                                        if(current_node != NULL)
                                        {
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
                                            qname = axiom_element_get_qname(current_element, env, current_node);
                                        }
                                       
                                   }
                                   is_early_node_valid = AXIS2_FALSE;
                                 
                                

                               
                                 
                                 
                                 element_qname = axutil_qname_create(env, "", "", NULL);
                                 
                                 
                                 element_qname = axutil_qname_create(env, "", NULL, NULL);
                                 
                               

                             
                              
                               /*
                                * because elements are not ordered we should surf all the sibling to pick the right one
                                */
                               for (current_node = first_node; current_node != NULL;
                                             current_node = axiom_node_get_next_sibling(current_node, env))
                               {
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
                                  {
                                     continue;
                                  }
                                  
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
                                  qname = axiom_element_get_qname(current_element, env, current_node);
                                
                                  
                                  element_qname = axutil_qname_create(env, "", "", NULL);
                                  
                                  
                                  element_qname = axutil_qname_create(env, "", NULL, NULL);
                                  
                                
                                  if (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env)))
                                  {
                                       /* found the requried element */
                                       break;
                                  }
                               }
                              
                           

                           if (_is_particle() ||  
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env)))))
                           {
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env))))
                              {
                                is_early_node_valid = AXIS2_TRUE;
                              }
                              
                                 
                                    
                                      element = (void*)axis2_extension_mapper_create_from_node(env, &current_node, "");

                                      status =  _deserialize(()element,
                                                                            env, &current_node, &is_early_node_valid, AXIS2_TRUEAXIS2_FALSE);
                                      if(AXIS2_FAILURE == status)
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element ");
                                      }
                                      else
                                      {
                                          status = _set_(, env,
                                                                   ()element);
                                      }
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                               text_value);
                                      }
                                      
                                      else
                                      {
                                            /*
                                             * axis2_qname_t *qname = NULL;
                                             * axiom_attribute_t *the_attri = NULL;
                                             * 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
                                             */
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */

                                            axiom_attribute_t *the_attri = NULL;
                                            axis2_char_t *attrib_text = NULL;
                                            axutil_hash_t *attribute_hash = NULL;

                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);

                                            attrib_text = NULL;
                                            if(attribute_hash)
                                            {
                                                 axutil_hash_index_t *hi;
                                                 void *val;
                                                 const void *key;
                                        
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                                                 {
                                                     axutil_hash_this(hi, &key, NULL, &val);
                                                     
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
                                                     {
                                                         the_attri = (axiom_attribute_t*)val;
                                                         break;
                                                     }
                                                 }
                                            }

                                            if(the_attri)
                                            {
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
                                            }
                                            else
                                            {
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
                                            }

                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
                                            {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                            }
                                            else
                                            {
                                                /* after all, we found this is a empty string */
                                                status = _set_(, env,
                                                                   "");
                                            }
                                      }
                                      
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                          status = _set_(, env,
                                                             axutil_uri_parse_string(env, text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                          status = _set_(, env,
                                                             axutil_duration_create_from_string(env, text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            prefix_found = AXIS2_FALSE;
                                            for(cp = (axis2_char_t*)text_value; *cp; cp ++)
                                            {
                                                if(*cp == ':')
                                                {
                                                    *cp = '\0';
                                                    cp ++;
                                                    prefix_found  = AXIS2_TRUE;
                                                    break;
                                                }
                                            }
                                          
                                            if(prefix_found)
                                            {
                                                /* node value contain  the prefix */
                                                qname_ns = axiom_element_find_namespace_uri(current_element, env, text_value, current_node);
                                            }
                                            else
                                            {
                                                /* Then it is the default namespace */
                                                cp = (axis2_char_t*)text_value;
                                                qname_ns = axiom_element_get_default_namespace(current_element, env, current_node);
                                            }
                                          
                                            
                                           
                                            status = _set_(,
                                                    env,
                                                    axutil_qname_create(
                                                          env, 
                                                          cp, /* cp contain the localname */
                                                          axiom_namespace_get_uri(qname_ns, env),
                                                          axiom_namespace_get_prefix(qname_ns, env)));
                                       }
                                       
                                         else
                                         {
                                             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                             status = AXIS2_FAILURE;
                                         }
                                       

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                          status = _set_(, env,
                                                             (char)(*text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   atoi(text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       
                                   
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   atoi(text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       

                                   
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   atoi(text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                       

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   atof(text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      

                                     
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   atof(text_value));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   axutil_strtol(text_value, (char**)NULL, 0));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            status = _set_(, env,
                                                                   axutil_strtoul(text_value, (char**)NULL, 0));
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      
                                    
                                    
                                      text_value = NULL; /* just to avoid warning */
                                      
                                        
                                        {
                                          axiom_node_t *current_property_node = current_node;
                                          current_node = axiom_node_get_next_sibling(current_node, env);
                                          axiom_node_detach(current_property_node, env);
                                          status = _set_(, env,
                                                                          current_property_node);
                                        }
                                        
                                        
                                          if(axiom_node_get_first_child(current_node, env))
                                          {
                                              axiom_node_t *current_property_node = axiom_node_get_first_child(current_node, env);
                                              axiom_node_detach(current_property_node, env);
                                              status = _set_(, env,
                                                                          current_property_node);
                                          }
                                          else
                                          {
                                              status = _set_(, env,
                                                                          NULL);
                                          }
                                        
                                      

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                            if (!axutil_strcasecmp(text_value , "true"))
                                            {
                                                status = _set_(, env,
                                                                 AXIS2_TRUE);
                                            }
                                            else
                                            {
                                                status = _set_(, env,
                                                                      AXIS2_FALSE);
                                            }
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      
                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                          element = (void*)axutil_date_time_create(env);
                                          status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                          text_value);
                                          if(AXIS2_FAILURE ==  status)
                                          {
                                              if(element != NULL)
                                              {
                                                  axutil_date_time_free((axutil_date_time_t*)element, env);
                                              }
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  ");
                                          }
                                          else
                                          {
                                            status = _set_(, env,
                                                                       ()element);
                                          }
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      

                                    
                                    
                                      text_value = axiom_element_get_text(current_element, env, current_node);
                                      if(text_value != NULL)
                                      {
                                          element = (void*)axutil_base64_binary_create(env);
                                          status = axutil_base64_binary_set_encoded_binary((axutil_base64_binary_t*)element, env,
                                                                          text_value);
                                          if(AXIS2_FAILURE ==  status)
                                          {
                                              if(element != NULL)
                                              {
                                                 axutil_base64_binary_free((axutil_base64_binary_t*)element, env);
                                              }
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  ");
                                          }
                                          else
                                          {
                                            status = _set_(, env,
                                                                       ()element);
                                          }
                                      }
                                      
                                      else
                                      {
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                          status = AXIS2_FAILURE;
                                      }
                                      

                                    
                                    
                                      
                                      /* Imposible to handle the request type - so please do it manually */
                                      text_value = NULL;
                                    
                                 
                                 if(AXIS2_FAILURE ==  status)
                                 {
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for  ");
                                     if(element_qname)
                                     {
                                         axutil_qname_free(element_qname, env);
                                     }
                                     return AXIS2_FAILURE;
                                 }
                              }
                           
                              else if(!dont_care_minoccurs)
                              {
                                  if(element_qname)
                                  {
                                      axutil_qname_free(element_qname, env);
                                  }
                                  /* this is not a nillable element*/
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element  missing");
                                  return AXIS2_FAILURE;
                              }
                           
                        
                         
                           
                            /* 'any' arrays are not handling correctly when there are other elements mixed with the 'any' element. */
                           
                           
                              
                                
                                  
                                  
                                    element_qname = axutil_qname_create(env, "", "", NULL);
                                  
                                  
                                    element_qname = axutil_qname_create(env, "", NULL, NULL);
                                  
                                
                               
                               for (i = 0, sequence_broken = 0, current_node = 
                                             first_node
                                             (is_early_node_valid?axiom_node_get_next_sibling(current_node, env):current_node); !sequence_broken && current_node != NULL;) 
                                             
                               {
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
                                  {
                                     current_node =axiom_node_get_next_sibling(current_node, env);
                                     is_early_node_valid = AXIS2_FALSE;
                                     continue;
                                  }
                                  
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
                                  qname = axiom_element_get_qname(current_element, env, current_node);

                                  if (_is_particle() ||  
                                    (current_node && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env)))))
                                  {
                                  
                                      if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env))))
                                      {
                                          is_early_node_valid = AXIS2_TRUE;
                                      }
                                      
                                     
                                        
                                          element = (void*)axis2_extension_mapper_create_from_node(env, &current_node, "");
                                          
                                          status =  _deserialize(()element, env,
                                                                                 &current_node, &is_early_node_valid, AXIS2_TRUEAXIS2_FALSE);
                                          
                                          if(AXIS2_FAILURE ==  status)
                                          {
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  ");
                                          }
                                          else
                                          {
                                            axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, text_value));
                                          }
                                          
                                          else
                                          {
                                              /*
                                               * axis2_qname_t *qname = NULL;
                                               * axiom_attribute_t *the_attri = NULL;
                                               * 
                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
                                               */
                                           
                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
                                             
                                              axiom_attribute_t *the_attri = NULL;
                                              axis2_char_t *attrib_text = NULL;
                                              axutil_hash_t *attribute_hash = NULL;
                                             
                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
                                             
                                              attrib_text = NULL;
                                              if(attribute_hash)
                                              {
                                                   axutil_hash_index_t *hi;
                                                   void *val;
                                                   const void *key;
                                             
                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                                                   {
                                                       axutil_hash_this(hi, &key, NULL, &val);
                                                       
                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
                                                       {
                                                           the_attri = (axiom_attribute_t*)val;
                                                           break;
                                                       }
                                                   }
                                              }
                                             
                                              if(the_attri)
                                              {
                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
                                              }
                                              else
                                              {
                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
                                              }
                                             
                                              if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                  status = AXIS2_FAILURE;
                                              }
                                              else
                                              {
                                                  /* after all, we found this is a empty string */
                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
                                              }
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              prefix_found = AXIS2_FALSE;
                                              for(cp = (axis2_char_t*)text_value; *cp; cp ++)
                                              {
                                                  if(*cp == ':')
                                                  {
                                                      *cp = '\0';
                                                      cp ++;
                                                      prefix_found  = AXIS2_TRUE;
                                                      break;
                                                  }
                                              }
                                              
                                              if(prefix_found)
                                              {
                                                  /* node value contain  the prefix */
                                                  qname_ns = axiom_element_find_namespace_uri(current_element, env, text_value, current_node);
                                              }
                                              else
                                              {
                                                  /* Then it is the default namespace */
                                                  cp = (axis2_char_t*)text_value;
                                                  qname_ns = axiom_element_get_default_namespace(current_element, env, current_node);
                                              }
                                              
                                              
                                              
                                              axutil_array_list_add_at(arr_list, env, i, (void*)
                                                      axutil_qname_create(
                                                            env, 
                                                            cp, /* cp contain the localname */
                                                            axiom_namespace_get_uri(qname_ns, env),
                                                            axiom_namespace_get_prefix(qname_ns, env)));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              axutil_array_list_add_at(arr_list, env, i, (void*)axutil_uri_parse_string(env, text_value));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                                axutil_array_list_add_at(arr_list, env, i, (void*)axutil_duration_create_from_string(env, text_value));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               /* we keeps ints in arrays from their pointers */
                                               element = AXIS2_MALLOC(env-> allocator, 64);
                                               (*(*)element) = (char)(*text_value);
                                               axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(int));
                                              (*(*)element) = atoi(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(axis2_byte_t));
                                              (*(*)element) = atoi(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(short));
                                              (*(*)element) = atoi(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(float));
                                              (*(*)element) = atof(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               /* we keeps float in arrays from their pointers */
                                               element = AXIS2_MALLOC(env-> allocator, sizeof(double));
                                               (*(*)element) = atof(text_value);
                                               axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps int64_t in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(int64_t));
                                              (*(*)element) = axutil_strtol(text_value, (char**)NULL, 0);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps int64_t in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(uint64_t));
                                              (*(*)element) = axutil_strtoul(text_value, (char**)NULL, 0);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = NULL; /* just to avoid warning */
                                          
                                            
                                            {
                                              axiom_node_t *current_property_node = current_node;
                                              current_node = axiom_node_get_next_sibling(current_node, env);
                                              axiom_node_detach(current_property_node, env);
                                              axutil_array_list_add_at(arr_list, env, i, (void*)current_property_node);
                                            }
                                            
                                            
                                              if(axiom_node_get_first_child(current_node, env))
                                              {
                                                  axiom_node_t *current_property_node = axiom_node_get_first_child(current_node, env);
                                                  axiom_node_detach(current_property_node, env);
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)current_property_node);
                                              }
                                              else
                                              {
                                                  status = _set_(, env,
                                                                              NULL);
                                              }
                                            
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               if (!axutil_strcasecmp (text_value , "true"))
                                               {
                                                  element = AXIS2_MALLOC(env->allocator,sizeof(axis2_bool_t));
                                                  (*(*)element) = AXIS2_TRUE;
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)element);
                                               }
                                               else
                                               {
                                                  element = AXIS2_MALLOC(env->allocator,sizeof(axis2_bool_t));
                                                  (*(*)element) = AXIS2_FALSE;
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)element);

                                               }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              element = (void*)axutil_date_time_create(env);
                                              status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                              text_value);
                                              if(AXIS2_FAILURE ==  status)
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  "
                                                                      " %d :: %s", env->error->error_number,
                                                                      AXIS2_ERROR_GET_MESSAGE(env->error));
                                              }
                                              else
                                              {
                                                axutil_array_list_add_at(arr_list, env, i, element);
                                              }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              element = (void*)axutil_base64_binary_create(env);
                                              status = axutil_base64_binary_set_encoded_binary((axutil_base64_binary_t*)element, env,
                                                                              text_value);
                                              if(AXIS2_FAILURE ==  status)
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  "
                                                                      " %d :: %s", env->error->error_number,
                                                                      AXIS2_ERROR_GET_MESSAGE(env->error));
                                              }
                                              else
                                              {
                                                axutil_array_list_add_at(arr_list, env, i, element);
                                              }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          
                                          /* imposible to handle the request type - so please do it manually */
                                          text_value = NULL;
                                        
                                     
                                     if(AXIS2_FAILURE ==  status)
                                     {
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for  ");
                                         if(element_qname)
                                         {
                                            axutil_qname_free(element_qname, env);
                                         }
                                         if(arr_list)
                                         {
                                            axutil_array_list_free(arr_list, env);
                                         }
                                         return AXIS2_FAILURE;
                                     }

                                     i ++;
                                    current_node = axiom_node_get_next_sibling(current_node, env);

                                 
                                  }
                                  else
                                  {
                                      is_early_node_valid = AXIS2_FALSE;
                                      sequence_broken = 1;
                                  }
                                  
                               }

                               
                                   if (i < )
                                   {
                                     /* found element out of order */
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, " (@minOccurs = '') only have %d elements", i);
                                     if(element_qname)
                                     {
                                        axutil_qname_free(element_qname, env);
                                     }
                                     if(arr_list)
                                     {
                                        axutil_array_list_free(arr_list, env);
                                     }
                                     return AXIS2_FAILURE;
                                   }
                               

                               if(0 == axutil_array_list_size(arr_list,env))
                               {
                                    axutil_array_list_free(arr_list, env);
                               }
                               else
                               {
                                    status = _set_(, env,
                                                                   arr_list);
                               }

                             
                              
                                
                                  
                                  
                                    element_qname = axutil_qname_create(env, "", "", NULL);
                                  
                                  
                                    element_qname = axutil_qname_create(env, "", NULL, NULL);
                                  
                                
                                /*
                                 * because elements are not ordered we should surf all the sibling to pick the right one
                                 */
                               
                               for (i = 0, current_node = first_node; current_node != NULL; current_node = axiom_node_get_next_sibling(current_node, env))
                                             
                               {
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
                                  {
                                     
                                     current_node = axiom_node_get_next_sibling(current_node, env);
                                     
                                     continue;
                                  }
                                  
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
                                  qname = axiom_element_get_qname(current_element, env, current_node);

                                  if (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("", axiom_element_get_localname(current_element, env)))
                                  {
                                  
                                       /* found the requried element */
                                       is_early_node_valid = AXIS2_TRUE;
                                      
                                     
                                        
                                          element = (void*)axis2_extension_mapper_create_from_node(env, &current_node, "");
                                          
                                          status =  _deserialize(()element, env,
                                                                                 &current_node, &is_early_node_valid, AXIS2_TRUEAXIS2_FALSE);
                                          if(AXIS2_FAILURE ==  status)
                                          {
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  "
                                                                  " %d :: %s", env->error->error_number,
                                                                  AXIS2_ERROR_GET_MESSAGE(env->error));
                                          }
                                          else
                                          {
                                            axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                                axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, text_value));
                                          }
                                          
                                          else
                                          {
                                             /*
                                               * axis2_qname_t *qname = NULL;
                                               * axiom_attribute_t *the_attri = NULL;
                                               * 
                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
                                               */
                                           
                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
                                             
                                              axiom_attribute_t *the_attri = NULL;
                                              axis2_char_t *attrib_text = NULL;
                                              axutil_hash_t *attribute_hash = NULL;
                                             
                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
                                             
                                              attrib_text = NULL;
                                              if(attribute_hash)
                                              {
                                                   axutil_hash_index_t *hi;
                                                   void *val;
                                                   const void *key;
                                             
                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
                                                   {
                                                       axutil_hash_this(hi, &key, NULL, &val);
                                                       
                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
                                                       {
                                                           the_attri = (axiom_attribute_t*)val;
                                                           break;
                                                       }
                                                   }
                                              }
                                             
                                              if(the_attri)
                                              {
                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
                                              }
                                              else
                                              {
                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
                                              }
                                             
                                              if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                  status = AXIS2_FAILURE;
                                              }
                                              else
                                              {
                                                  /* after all, we found this is a empty string */
                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
                                              }
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                            prefix_found = AXIS2_FALSE;
                                            for(cp = (axis2_char_t*)text_value; *cp; cp ++)
                                            {
                                                if(*cp == ':')
                                                {
                                                    *cp = '\0';
                                                    cp ++;
                                                    prefix_found  = AXIS2_TRUE;
                                                    break;
                                                }
                                            }
                                          
                                            if(prefix_found)
                                            {
                                                /* node value contain  the prefix */
                                                qname_ns = axiom_element_find_namespace_uri(current_element, env, text_value, current_node);
                                            }
                                            else
                                            {
                                                /* Then it is the default namespace */
                                                cp = (axis2_char_t*)text_value;
                                                qname_ns = axiom_element_get_default_namespace(current_element, env, current_node);
                                            }
                                          
                                            
                                           
                                            axutil_array_list_add_at(arr_list, env, i, (void*)
                                                    axutil_qname_create(
                                                          env, 
                                                          cp, /* cp contain the localname */
                                                          axiom_namespace_get_uri(qname_ns, env),
                                                          axiom_namespace_get_prefix(qname_ns, env)));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                                axutil_array_list_add_at(arr_list, env, i, (void*)axutil_uri_parse_string(env, text_value));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                                axutil_array_list_add_at(arr_list, env, i, (void*)axutil_duration_create_from_string(env, text_value));
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, 64);
                                              (*(*)element) = (char)(*text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(int));
                                              (*(*)element) = atoi(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              /* we keeps ints in arrays from their pointers */
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(int));
                                              (*(*)element) = atoi(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               /* we keeps ints in arrays from their pointers */
                                               element = AXIS2_MALLOC(env-> allocator, sizeof(short));
                                               (*(*)element) = atoi(text_value);
                                               axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          /* we keeps float in arrays from their pointers */
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(float));
                                              (*(*)element) = atof(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          /* we keeps float in arrays from their pointers */
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              element = AXIS2_MALLOC(env-> allocator, sizeof(double));
                                              (*(*)element) = atof(text_value);
                                              axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          /* we keeps int64_t in arrays from their pointers */
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               element = AXIS2_MALLOC(env-> allocator, sizeof(int64_t));
                                               (*(*)element) = axutil_strtol(text_value, (char**)NULL,0);
                                               axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          /* we keeps int64_t in arrays from their pointers */
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                               element = AXIS2_MALLOC(env-> allocator, sizeof(uint64_t));
                                               (*(*)element) = axutil_strtoul(text_value, (char**)NULL, 0);
                                               axutil_array_list_add_at(arr_list, env, i, element);
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          text_value = NULL; /* just to avoid warning */
                                          
                                            
                                            {
                                              axiom_node_t *current_property_node = current_node;
                                              current_node = axiom_node_get_next_sibling(current_node, env);
                                              axiom_node_detach(current_property_node, env);
                                              axutil_array_list_add_at(arr_list, env, i, (void*)current_property_node);
                                            }
                                            
                                            
                                              if(axiom_node_get_first_child(current_node, env))
                                              {
                                                  axiom_node_t *current_property_node = axiom_node_get_first_child(current_node, env);
                                                  axiom_node_detach(current_property_node, env);
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)current_property_node);
                                              }
                                            
                                          
                                        
                                        
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              if (!axutil_strcasecmp (text_value , "true"))
                                              {
                                                  element = AXIS2_MALLOC(env->allocator,sizeof(axis2_bool_t));
                                                  (*(*)element) = AXIS2_TRUE;
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)element);
                                              }
                                              else
                                              {
                                                  element = AXIS2_MALLOC(env->allocator,sizeof(axis2_bool_t));
                                                  (*(*)element) = AXIS2_FALSE;
                                                  axutil_array_list_add_at(arr_list, env, i, (void*)element);
                                              }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          
                                        
                                        
                                          element = (void*)axutil_date_time_create(env);
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
                                                                              text_value);
                                              if(AXIS2_FAILURE ==  status)
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  ");
                                              }
                                              else
                                              {
                                                axutil_array_list_add_at(arr_list, env, i, element);
                                              }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          

                                        
                                        
                                          element = (void*)axutil_base64_binary_create(env);
                                          text_value = axiom_element_get_text(current_element, env, current_node);
                                          if(text_value != NULL)
                                          {
                                              status = axutil_base64_binary_set_encoded_binary((axutil_base64_binary_t*)element, env,
                                                                              text_value);
                                              if(AXIS2_FAILURE ==  status)
                                              {
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element  ");
                                              }
                                              else
                                              {
                                                 axutil_array_list_add_at(arr_list, env, i, element);
                                              }
                                          }
                                          
                                          else
                                          {
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ");
                                                status = AXIS2_FAILURE;
                                          }
                                          


                                        
                                        
                                          
                                          /* imposible to handle the request type - so please do it manually */
                                          text_value = NULL;
                                        
                                     
                                     if(AXIS2_FAILURE ==  status)
                                     {
                                         if(element_qname)
                                         {
                                             axutil_qname_free(element_qname, env);
                                         }
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for  ");
                                         return AXIS2_FAILURE;
                                     }

                                     i ++;
                                  
                                  }
                                  
                               }
                               status = _set_(, env,
                                                                   arr_list);
                              
                            
                         
                       
                    
                  
                 
                  if(element_qname)
                  {
                     axutil_qname_free(element_qname, env);
                     element_qname = NULL;
                  }
                 
               

            
                *dp_parent = current_node;
                *dp_is_early_node_valid = is_early_node_valid;
            
          return status;
       }

          axis2_bool_t AXIS2_CALL
          _is_particle()
          {
            
              
                 return AXIS2_TRUE;
              
              
                 return AXIS2_FALSE;
              
            
          }


          void AXIS2_CALL
          _declare_parent_namespaces(
                    _t* ,
                    const axutil_env_t *env, axiom_element_t *parent_element,
                    axutil_hash_t *namespaces, int *next_ns_index)
          {
            
                  
                    yes
                  
            
            
                
                    axiom_namespace_t *element_ns = NULL;
                    axis2_char_t *qname_uri;
                    axis2_char_t *qname_prefix;
                
                
                  /* Here this is an empty function, Nothing to declare */
                
            

                
                   
                     
                       axiom_node_t* 
                       
                     
                  
                  
    
                  
                     
                       ()element
                       ->property_
                     
                  
                  
                    
                    
                      qname_uri = axutil_qname_get_uri(, env);
                      if(qname_uri && !axutil_strcmp(qname_uri, ""))
                      {
                          if(!(qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING)))
                          {
                              qname_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);

                              
                              sprintf(qname_prefix, "q%d", (*next_ns_index)++); 
                              axutil_hash_set(namespaces, qname_uri, AXIS2_HASH_KEY_STRING, qname_prefix);

                              if(parent_element)
                              {
                                    element_ns = axiom_namespace_create(env, qname_uri,
                                                                        qname_prefix);
                                    axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);
                              }
                          }
                      }
                    
                  
               
          }

        
            axis2_char_t* AXIS2_CALL
            _serialize_to_string(
                    _t* ,
                    const axutil_env_t *env, axutil_hash_t *namespaces)
            {
                axis2_char_t *text_value = NULL;
                axis2_char_t *qname_uri = NULL;
                axis2_char_t *qname_prefix = NULL;
                
                   int i;
                   int allocated_len = 0;
                   axis2_char_t *tmp_value;
                

                
                   
                    
                    
                       
                         axutil_array_list_t*
                         axiom_node_t* 
                         
                       
                    
                     
                       
                         axiom_node_t* 
                         
                       
                    
                    
                    
      
                    
                       
                         ()element
                         ->property_
                       
                    
                    
                       
                         element
                         ->property_
                       
                    


                   
                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      
                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%c", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t));
                      

                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER, (uint64_t));
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%f", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%f", );
                      

                      
                      
                         text_value = (axis2_char_t*)axutil_xml_quote_string(env, , AXIS2_FALSE);
                         if (!text_value)
                         {
                             text_value = (axis2_char_t*)axutil_strdup(env, );
                         }
                      

                      
                      
                         text_value = axutil_uri_to_string(, env, AXIS2_URI_UNP_OMITUSERINFO);
                      

                      
                      
                         text_value = axutil_duration_serialize_duration(, env);
                      

                      
                      
                        
                        qname_uri = axutil_qname_get_uri(, env);
                        if(qname_uri == NULL)
                        {
                              text_value = (axis2_char_t*)axutil_strdup(env, axutil_qname_get_localpart(, env));
                        }
                        else
                        {
                          qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING);
                          if(qname_prefix != NULL)
                          {
                              text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, 
                                          sizeof (axis2_char_t) * (ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                              axutil_strlen(axutil_qname_get_localpart(, env)) + 2));
                              sprintf(text_value, "%s:%s", qname_prefix,
                                                        axutil_qname_get_localpart(, env));
                          }
                          else
                          {
                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in serialize_to_string value for , "
                                                          "Prefix is not declared beofre using");
                              return NULL;
                          }
                        }
                      

                      
                      
                         
                         text_value = (axis2_char_t*)(axutil_strdup(env, ()?"true":"false"));
                      
                      
                      
                         text_value =  axutil_date_time_serialize_date_time(, env);
                      
                      
                      
                         text_value =  axutil_base64_binary_get_encoded_binary(, env);
                      
                      
                        if()
                        {
                            text_value = _serialize_to_string(, env, namespaces);
                        }
                      
                      
                        
                        /* can not handle the property type */
                        text_value = NULL;
                      
                    
                  
                

            
            
                axutil_array_list_t*
                
                
 
                 
                   
                     axiom_node_t* 
                     
                   
                
                   
                     
                       axiom_node_t* 
                       *
                       
                     
                  
                
                ()element
                element

                for(i = 0, allocated_len = 2, text_value = (axis2_char_t*) axutil_strdup(env, ""); 
                            i < _sizeof_(, env); i ++)
                {
                   element;
                  axis2_char_t *seperator = (i == _sizeof_(, env) - 1)?"":ADB_DEFAULT_LIST_SEPERATOR;
                  element = _get__at(, env, i);
                    
                 
                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%d%s", text_value, element, seperator);
                    
                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%d%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%c%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%d%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s" AXIS2_PRINTF_INT64_FORMAT_SPECIFIER "%s", text_value, element, seperator);
                    

                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s" AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER "%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%f%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%f%s", text_value, element, seperator);
                    

                    
                    
                       allocated_len += sizeof (axis2_char_t) * axutil_strlen(element) + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%s%s", text_value, element, seperator);
                    

                    
                    
                       tmp_value = axutil_uri_to_string(element, env, AXIS2_URI_UNP_OMITUSERINFO);
                       allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                    

                    
                    
                       tmp_value = axutil_duration_serialize_duration(element, env);
                       allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                       text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                       sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                    

                    
                    
                      
                      qname_uri = axutil_qname_get_uri(element, env);
                      if(qname_uri == NULL)
                      {
                           tmp_value = axutil_qname_get_localpart(element, env);
                           allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                           text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                           sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                      }
                      else
                      {
                        qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING);
                        if(qname_prefix != NULL)
                        {
                            tmp_value = axutil_qname_get_localpart(element, env);
                            allocated_len += sizeof (axis2_char_t) * (ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT  + 1 +
                                                            axutil_strlen(tmp_value) + 2);
                            text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                            
                            sprintf(text_value, "%s%s:%s%s", text_value, qname_prefix,
                                                      tmp_value, seperator);
                        }
                        else
                        {
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in serialize_to_string value for , "
                                                        "Prefix is not declared beofre using");
                            return NULL;
                        }
                     }
                    

                    
                    
                       
                           tmp_value = (axis2_char_t*)((element)?"true":"false");
                           allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                           text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                           sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                    
                    
                    
                           tmp_value = axutil_date_time_serialize_date_time(element, env);
                           allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                           text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                           sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                    
                    
                    
                           tmp_value = axutil_base64_binary_get_encoded_binary(element, env);
                           allocated_len += sizeof (axis2_char_t) * axutil_strlen(tmp_value) + 1;
                           text_value = (axis2_char_t*) AXIS2_REALLOC (env-> allocator, text_value, allocated_len);
                           sprintf (text_value, "%s%s%s", text_value, tmp_value, seperator);
                    
                    
                        if(element)
                        {
                            text_value = _serialize_to_string(element, env, namespaces);
                        }
                    
                    
                      
                      /* can not handle the property type */
                    
                  
                }
                
                
                
                
                void *element = NULL;
                if(!->current_value || !axutil_strcmp("",->current_value))
                {
                    text_value = NULL;
                }
                
                   
                      
                   ->member_type._   
                  else if(!axutil_strcmp("",->current_value))
                  {
                   
                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      
                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%c", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%d", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t));
                      

                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER, (uint64_t));
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%f", );
                      

                      
                      
                         text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                         sprintf (text_value, "%f", );
                      

                      
                      
                         text_value = (axis2_char_t*)axutil_strdup(env, );
                      

                      
                      
                         text_value = axutil_uri_to_string(, env, AXIS2_URI_UNP_OMITUSERINFO);
                      

                      
                      
                         text_value = axutil_duration_serialize_duration(, env);
                      

                      
                      
                        
                        qname_uri = axutil_qname_get_uri(, env);
                        if(qname_uri == NULL)
                        {
                              text_value = (axis2_char_t*)axutil_strdup(env, axutil_qname_get_localpart(, env));
                        }
                        else
                        {
                          qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING);
                          if(qname_prefix != NULL)
                          {
                              text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, 
                                          sizeof (axis2_char_t) * (ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                              axutil_strlen(axutil_qname_get_localpart(, env)) + 2));
                              sprintf(text_value, "%s:%s", qname_prefix,
                                                        axutil_qname_get_localpart(, env));
                          }
                          else
                          {
                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in serialize_to_string value for , "
                                                          "Prefix is not declared beofre using");
                              return NULL;
                          }
                        }
                      

                      
                      
                         
                         text_value = (axis2_char_t*)(axutil_strdup(env, ()?"true":"false"));
                      
                      
                      
                         text_value =  axutil_date_time_serialize_date_time(, env);
                      
                      
                      
                         text_value =  axutil_base64_binary_get_encoded_binary(, env);
                      
                      
                        if()
                        {
                            text_value = _serialize_to_string(, env, namespaces);
                        }
                      
                      
                        
                        /* can not handle the property type */
                        text_value = NULL;
                      
                    
                }
                
                
                return text_value;
            }
        
        
        axiom_node_t* AXIS2_CALL
        _serialize(
                _t* ,
                const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
        {
            
            
            
            if ( == NULL)
            {
                return _serialize_obj(
                    , env, parent, parent_element, parent_tag_closed, namespaces, next_ns_index);
            }
            else
            {
                return axis2_extension_mapper_serialize(
                    (adb_type_t*) , env, parent, parent_element, parent_tag_closed, namespaces, next_ns_index, "");
            }
            
            
                return _serialize_obj(
                    , env, parent, parent_element, parent_tag_closed, namespaces, next_ns_index);
            
            
        }

        axiom_node_t* AXIS2_CALL
        _serialize_obj(
                _t* ,
                const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
        {
            
            
             
               axiom_attribute_t *text_attri = NULL;
             
            
            
             axis2_char_t *string_to_stream;
            
         
         axiom_node_t* current_node = NULL;
         int tag_closed = 0;
         
         axis2_char_t* xsi_prefix = NULL;
         
         
         axis2_char_t* type_attrib = NULL;
         axiom_namespace_t* xsi_ns = NULL;
         axiom_attribute_t* xsi_type_attri = NULL;
         
         
         
           
            axiom_data_source_t *data_source = NULL;
            axutil_stream_t *stream = NULL;
            axis2_char_t *text_value;
             
              
               axiom_namespace_t *ns1 = NULL;
               axis2_char_t *p_prefix = NULL;
              
             
           

           
           
                axiom_namespace_t *ns1 = NULL;

                axis2_char_t *qname_uri = NULL;
                axis2_char_t *qname_prefix = NULL;
                axis2_char_t *p_prefix = NULL;
                axis2_bool_t ns_already_defined;
            
             
               int i = 0;
               int count = 0;
               void *element = NULL;
             
            
            
                
                
                    
                    axis2_char_t *text_value_;
                    axis2_char_t *text_value__temp;
                    
                    
                    axis2_char_t text_value_[ADB_DEFAULT_DIGIT_LIMIT];
                    
                
            

            
             
                axis2_char_t *text_value = NULL;
             
            
            
               axis2_char_t *start_input_str = NULL;
               axis2_char_t *end_input_str = NULL;
               unsigned int start_input_str_len = 0;
               unsigned int end_input_str_len = 0;
            
            
               axiom_data_source_t *data_source = NULL;
               axutil_stream_t *stream = NULL;

             
                int next_ns_index_value = 0;
            

            AXIS2_ENV_CHECK(env, NULL);
            AXIS2_PARAM_CHECK(env->error, , NULL);
            
             
                    namespaces = axutil_hash_make(env);
                    next_ns_index = &next_ns_index_value;
                    
                        
                           ns1 = axiom_namespace_create (env,
                                             "",
                                             "n"); 
                           axutil_hash_set(namespaces, "", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n"));
                       
                        
                           ns1 = NULL; 
                       
                    
                     
                    parent_element = axiom_element_create (env, NULL, "", ns1 , &parent);
                    
                    
                    axiom_element_set_namespace(parent_element, env, ns1, parent);


            
             
            

                
                    current_node = parent;
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
                    if (!data_source)
                        return NULL;
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
                    if (!stream)
                        return NULL;
                  
                
                  
                    data_source = axiom_data_source_create(env, parent, &current_node);
                    stream = axiom_data_source_get_stream(data_source, env);
                  
                


            
            
            
            if(!parent_tag_closed)
            {
            
            
              
              
                 
                   axutil_array_list_t*
                   axiom_node_t* 
                   
                 
              
               
                 
                   axiom_node_t* 
                   
                 
              
              
              

              
                 
                   ()element
                   ->property_
                 
              
              
                 
                   element
                   ->property_
                 
              

              
                
                    :
                    
                
              
              
                
              
              ->property_
                
                if(->is_valid_)
                {
                
                
                    int i = 0;
                    for( i = 0; i < axutil_array_list_size(, env); i ++)
                    {
                        axiom_attribute_t *the_attrib = NULL;
                        axiom_attribute_t *dup_attrib = NULL;
                        axis2_char_t *uri = NULL;
                        axis2_char_t *p_prefix = NULL;
                        axutil_qname_t *qname = NULL;
                        axis2_char_t *value = NULL;
                        axis2_char_t *local_name = NULL;

                        the_attrib = axutil_array_list_get(, env, i);
                        qname = axiom_attribute_get_qname(the_attrib, env);
                        uri = axutil_qname_get_uri(qname, env);
                        value = axiom_attribute_get_value(the_attrib, env);
                        local_name = axutil_qname_get_localpart(qname, env);

                        p_prefix = NULL;
                        if(uri) /* means we have to go for a prefix */
                        {
                            if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, uri, AXIS2_HASH_KEY_STRING)))
                            {
                                p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                                sprintf(p_prefix, "n%d", (*next_ns_index)++);
                                axutil_hash_set(namespaces, uri, AXIS2_HASH_KEY_STRING, p_prefix);
                                axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                         uri,
                                                         p_prefix));
                                 
                            }

                        }

                        text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                         (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                          axutil_strlen(local_name) + 
                                                             axutil_strlen(value)));
                        sprintf(text_value, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                             local_name, value);
                        axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                        AXIS2_FREE(env-> allocator, text_value);
                    }
                
                
                    
                      
                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "", AXIS2_HASH_KEY_STRING)))
                        {
                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
                            axutil_hash_set(namespaces, "", AXIS2_HASH_KEY_STRING, p_prefix);
                            axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                     "",
                                                     p_prefix));
                        }
                      
                      
                        p_prefix = NULL;
                      
                    

                      
                      
                      
                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5 + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                                                            
                           sprintf(text_value, " %s%s%s=\"%d\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        
                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%d\"", p_prefix?p_prefix:"", (p_prefix  && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%c\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%d\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"" AXIS2_PRINTF_INT64_FORMAT_SPECIFIER  "\"", p_prefix?p_prefix:"", 
                                                (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"" AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER  "\"", p_prefix?p_prefix:"", 
                                                (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%f\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (ADB_DEFAULT_DIGIT_LIMIT + 5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%f\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * 
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen() + 
                                                                axutil_strlen("")));
                           sprintf(text_value, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "", );
                           axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = axutil_uri_to_string(, env, AXIS2_URI_UNP_OMITUSERINFO);
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                        

                        
                        
                           text_value = axutil_duration_serialize_duration(, env);
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                        

                        
                        
                           qname_uri =  axutil_qname_get_uri(, env);
                           if(qname_uri && !axutil_strcmp(qname_uri, ""))
                           {
                               if(!(qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING)))
                               {
                                   qname_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);

                                   sprintf(qname_prefix, "q%d", (*next_ns_index) ++); 
                                   axutil_hash_set(namespaces, qname_uri, AXIS2_HASH_KEY_STRING, qname_prefix);

                                   axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                                                        qname_uri,
                                                                                        qname_prefix));
                               }
                               text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                                 (2 + axutil_strlen(qname_prefix) +
                                                                    axutil_strlen(axutil_qname_get_localpart(, env))));
                               sprintf(text_value, "%s%s%s", qname_prefix, (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                           axutil_qname_get_localpart(, env));
                           }
                           else
                           {
                               text_value = (axis2_char_t*)axutil_strdup(env, axutil_qname_get_localpart(, env));
                           }

                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);

                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env->allocator, string_to_stream);
                           AXIS2_FREE(env->allocator, text_value);
                        

                        
                        
                           
                           text_value = (axis2_char_t*)(()?"true":"false");
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                        
                        
                        
                           text_value =  axutil_date_time_serialize_date_time(, env);
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                        
                        
                        
                           text_value =  axutil_base64_binary_get_encoded_binary(, env);
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                        
                        
        
                           _declare_parent_namespaces(,
                                                                                      env, parent_element, namespaces, next_ns_index);
                           text_value = _serialize_to_string(, env, namespaces);
                           string_to_stream = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *
                                                            (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(text_value) + 
                                                             axutil_strlen("")));
                           sprintf(string_to_stream, " %s%s%s=\"%s\"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",
                                                "",  text_value);
                           axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
                           AXIS2_FREE(env-> allocator, string_to_stream);
                           AXIS2_FREE(env-> allocator, text_value);
                        
                        
                          
                          /* can not handle the attribute type */
                           text_value = NULL;
                        
                      
                      
                    
                   }
                   
                   
                   else
                   {
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-optional attribute ");
                      return NULL;
                   }
                   
                   
                 
            


            
              
 
              if(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))
              {
                  /* it is better to stick with the standard prefix */
                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");
                  
                  axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);

                  if(parent_element)
                  {
                        axiom_namespace_t *element_ns = NULL;
                        element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",
                                                            xsi_prefix);
                        axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);
                  }
              }
              type_attrib = axutil_strcat(env, " ", xsi_prefix, ":type=\"\"", NULL);
              axutil_stream_write(stream, env, type_attrib, axutil_strlen(type_attrib));

              AXIS2_FREE(env->allocator, type_attrib);
                
              string_to_stream = ">"; 
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
              tag_closed = 1;
            

             
            
            }
            else {
              /* if the parent tag closed we would be able to declare the type directly on the parent element */ 
              if(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))
              {
                  /* it is better to stick with the standard prefix */
                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");
                  
                  axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);

                  if(parent_element)
                  {
                        axiom_namespace_t *element_ns = NULL;
                        element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",
                                                            xsi_prefix);
                        axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);
                  }
              }
            }
            xsi_ns = axiom_namespace_create (env,
                                 "",
                                 xsi_prefix);
            xsi_type_attri = axiom_attribute_create (env, "type", "", xsi_ns);
            
            axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent);
        

            
            /* here we need to declare the union type in the xsi:type field */
            
            if(axutil_strcmp(->current_value, ""))
            {

                if(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))
                {
                    /* it is better to stick with the standard prefix */
                    xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");
                    
                    axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);

                    if(parent_element)
                    {
                          axiom_namespace_t *element_ns = NULL;
                          element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",
                                                              xsi_prefix);
                          axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);
                    }
                }

                
                    
                    
                    

                    if(!axutil_strcmp(->current_value, ""))
                    {
                        axis2_char_t *ns_prefix = NULL;

                        if(!(ns_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "", AXIS2_HASH_KEY_STRING)))
                        {
                            ns_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                            
                            sprintf(ns_prefix, "q%d", (*next_ns_index)++); 
                            axutil_hash_set(namespaces, "", AXIS2_HASH_KEY_STRING, ns_prefix);

                            if(parent_element)
                            {
                                  axiom_namespace_t *element_ns = NULL;
                                  element_ns = axiom_namespace_create(env, "",
                                                                      ns_prefix);
                                  axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);
                            }
                        }

                        /* now we will set the xsi:type="ns:type" value */

                       if(!parent_tag_closed && !tag_closed)
                       {
                            text_value = axutil_strcat(env, xsi_prefix, ":type=", ns_prefix, ":", ->current_value, NULL);
                            axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));

                            AXIS2_FREE(env->allocator, text_value);
                        }
                        else 
                        {
                            /* otherwise set it to the prarent itself */

                             axiom_namespace_t *ns1 = NULL;
                             axiom_attribute_t *attrib = NULL;
                        
                             ns1 = axiom_namespace_create (env,
                                                         "http://www.w3.org/2001/XMLSchema-instance",
                                                         xsi_prefix);
                        
                             text_value = axutil_strcat(env, ns_prefix, ":", ->current_value, NULL);
                             attrib = axiom_attribute_create (env, "type", text_value, ns1);
                             axiom_element_add_attribute (parent_element, env, attrib, parent);
                            
                             AXIS2_FREE(env->allocator, text_value);
                        }
                    }
                
            }
            

            
               if(!parent_tag_closed && !tag_closed)
               {
                  text_value = ">"; 
                  axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
               }
               
               text_value = _serialize_to_string(, env, namespaces);
               if(text_value)
               {
                    axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));
                    AXIS2_FREE(env->allocator, text_value);
               }
            

            
              
              
                 
                   axutil_array_list_t*
                   axiom_node_t* 
                   
                 
              
               
                 
                   axiom_node_t* 
                   
                 
              
              
              

              
                 
                   ()element
                   ->property_
                 
              
              
                 
                   element
                   ->property_
                 
              
              ->property_

              
                
                    
                    if(parent_tag_closed)
                    {
                       if(->is_valid_)
                       {
                       
                       
                        int i = 0;
                        for( i = 0; i < axutil_array_list_size(, env); i ++)
                        {
                            axiom_attribute_t *the_attrib = NULL;
                            axiom_attribute_t *dup_attrib = NULL;
                            axis2_char_t *uri = NULL;
                            axis2_char_t *p_prefix = NULL;
                            axutil_qname_t *qname = NULL;
                            axis2_char_t *value = NULL;
                            axis2_char_t *local_name = NULL;
                            axiom_namespace_t *ns1 = NULL;

                            the_attrib = axutil_array_list_get(, env, i);
                            qname = axiom_attribute_get_qname(the_attrib, env);
                            uri = axutil_qname_get_uri(qname, env);
                            value = axiom_attribute_get_value(the_attrib, env);
                            local_name = axutil_qname_get_localpart(qname, env);

                            p_prefix = NULL;
                            if(uri) /* means we have to go for a prefix */
                            {
                                if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, uri, AXIS2_HASH_KEY_STRING)))
                                {
                                    p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                                    sprintf(p_prefix, "n%d", (*next_ns_index)++);
                                    axutil_hash_set(namespaces, uri, AXIS2_HASH_KEY_STRING, p_prefix);
                                    axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                             uri,
                                                             p_prefix));
                                     
                                }

                            }

                            ns1 = axiom_namespace_create (env,
                                                uri,
                                                p_prefix);

                            dup_attrib = axiom_attribute_create (env, local_name, value, ns1);
                            
                            axiom_element_add_attribute (parent_element, env, dup_attrib, parent);

                        }
                       
                       
                       
                         
                           if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "", AXIS2_HASH_KEY_STRING)))
                           {
                               p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                               sprintf(p_prefix, "n%d", (*next_ns_index)++);
                               axutil_hash_set(namespaces, "", AXIS2_HASH_KEY_STRING, p_prefix);
                               
                               axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                "",
                                                p_prefix));
                           }
                           ns1 = axiom_namespace_create (env,
                                                "",
                                                p_prefix);
                         
                         
                           p_prefix = NULL;
                           ns1 = NULL;
                         
                        

                       
                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%d", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%d", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%c", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%d", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t));
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER, (uint64_t));
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%f", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * ADB_DEFAULT_DIGIT_LIMIT);
                           sprintf (text_value, "%f", );
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env-> allocator, text_value);
                        

                        
                        
                           text_value = ;
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                        

                        
                        
                           text_value = axutil_uri_to_string(, env, AXIS2_URI_UNP_OMITUSERINFO);
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                        

                        
                        
                           text_value = axutil_duration_serialize_duration(, env);
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                        

                        
                        

                           qname_uri =  axutil_qname_get_uri(, env);
                           if(qname_uri)
                           {
                               if(!(qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING)))
                               {

                                   qname_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);

                                   sprintf(qname_prefix, "q%d", (*next_ns_index) ++ ); 

                                   axutil_hash_set(namespaces, qname_uri, AXIS2_HASH_KEY_STRING, qname_prefix);
                                   
                                   axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                                     qname_uri,
                                                     qname_prefix));
                               }
                           }

                           text_value = (axis2_char_t*) AXIS2_MALLOC(env-> allocator, 
                                         sizeof (axis2_char_t) * (ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(axutil_qname_get_localpart(, env)) + 2));
                           sprintf(text_value, "%s%s%s", qname_uri?qname_prefix:"",
                                                        qname_uri?":":"",
                                                       axutil_qname_get_localpart(, env));

                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env->allocator, text_value);
                        

                        
                        
                           
                           text_value =  (axis2_char_t*)(()?axutil_strdup(env, "true"):axutil_strdup(env, "false"));
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                           AXIS2_FREE(env->allocator, text_value);
                        
                        
                        
                           text_value =  axutil_date_time_serialize_date_time(, env);
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                        
                       
                        
                           text_value =  axutil_base64_binary_get_encoded_binary(, env);
                           text_attri = axiom_attribute_create (env, "", text_value, ns1);
                           axiom_element_add_attribute (parent_element, env, text_attri, parent);
                        
                        
                           _declare_parent_namespaces(,
                                                                                      env, parent_element, namespaces, next_ns_index);
                           text_value = _serialize_to_string(, env, namespaces);
                           if(text_value)
                           {
                               text_attri = axiom_attribute_create (env, "", text_value, ns1);
                               axiom_element_add_attribute (parent_element, env, text_attri, parent);
                               AXIS2_FREE(env-> allocator, text_value);
                           }
                        
                        
                          
                          /* Can not handle the attribute type */
                           text_value = NULL;
                           parent_element = NULL;
                           text_attri = NULL;
                        
                        
                       
                       
                      }
                      
                      
                      else
                      {
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-optional attribute ");
                         return NULL;
                      }
                       
                       
                  }
                
                 
                
 
                
                if(0 == axutil_strcmp(->current_choice, ":"))
                {
                


                   
                     
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "", AXIS2_HASH_KEY_STRING)))
                       {
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
                           axutil_hash_set(namespaces, "", AXIS2_HASH_KEY_STRING, p_prefix);
                           
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                            "",
                                            p_prefix));
                       }
                     
                     
                       p_prefix = NULL;
                     
                    

                   if (!->is_valid_)
                   {
                      
                        
                          
                           /* no need to complain for minoccurs=0 element */
                            
                          
                          
                            
                            start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
                                        (5 + axutil_strlen(p_prefix) + 
                                         axutil_strlen("") + 
                                         axutil_strlen(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:nil=\"1\""))); 
                                        
                            
                            sprintf(start_input_str, "<%s%s xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:nil=\"1\"/>",
                                        p_prefix?p_prefix:"",
                                        (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
                                        
                            axutil_stream_write(stream, env, start_input_str, axutil_strlen(start_input_str));
                            AXIS2_FREE(env->allocator,start_input_str);
                          
                        
                      

                      
                        
                          
                           /* no need to complain for minoccurs=0 element */
                            
                          
                          
                            
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property ");
                            return NULL;
                          
                        
                      
                   }
                   else
                   {
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
                                 (4 + axutil_strlen(p_prefix) + 
                                  axutil_strlen(""))); 
                                 
                                 /* axutil_strlen("<:>") + 1 = 4 */
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("")));
                                  /* axutil_strlen("</:>") + 1 = 5 */
                                  
                     

                   
                   
                     /*
                      * Parsing  array
                      */
                     if (->property_ != NULL)
                     {
                        
                            

                            sprintf(start_input_str, "<%s%s",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
                            
                            
                            sprintf(start_input_str, "<%s%s>",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
                            
                        
                         start_input_str_len = axutil_strlen(start_input_str);

                         sprintf(end_input_str, "</%s%s>",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
                         end_input_str_len = axutil_strlen(end_input_str);

                         count = axutil_array_list_size(->property_, env);
                         for(i = 0; i < count; i ++)
                         {
                            element = axutil_array_list_get(->property_, env, i);

                            if(NULL == element) 
                            {
                                continue;
                            }
                    
                     
                     /*
                      * parsing  element
                      */

                    
                    
                        
                            
                            sprintf(start_input_str, "<%s%s",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
                            
                            
                            sprintf(start_input_str, "<%s%s>",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
                            
                        
                        start_input_str_len = axutil_strlen(start_input_str);
                        sprintf(end_input_str, "</%s%s>",
                                 p_prefix?p_prefix:"",
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
                        end_input_str_len = axutil_strlen(end_input_str);
                    


                      
                        
                             
                            if(!_is_particle())
                            {
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                            }
                            
                            
                            
                                
                                    AXIS2_FALSE
                                    
                                    AXIS2_FALSE
                                    AXIS2_TRUE
                                
                            
                            _serialize(, 
                                                                                 env, current_node, parent_element,
                                                                                 _is_particle() || , namespaces, next_ns_index);
                            
                            if(!_is_particle())
                            {
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                            }
                            
                        

                        
                        
                           
                             
                               sprintf (text_value_, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, *((*)element));
                             
                             
                               sprintf (text_value_, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                           
                             
                               sprintf (text_value_, AXIS2_PRINTF_UINT32_FORMAT_SPECIFIER, *((*)element));
                             
                             
                               sprintf (text_value_, AXIS2_PRINTF_UINT32_FORMAT_SPECIFIER, );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                             
                               sprintf (text_value_, "%c", *((*)element));
                             
                             
                               sprintf (text_value_, "%c", );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                           
                             
                               sprintf (text_value_, "%c", *((*)element));
                             
                             
                               sprintf (text_value_, "%c", );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                           
                             
                               sprintf (text_value_, "%d", *((*)element));
                             
                             
                               sprintf (text_value_, "%d", );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                             
                               sprintf (text_value_, "%d", *((*)element));
                             
                             
                               sprintf (text_value_, "%d", );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                           
                             
                               sprintf (text_value_, "%hu", *((*)element));
                             
                             
                               sprintf (text_value_, "%hu", );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        


                        
                        
                        
                           
                             
                               sprintf (text_value_, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t)*((*)element));
                             
                             
                               sprintf (text_value_, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t) );
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                             
                               sprintf (text_value_, AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER, (uint64_t)*((*)element));
                             
                             
                               sprintf (text_value_, AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER, (uint64_t));
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                             
                               sprintf (text_value_, "%f", (float)*((*)element));
                             
                             
                               sprintf (text_value_, "%f", (float));
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                             
                               sprintf (text_value_, "%f", (double)*((*)element));
                             
                             
                               sprintf (text_value_, "%f", (double));
                             
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           text_value_ = ;
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                            
                           text_value__temp = axutil_xml_quote_string(env, text_value_, AXIS2_TRUE);
                           if (text_value__temp)
                           {
                               axutil_stream_write(stream, env, text_value__temp, axutil_strlen(text_value__temp));
                               AXIS2_FREE(env->allocator, text_value__temp);
                           }
                           else
                           {
                               axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           }
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           text_value_ = axutil_uri_to_string(, env, AXIS2_URI_UNP_OMITUSERINFO);
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           text_value_ = axutil_duration_serialize_duration(, env);
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           

                           

                           qname_uri =  axutil_qname_get_uri(, env);
                           if(qname_uri)
                           {
                               if(!(qname_prefix = (axis2_char_t*)axutil_hash_get(namespaces, qname_uri, AXIS2_HASH_KEY_STRING)))
                               {

                                   qname_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);

                                   sprintf(qname_prefix, "q%d", (*next_ns_index) ++ ); 

                                   axutil_hash_set(namespaces, qname_uri, AXIS2_HASH_KEY_STRING, qname_prefix);
                                   axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
                                            qname_uri,
                                            qname_prefix));
                               }
                           }

                           text_value_ = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, 
                                         sizeof (axis2_char_t) * (ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +
                                                             axutil_strlen(axutil_qname_get_localpart(, env)) + 2));

                           sprintf(text_value_, "%s%s%s",
                                                       qname_uri?qname_prefix:"",
                                                       qname_uri?":":"",
                                                       axutil_qname_get_localpart(, env));

                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           AXIS2_FREE(env-> allocator, text_value_);
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                          
                        
                           strcpy(text_value_, ()?"true":"false");
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                           
                              
                                text_value_ = axiom_node_to_string(, env);
                                
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                                
                                axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                                
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                                
                              
                              
                                text_value_ = NULL; /* just to bypass the warning unused variable */
                                axiom_node_add_child(parent, env, );
                              
                           
                        

                        
                          text_value_ = axutil_date_time_serialize_date_time(, env);
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                          text_value_ =axutil_base64_binary_get_encoded_binary(, env);
                           
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
                           
                           axutil_stream_write(stream, env, text_value_, axutil_strlen(text_value_));
                           
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
                           
                        

                        
                        
                          /* This is an unknown type or a primitive. handle this manually for unknown type */
                        
                      

                   
                   
                         }
                     }
                   
                     
                     AXIS2_FREE(env->allocator,start_input_str);
                     AXIS2_FREE(env->allocator,end_input_str);
                 } 

                 
                 }
                 

                 
              
            

             
              
                
                   if(namespaces)
                   {
                       axutil_hash_index_t *hi;
                       void *val;
                       for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi)) 
                       {
                           axutil_hash_this(hi, NULL, NULL, &val);
                           AXIS2_FREE(env->allocator, val);
                       }
                       axutil_hash_free(namespaces, env);
                   }
                
              
            

            return parent;
        }


        
            
               
                    axutil_array_list_t*
                    axiom_node_t* 
                    
               
            
            
            
           
            
                 
                   axiom_node_t* 
                   
                 
              

              
              
               
                 
                   axiom_node_t* 
                   
                    *
                   
                   
                    
                   
                 
              

              
                 
                   ()element
                   ->property_
                 
              

              
                 
                   element
                   ->property_
                 
              
            
                
                   const 
                
            

            /**
             * Getter for  by  Property Number 
             */
             AXIS2_CALL
            _get_property(
                _t* ,
                const axutil_env_t *env)
            {
                return _get_(,
                                             env);
            }

            /**
             * getter for .
             */
             AXIS2_CALL
            _get_(
                    _t* ,
                    const axutil_env_t *env)
             {
                
                  
                    AXIS2_ENV_CHECK(env, ()0);
                    AXIS2_PARAM_CHECK(env->error, , ()0);
                  
                  
                    AXIS2_ENV_CHECK(env, NULL);
                    AXIS2_PARAM_CHECK(env->error, , NULL);
                  
                

                return ->property_;
             }

            /**
             * setter for 
             */
            axis2_status_t AXIS2_CALL
            _set_(
                    _t* ,
                    const axutil_env_t *env,
                      arg_)
             {
                
                 int size = 0;
                 int i = 0;
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
                
                if(->is_valid_ &&
                        arg_ == ->property_)
                {
                    
                        ->current_choice = ":";
                    
                    return AXIS2_SUCCESS; 
                }

                
                 size = axutil_array_list_size(arg_, env);
                 
                     if (size > )
                     {
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, " has exceed the maxOccurs()");
                         return AXIS2_FAILURE;
                     }
                 
                 if (size < )
                 {
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, " has less than minOccurs()");
                     return AXIS2_FAILURE;
                 }
                 for(i = 0; i < size; i ++ )
                 {
                     if(NULL != axutil_array_list_get(arg_, env, i))
                     {
                         non_nil_exists = AXIS2_TRUE;
                         break;
                     }
                 }

                 
                    if(!non_nil_exists)
                    {
                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "All the elements in the array of  is being set to NULL, but it is not a nullable or minOccurs=0 element");
                        return AXIS2_FAILURE;
                    }
                 
                 

                
                  if(NULL == arg_)
                  {
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, " is being set to NULL, but it is not a nullable element");
                      return AXIS2_FAILURE;
                  }
                

                
                _reset_(, env);

                
                if(NULL == arg_)
                {
                    /* We are already done */
                    return AXIS2_SUCCESS;
                }
                

                
                    
                        ->property_ = arg_;
                        if(non_nil_exists)
                        {
                            ->is_valid_ = AXIS2_TRUE;
                        }
                        
                    
                    
                        ->property_ = (axis2_char_t *)axutil_strdup(env, arg_);
                        if(NULL == ->property_)
                        {
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for ");
                            return AXIS2_FAILURE;
                        }
                        ->is_valid_ = AXIS2_TRUE;
                    
                    
                        ->property_ = arg_;
                        ->is_valid_ = AXIS2_TRUE;
                    
                
                
                    ->current_choice = ":";
                
                return AXIS2_SUCCESS;
             }

            
               adb__enum_t
             /**
             * specialized enum getter for .
             */
              AXIS2_CALL
             _get__enum(
                 _t* ,
                 const axutil_env_t *env)
             {
                 AXIS2_ENV_CHECK(env, -1);
                 AXIS2_PARAM_CHECK(env->error, , -1);
             
             
                 if (axutil_strcmp(->property_, "") == 0)
                    return _;
             
             
                 /* Error: none of the strings matched; invalid enum value */
                 return -1;
             }
             
             
             /**
             * specialized enum setter for .
             */
             axis2_status_t AXIS2_CALL
            _set__enum(
                    _t* ,
                    const axutil_env_t *env,
                      arg_)
             {
                
                 int size = 0;
                 int i = 0;
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

                
                   _reset_(, env);

                   
                   switch (arg_)
                   {
                     
                       case _ :
                          ->property_ = (axis2_char_t *)axutil_strdup(env, "");
                          break;
                     
                     
                       default:
                          ->is_valid_ = AXIS2_FALSE;
                          ->property_ = NULL;
                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error setting : undefined enum value");
                          return AXIS2_FAILURE;
                   }
                
                   if(NULL == ->property_)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memory for ");
                       return AXIS2_FAILURE;
                   }
                        ->is_valid_ = AXIS2_TRUE;
                        
                
                    ->current_choice = ":";
                
                return AXIS2_SUCCESS;
             }
            

            
            /**
             * Get ith element of .
             */
             AXIS2_CALL
            _get__at(
                    _t* ,
                    const axutil_env_t *env, int i)
            {
                 ret_val;

                
                  
                    AXIS2_ENV_CHECK(env, ()0);
                    AXIS2_PARAM_CHECK(env->error, , ()0);
                  
                  
                    AXIS2_ENV_CHECK(env, NULL);
                    AXIS2_PARAM_CHECK(env->error, , NULL);
                  
                

                if(->property_ == NULL)
                {
                    return ()0;
                }
                ret_val = ()axutil_array_list_get(->property_, env, i);
                
                  
                    if(ret_val)
                    {
                        return *ret_val;
                    }
                    return ()0;
                  
                  
                    return ret_val;
                  
                
            }

            /**
             * Set the ith element of .
             */
            axis2_status_t AXIS2_CALL
            _set__at(
                    _t* ,
                    const axutil_env_t *env, int i,
                     arg_)
            {
                void *element = NULL;
                int size = 0;
                int j;
                int non_nil_count;
                axis2_bool_t non_nil_exists = AXIS2_FALSE;

                
                    ptr_param_;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
                
                if( ->is_valid_ &&
                    ->property_ &&
                
                  
                    arg_ == *(()axutil_array_list_get(->property_, env, i)))
                  
                  
                    arg_ == ()axutil_array_list_get(->property_, env, i))
                  
                
                {
                    
                        ->current_choice = ":";
                    
                    return AXIS2_SUCCESS; 
                }

                
                  
                     non_nil_exists = AXIS2_TRUE; /* no way to check for nill for each elements for primitive types */
                  
                  
                    if(NULL != arg_)
                    {
                        non_nil_exists = AXIS2_TRUE;
                    }
                    else {
                        if(->property_ != NULL)
                        {
                            size = axutil_array_list_size(->property_, env);
                            for(j = 0, non_nil_count = 0; j < size; j ++ )
                            {
                                if(i == j) continue; 
                                if(NULL != axutil_array_list_get(->property_, env, i))
                                {
                                    non_nil_count ++;
                                    non_nil_exists = AXIS2_TRUE;
                                    if(non_nil_count >= )
                                    {
                                        break;
                                    }
                                }
                            }

                         
                            if( non_nil_count < )
                            {
                                   AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of  is beinng set to be smaller than the specificed number of minOccurs()");
                                   return AXIS2_FAILURE;
                            }
                        
                        }
                    }
                  
                

                
                   if(!non_nil_exists)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "All the elements in the array of  is being set to NULL, but it is not a nullable or minOccurs=0 element");
                       return AXIS2_FAILURE;
                   }
                

                if(->property_ == NULL)
                {
                    ->property_ = axutil_array_list_create(env, 10);
                }
                
                /* check whether there already exist an element */
                element = axutil_array_list_get(->property_, env, i);
                if(NULL != element)
                {
                  
                  
                  
                     
                        _free(, env);
                     
            
                     
                        
                        /* we keep primtives as pointers in arrasy, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                  
                }

                
                    if(!non_nil_exists)
                    {
                        
                        ->is_valid_ = AXIS2_FALSE;
                        axutil_array_list_set(->property_ , env, i, NULL);
                        
                            
                        
                        return AXIS2_SUCCESS;
                    }
                
                
                
                  
                   ptr_param_ =  ()
                            AXIS2_MALLOC(env->allocator, sizeof());
                   if(->property_ == NULL)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for new value of ");
                       return AXIS2_FAILURE;
                       
                   }
                   *ptr_param_ = arg_;
                   axutil_array_list_set(->property_ , env, i, ptr_param_);
                  
                  
                   axutil_array_list_set(->property_ , env, i, axutil_strdup(env, arg_));
                  
                  
                   axutil_array_list_set(->property_ , env, i, arg_);
                  
                
                ->is_valid_ = AXIS2_TRUE;
                
                    ->current_choice = ":";
                
                return AXIS2_SUCCESS;
            }

            /**
             * Add to .
             */
            axis2_status_t AXIS2_CALL
            _add_(
                    _t* ,
                    const axutil_env_t *env,
                     arg_ )
             {
                
                    ptr_param_;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

                
                  
                  
                  
                    if(NULL == arg_)
                    {
                      
                        
                           AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "All the elements in the array of  is being set to NULL, but it is not a nullable or minOccurs=0 element");
                           return AXIS2_FAILURE;
                        
                        
                           return AXIS2_SUCCESS; 
                        
                      
                    }
                  
                

                if(->property_ == NULL)
                {
                    ->property_ = axutil_array_list_create(env, 10);
                }
                if(->property_ == NULL)
                {
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for ");
                    return AXIS2_FAILURE;
                    
                }
                
                  
                   ptr_param_ =  ()
                            AXIS2_MALLOC(env->allocator, sizeof());
                   if(->property_ == NULL)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for new value of ");
                       return AXIS2_FAILURE;
                       
                   }
                   *ptr_param_ = arg_;
                   axutil_array_list_add(->property_ , env, ptr_param_);
                  
                  
                   axutil_array_list_add(->property_ , env, axutil_strdup(env, arg_));
                  
                  
                   axutil_array_list_add(->property_ , env, arg_);
                  
                
                ->is_valid_ = AXIS2_TRUE;
                return AXIS2_SUCCESS;
             }

            /**
             * Get the size of the  array.
             */
            int AXIS2_CALL
            _sizeof_(
                    _t* ,
                    const axutil_env_t *env)
            {
                AXIS2_ENV_CHECK(env, -1);
                AXIS2_PARAM_CHECK(env->error, , -1);
                if(->property_ == NULL)
                {
                    return 0;
                }
                return axutil_array_list_size(->property_, env);
            }

            /**
             * remove the ith element, same as set_nil_at.
             */
            axis2_status_t AXIS2_CALL
            _remove__at(
                    _t* ,
                    const axutil_env_t *env, int i)
            {
                return _set__nil_at(, env, i);
            }

            

           /**
            * resetter for 
            */
           axis2_status_t AXIS2_CALL
           _reset_(
                   _t* ,
                   const axutil_env_t *env)
           {
               int i = 0;
               int count = 0;
               void *element = NULL;

               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
               AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
               

               
                
                
                  if (->property_ != NULL)
                  {
                      count = axutil_array_list_size(->property_, env);
                      for(i = 0; i < count; i ++)
                      {
                         element = axutil_array_list_get(->property_, env, i);
                
            
                
                if( != NULL)
                {
                   
                   
                     
                        _free(, env);
                     
            
                     
                       
                        
                        /* we keep primtives as pointers in arrasy, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                       
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                   
                    = NULL;
                }
            
                
                
                
                      }
                      axutil_array_list_free(->property_, env);
                  }
                
                
               ->is_valid_ = AXIS2_FALSE; 
               return AXIS2_SUCCESS;
           }

           /**
            * Check whether  is nill
            */
           axis2_bool_t AXIS2_CALL
           _is__nil(
                   _t* ,
                   const axutil_env_t *env)
           {
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
               AXIS2_PARAM_CHECK(env->error, , AXIS2_TRUE);
               
               return !->is_valid_;
           }

           /**
            * Set  to nill (currently the same as reset)
            */
           axis2_status_t AXIS2_CALL
           _set__nil(
                   _t* ,
                   const axutil_env_t *env)
           {
               return _reset_(, env);
           }

           
           /**
            * Check whether  is nill at i
            */
           axis2_bool_t AXIS2_CALL
           _is__nil_at(
                   _t* ,
                   const axutil_env_t *env, int i)
           {
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
               AXIS2_PARAM_CHECK(env->error, , AXIS2_TRUE);
               
               return (->is_valid_ == AXIS2_FALSE ||
                        NULL == ->property_ || 
                        NULL == axutil_array_list_get(->property_, env, i));
           }

           /**
            * Set  to nill at i
            */
           axis2_status_t AXIS2_CALL
           _set__nil_at(
                   _t* ,
                   const axutil_env_t *env, int i)
           {
                void *element = NULL;
                int size = 0;
                int j;
                axis2_bool_t non_nil_exists = AXIS2_FALSE;

                int k = 0;

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

                if(->property_ == NULL ||
                            ->is_valid_ == AXIS2_FALSE)
                {
                    
                    non_nil_exists = AXIS2_FALSE;
                }
                else
                {
                    size = axutil_array_list_size(->property_, env);
                    for(j = 0, k = 0; j < size; j ++ )
                    {
                        if(i == j) continue; 
                        if(NULL != axutil_array_list_get(->property_, env, i))
                        {
                            k ++;
                            non_nil_exists = AXIS2_TRUE;
                            if( k >= )
                            {
                                break;
                            }
                        }
                    }
                }
                
                   if(!non_nil_exists)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "All the elements in the array of  is being set to NULL, but it is not a nullable or minOccurs=0 element");
                       return AXIS2_FAILURE;
                   }
                

                if( k < )
                {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of  is beinng set to be smaller than the specificed number of minOccurs()");
                       return AXIS2_FAILURE;
                }
 
                if(->property_ == NULL)
                {
                    ->is_valid_ = AXIS2_FALSE;
                    
                    return AXIS2_SUCCESS;
                }

                /* check whether there already exist an element */
                element = axutil_array_list_get(->property_, env, i);
                if(NULL != element)
                {
                  
                  
                  
                     
                        _free(, env);
                     
            
                     
                        
                        /* we keep primtives as pointers in arrasy, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                  
                }

                
                    if(!non_nil_exists)
                    {
                        
                        ->is_valid_ = AXIS2_FALSE;
                        axutil_array_list_set(->property_ , env, i, NULL);
                        return AXIS2_SUCCESS;
                    }
                

                
                axutil_array_list_set(->property_ , env, i, NULL);
                
                return AXIS2_SUCCESS;

           }

            
        

        
        
            axutil_array_list_t*
            
            

             
               
                 axiom_node_t* 
                 
               
            
               
                 
                   axiom_node_t* 
                   *
                   
                 
              
            
            ()element
            element
            
                
                   const 
                
            
         
        /**
         * Get the ith element of .
         */
         AXIS2_CALL
        _get__at(
                _t* ,
                const axutil_env_t *env, int i)
        {
                 ret_val;

                
                  
                    AXIS2_ENV_CHECK(env, ()0);
                    AXIS2_PARAM_CHECK(env->error, , ()0);
                  
                  
                    AXIS2_ENV_CHECK(env, NULL);
                    AXIS2_PARAM_CHECK(env->error, , NULL);
                  
                

                if(->property_ == NULL)
                {
                    return ()0;
                }
                ret_val = ()axutil_array_list_get(->property_, env, i);
                
                  
                    if(ret_val)
                    {
                        return *ret_val;
                    }
                    return ()0;
                  
                  
                    return ret_val;
                  
                
            
        }

        /**
         * Set the ith element of . (If the ith already exist, it will be replaced)
         */
        axis2_status_t AXIS2_CALL
        _set__at(
                _t* ,
                const axutil_env_t *env, int i,
                 arg_ )
        {
                void *element = NULL;
                int size = 0;
                int j;

                
                    ptr_param_;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
                
                if( ->is_valid_ &&
                    ->property_ &&
                
                  
                    arg_ == *(()axutil_array_list_get(->property_, env, i)))
                  
                  
                    arg_ == ()axutil_array_list_get(->property_, env, i))
                  
                
                {
                    return AXIS2_SUCCESS; 
                }


                if(->property_ == NULL)
                {
                    ->property_ = axutil_array_list_create(env, 10);
                }
                
                /* check whether there already exist an element */
                element = axutil_array_list_get(->property_, env, i);
                if(NULL != element)
                {
                  
                  
                  
                     
                        _free(, env);
                     
            
                     
                        
                        /* we keep primtives as pointers in arrasy, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                  
                }

                
                
                  
                   ptr_param_ =  ()
                            AXIS2_MALLOC(env->allocator, sizeof());
                   if(->property_ == NULL)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for new value of ");
                       return AXIS2_FAILURE;
                       
                   }
                   *ptr_param_ = arg_;
                   axutil_array_list_set(->property_ , env, i, ptr_param_);
                  
                  
                   axutil_array_list_set(->property_ , env, i, axutil_strdup(env, arg_));
                  
                  
                   axutil_array_list_set(->property_ , env, i, arg_);
                  
                
                ->is_valid_ = AXIS2_TRUE;
                return AXIS2_SUCCESS;

        }

        /**
         * Add to .
         */
        axis2_status_t AXIS2_CALL
        _add_(
                _t* ,
                const axutil_env_t *env,
                 arg_ )
        {
                
                    ptr_param_;
                

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);

                if(->property_ == NULL)
                {
                    ->property_ = axutil_array_list_create(env, 10);
                }
                if(->property_ == NULL)
                {
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for ");
                    return AXIS2_FAILURE;
                }

                
                  
                   ptr_param_ =  ()
                            AXIS2_MALLOC(env->allocator, sizeof());
                   if(->property_ == NULL)
                   {
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for new value of ");
                       return AXIS2_FAILURE;
                       
                   }
                   *ptr_param_ = arg_;
                   axutil_array_list_add(->property_ , env, ptr_param_);
                  
                  
                   axutil_array_list_add(->property_ , env, axutil_strdup(env, arg_));
                  
                  
                   axutil_array_list_add(->property_ , env, arg_);
                  
                
                ->is_valid_ = AXIS2_TRUE;
                return AXIS2_SUCCESS;

        }

        /**
         * Get the size of the  array.
         */
        int AXIS2_CALL
        _sizeof_(
                    _t* , 
                    const axutil_env_t *env)
        {
                AXIS2_ENV_CHECK(env, -1);
                AXIS2_PARAM_CHECK(env->error, , -1);
                if(->property_ == NULL)
                {
                    return 0;
                }
                return axutil_array_list_size(->property_, env);
        }


        /**
         * Remove the ith element of .
         */
        axis2_status_t AXIS2_CALL
        _remove__at(
                _t* ,
                const axutil_env_t *env, int i)
        {
                void *element = NULL;
                int size = 0;
                int j;

                int k = 0;

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);


                if(->property_ == NULL)
                {
                    ->is_valid_ = AXIS2_FALSE;
                    
                    return AXIS2_SUCCESS;
                }

                /* check whether there already exist an element */
                element = axutil_array_list_get(->property_, env, i);
                if(NULL != element)
                {
                  
                  
                  
                     
                        _free(, env);
                     
            
                     
                        
                        /* we keep primtives as pointers in arrasy, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                  
                }

                
                axutil_array_list_set(->property_ , env, i, NULL);
                
                return AXIS2_SUCCESS;
        }

        /**
         * Getter for  by  Property Number 
         */
         AXIS2_CALL
        _get_property(
            _t* ,
            const axutil_env_t *env)
        {
            return _get_(,
                                                        env);
        }


        /**
         * Getter for .
         */
         AXIS2_CALL
        _get_(
            _t* ,
            const axutil_env_t *env)
        {
             
               
                 AXIS2_ENV_CHECK(env, ()0);
                 AXIS2_PARAM_CHECK(env->error, , ()0);
               
               
                 AXIS2_ENV_CHECK(env, NULL);
                 AXIS2_PARAM_CHECK(env->error, , NULL);
               
             

             return ->property_;
        }

        /**
         * Setter for .
         */
        axis2_status_t AXIS2_CALL
        _set_(
            _t* ,
            const axutil_env_t *env,
              arg_)
        {

                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
                AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
                
                if(->is_valid_ &&
                        arg_ == ->property_)
                {
                    
                        ->current_choice = ":";
                    
                    return AXIS2_SUCCESS; 
                }

                
                _reset_(, env);

                
                if(NULL == arg_)
                {
                    /* We are already done */
                    return AXIS2_SUCCESS;
                }
                

                ->property_ = arg_;
                ->is_valid_ = AXIS2_TRUE;

                return AXIS2_SUCCESS;
            
        }
        

        /**
         * Resetter for 
         */
        axis2_status_t AXIS2_CALL
        _reset_(
            _t* ,
            const axutil_env_t *env)
        {
               int i = 0;
               int count = 0;
               void *element = NULL;

               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
               AXIS2_PARAM_CHECK(env->error, , AXIS2_FAILURE);
               

                
                  if (->property_ != NULL)
                  {
                      count = axutil_array_list_size(->property_, env);
                      for(i = 0; i < count; i ++)
                      {
                         element = axutil_array_list_get(->property_, env, i);
            
                
                if( != NULL)
                {
                   
                   
                     
                        _free(, env);
                     
            
                     
                        
                        /* we keep primtives as pointers in arrays, so need to free them */
                        AXIS2_FREE(env-> allocator, element);
                     
            
                     
                     
                        AXIS2_FREE(env-> allocator, );
                     
            
                     
                     
                      axiom_node_free_tree (, env);
                     
            
                     
                      axutil_qname_free(, env);
                     
            
                     
                      axutil_uri_free(, env);
                     
            
                     
                      axutil_duration_free(, env);
                     
            
                     
                      axutil_date_time_free(, env);
                     
            
                     
                      axutil_base64_binary_free (, env);
                     
                       
                      axutil_duration_free (, env);
                     
            
                     
                     
                       /* This is an unknown type or a primitive. Please free this manually*/
                     
                   
                    = NULL;
                }
            
                
                
                      }
                      axutil_array_list_free(->property_, env);
                  }
               ->is_valid_ = AXIS2_FALSE; 
               return AXIS2_SUCCESS;

        }


        

        
            
            
 
             AXIS2_CALL
            _get_(
                _t* ,
                const axutil_env_t *env)
            {
                if(!axutil_strcmp(->current_value, ""))
                {
                    return ->member_type._;
                }
                return ()0;
            }
 
            axis2_status_t AXIS2_CALL
            _set_(
                _t* ,
                const axutil_env_t *env, 
                 member_type)
            {
                axis2_status_t status;
                status = _reset_members(, env);
               
                if(status == AXIS2_SUCCESS)
                {
                    
                    
                        ->member_type._ = axutil_strdup(env, member_type);
                    
                    
                        ->member_type._ = member_type;
                    
                    
                    ->current_value = "";
                }

                return status;
            }

            axis2_bool_t AXIS2_CALL
            _is_valid_(
                _t* ,
                const axutil_env_t *env)
            {
                return !axutil_strcmp(->current_value, "");
            }
        
    
        

        axis2_status_t AXIS2_CALL
        _reset_members(
            _t* ,
            const axutil_env_t *env)
        {

            if(!axutil_strcmp(->current_value, ""))
            {
                /* do nothing */
            }
            
                
                

                else if(!axutil_strcmp(->current_value, ""))
                {
                    
                        
                            _free(->member_type._, env);
                        
                        
                            AXIS2_FREE(env->allocator, ->member_type._);
                        
                        
                            
                        
                    
                }
               
            ->current_value = "";
            return AXIS2_SUCCESS;
        }

        axis2_char_t* AXIS2_CALL
        _current_member_type(
            _t* ,
            const axutil_env_t *env)
        {
            return ->current_value;
        }
        

    

    
        
        axis2_

        /**
         * .c
         *
         * This file was auto-generated from WSDL
         * by the Apache Axis2/Java version: #axisVersion# #today#
         */

        #include ".h"

        #include "adb_.h"
        

        struct adb_type
        {
            axis2_char_t *property_Type;
        };

        /**
         * Auxiliary function to determine an ADB object type from its Axiom node.
         * @param env pointer to environment struct
         * @param node double pointer to the parent node to deserialize
         * @return type name on success, else NULL
         */
        axis2_char_t *AXIS2_CALL
        axis2_extension_mapper_type_from_node(
            const axutil_env_t *env,
            axiom_node_t** node)
        {
            axiom_node_t *parent = *node;
            axutil_qname_t *element_qname = NULL;
            axiom_element_t *element = NULL;

            axutil_hash_index_t *hi;
            void *val;
            axiom_attribute_t *type_attr;
            axutil_hash_t *ht;
            axis2_char_t *temp;
            axis2_char_t *type;

            while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
            {
                parent = axiom_node_get_next_sibling(parent, env);
            }

            if (NULL == parent)
            {
                /* This should be checked before everything */
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
                            "Failed in building adb object : "
                            "NULL elemenet can not be passed to deserialize");
                return AXIS2_FAILURE;
            }

            element = (axiom_element_t *)axiom_node_get_data_element(parent, env);

            ht = axiom_element_get_all_attributes(element, env);

            if (ht == NULL)
                return NULL;

            for (hi = axutil_hash_first(ht, env); hi; hi = axutil_hash_next(env, hi)) {
                axis2_char_t *localpart;
                axutil_hash_this(hi, NULL, NULL, &val);
                type_attr = (axiom_attribute_t *)val;
                localpart = axutil_qname_get_localpart(axiom_attribute_get_qname(type_attr, env), env);
                if (axutil_strcmp(localpart, "type") == 0) break;
            }

            type = axiom_attribute_get_value(type_attr, env);
            if (type != NULL && (temp = axutil_strchr(type, ':')) != NULL)
            {
                if (axutil_strchr(temp, ':') != NULL)
                    type = temp + 1; /* Pointer arithmetic */
            }

            return type;
        }

        axis2_char_t* AXIS2_CALL
        adb_type_get_type(const adb_type_t *object)
        {
            if (object != NULL)
              return object->property_Type;

            return NULL;
        }

        adb_type_t* AXIS2_CALL
        axis2_extension_mapper_create_from_node(
            const axutil_env_t *env,
            axiom_node_t** node,
            axis2_char_t *default_type)
        {
            axis2_char_t *type = axis2_extension_mapper_type_from_node(env, node);

            if (type != NULL)
            {
              
              if (axutil_strcmp(type, "") == 0)
              {
                  return (adb_type_t*) adb__create(env);
              }
              
            }

            
            if (axutil_strcmp(default_type, "adb_") == 0)
            {
                return (adb_type_t*) adb__create(env);
            }
            

            return NULL;
        }

        axis2_status_t AXIS2_CALL
        axis2_extension_mapper_free(
            adb_type_t* _object,
            const axutil_env_t *env,
            axis2_char_t *default_type)
        {
            if (_object != NULL && adb_type_get_type(_object) != NULL)
            {
            
                if (axutil_strcmp(adb_type_get_type(_object), "adb_") == 0)
                {
                    return adb__free_obj(
                    () _object, env);
                }
            
            }

            
            if (axutil_strcmp(default_type, "adb_") == 0)
            {
                return adb__free_obj(
                () _object, env);
            }
            

            return AXIS2_FAILURE;
        }

        axis2_status_t AXIS2_CALL
        axis2_extension_mapper_deserialize(
            adb_type_t* _object,
            const axutil_env_t *env,
            axiom_node_t** dp_parent,
            axis2_bool_t *dp_is_early_node_valid,
            axis2_bool_t dont_care_minoccurs,
            axis2_char_t *default_type)
        {
            if (_object != NULL && adb_type_get_type(_object) != NULL)
            {
            
                if (axutil_strcmp(adb_type_get_type(_object), "adb_") == 0)
                {
                    return adb__deserialize_obj(
                    () _object, env, dp_parent, dp_is_early_node_valid, dont_care_minoccurs);
                }
            
            }

            
            if (axutil_strcmp(default_type, "adb_") == 0)
            {
                return adb__deserialize_obj(
                () _object, env, dp_parent, dp_is_early_node_valid, dont_care_minoccurs);
            }
            

            return AXIS2_FAILURE;
        }

        axiom_node_t* AXIS2_CALL
        axis2_extension_mapper_serialize(
            adb_type_t* _object,
            const axutil_env_t *env,
            axiom_node_t* om_node,
            axiom_element_t *om_element,
            int tag_closed,
            axutil_hash_t *namespaces,
            int *next_ns_index,
            axis2_char_t *default_type)
        {
            if (_object != NULL && adb_type_get_type(_object) != NULL)
            {
                
                if (axutil_strcmp(adb_type_get_type(_object), "adb_") == 0)
                {
                    return adb__serialize_obj(
                    () _object, env, om_node, om_element, tag_closed, namespaces, next_ns_index);
                }
            
            }

            
            if (axutil_strcmp(default_type, "adb_") == 0)
            {
                return adb__serialize_obj(
                () _object, env, om_node, om_element, tag_closed, namespaces, next_ns_index);
            }
            

            return AXIS2_FAILURE;
        }
    






© 2015 - 2025 Weber Informatics LLC | Privacy Policy