static axis2_bool_t AXIS2_CALL axiom_soap_header_qname_matches()

in axiom/src/soap/soap_header.c [46:82]


static axis2_bool_t AXIS2_CALL axiom_soap_header_qname_matches(
    const axutil_env_t * env,
    axutil_qname_t * element_qname,
    axutil_qname_t * qname_to_match);

AXIS2_EXTERN axiom_soap_header_t *AXIS2_CALL
axiom_soap_header_create(
    const axutil_env_t * env)
{
    axiom_soap_header_t *soap_header = NULL;

    soap_header = (axiom_soap_header_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_soap_header_t));
    if(!soap_header)
    {
        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP header");
        return NULL;
    }

    soap_header->om_ele_node = NULL;
    soap_header->soap_envelope = NULL;
    soap_header->hbnumber = 0;
    soap_header->header_blocks = NULL;

    /** default value */
    soap_header->soap_version = AXIOM_SOAP12;
    soap_header->header_block_keys = NULL;

    soap_header->header_block_keys = axutil_array_list_create(env, 10);
    if(!soap_header->header_block_keys)
    {
        AXIS2_FREE(env->allocator, soap_header);
        return NULL;
    }

    return soap_header;
}