bool WSF_CALL AviaryQuery::GetSubmissionSummary::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs) { axiom_node_t *parent = *dp_parent; bool 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; const axis2_char_t* text_value = NULL; axutil_qname_t *mqname = NULL; int i = 0; int sequence_broken = 0; axiom_node_t *tmp_node = NULL; axutil_qname_t *element_qname = NULL; axiom_node_t *first_node = NULL; bool is_early_node_valid = true; axiom_node_t *current_node = NULL; axiom_element_t *current_element = NULL; while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT) { parent = axiom_node_get_next_sibling(parent, Environment::getEnv()); } if (NULL == parent) { return AXIS2_FAILURE; } current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent); if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname)) { first_node = axiom_node_get_first_child(parent, Environment::getEnv()); } else { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Failed in building adb object for GetSubmissionSummary : " "Expected %s but returned %s", axutil_qname_to_string(qname, Environment::getEnv()), axutil_qname_to_string(mqname, Environment::getEnv())); return AXIS2_FAILURE; } parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv()); attribute_hash = axiom_element_get_all_attributes(parent_element, Environment::getEnv()); { /* * building Ids array */ std::vector<AviaryCommon::SubmissionID*>* arr_list =new std::vector<AviaryCommon::SubmissionID*>(); /* * building ids element */ element_qname = axutil_qname_create(Environment::getEnv(), "ids", NULL, NULL); for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;) { if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv()); is_early_node_valid = false; continue; } current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("ids", axiom_element_get_localname(current_element, Environment::getEnv()))) { is_early_node_valid = true; AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID(); status = element->deserialize(¤t_node, &is_early_node_valid, false); if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element ids "); } else { arr_list->push_back(element); } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for ids "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } if(arr_list) { delete arr_list; } return false; } i++; current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } else { is_early_node_valid = false; sequence_broken = 1; } } if (i < 0) { /* found element out of order */ WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"ids (@minOccurs = '0') only have %d elements", i); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } if(arr_list) { delete arr_list; } return false; } if(0 == arr_list->size()) { delete arr_list; } else { status = setIds(arr_list); } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } 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, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi)) { axutil_hash_this(hi, &key, NULL, &val); if(!strcmp((axis2_char_t*)key, "partialMatches")) { parent_attri = (axiom_attribute_t*)val; break; } } } if(parent_attri) { attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv()); } else { /* this is hoping that attribute is stored in "partialMatches", this happnes when name is in default namespace */ attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "partialMatches"); } if(attrib_text != NULL) { if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true")) { setPartialMatches(true); } else { setPartialMatches(false); } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } 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, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi)) { axutil_hash_this(hi, &key, NULL, &val); if(!strcmp((axis2_char_t*)key, "includeJobSummaries")) { parent_attri = (axiom_attribute_t*)val; break; } } } if(parent_attri) { attrib_text = axiom_attribute_get_value(parent_attri, Environment::getEnv()); } else { /* this is hoping that attribute is stored in "includeJobSummaries", this happnes when name is in default namespace */ attrib_text = axiom_element_get_attribute_value_by_name(parent_element, Environment::getEnv(), "includeJobSummaries"); } if(attrib_text != NULL) { if (!axutil_strcmp(attrib_text, "TRUE") || !axutil_strcmp(attrib_text, "true")) { setIncludeJobSummaries(true); } else { setIncludeJobSummaries(false); } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } return status; }
bool WSF_CALL AviaryCommon::JobID::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs) { axiom_node_t *parent = *dp_parent; bool status = AXIS2_SUCCESS; const axis2_char_t* text_value = NULL; axutil_qname_t *mqname = NULL; axutil_qname_t *element_qname = NULL; axiom_node_t *first_node = NULL; bool is_early_node_valid = true; axiom_node_t *current_node = NULL; axiom_element_t *current_element = NULL; while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT) { parent = axiom_node_get_next_sibling(parent, Environment::getEnv()); } if (NULL == parent) { return AXIS2_FAILURE; } first_node = axiom_node_get_first_child(parent, Environment::getEnv()); /* * building job element */ current_node = first_node; is_early_node_valid = false; while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } element_qname = axutil_qname_create(Environment::getEnv(), "job", NULL, NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("job", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node); if(text_value != NULL) { status = setJob(text_value); } else { /* * axis2_qname_t *qname = NULL; * axiom_attribute_t *the_attri = NULL; * * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi"); * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), 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, Environment::getEnv()); attrib_text = NULL; if(attribute_hash) { axutil_hash_index_t *hi; void *val; const void *key; for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), 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, Environment::getEnv()); } 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, Environment::getEnv(), "nil"); } if(attrib_text && 0 == axutil_strcmp(attrib_text, "1")) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element job"); status = AXIS2_FAILURE; } else { /* after all, we found this is a empty string */ status = setJob(""); } } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for job "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } else if(!dont_care_minoccurs) { if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } /* this is not a nillable element*/ WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element job missing"); return AXIS2_FAILURE; } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } /* * building pool element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } } is_early_node_valid = false; element_qname = axutil_qname_create(Environment::getEnv(), "pool", NULL, NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("pool", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node); if(text_value != NULL) { status = setPool(text_value); } else { /* * axis2_qname_t *qname = NULL; * axiom_attribute_t *the_attri = NULL; * * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi"); * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), 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, Environment::getEnv()); attrib_text = NULL; if(attribute_hash) { axutil_hash_index_t *hi; void *val; const void *key; for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), 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, Environment::getEnv()); } 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, Environment::getEnv(), "nil"); } if(attrib_text && 0 == axutil_strcmp(attrib_text, "1")) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element pool"); status = AXIS2_FAILURE; } else { /* after all, we found this is a empty string */ status = setPool(""); } } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for pool "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } /* * building scheduler element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } } is_early_node_valid = false; element_qname = axutil_qname_create(Environment::getEnv(), "scheduler", NULL, NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("scheduler", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("scheduler", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node); if(text_value != NULL) { status = setScheduler(text_value); } else { /* * axis2_qname_t *qname = NULL; * axiom_attribute_t *the_attri = NULL; * * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi"); * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), 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, Environment::getEnv()); attrib_text = NULL; if(attribute_hash) { axutil_hash_index_t *hi; void *val; const void *key; for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), 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, Environment::getEnv()); } 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, Environment::getEnv(), "nil"); } if(attrib_text && 0 == axutil_strcmp(attrib_text, "1")) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element scheduler"); status = AXIS2_FAILURE; } else { /* after all, we found this is a empty string */ status = setScheduler(""); } } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for scheduler "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } /* * building submission element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } } is_early_node_valid = false; element_qname = axutil_qname_create(Environment::getEnv(), "submission", NULL, NULL); if (isParticle() || (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("submission", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID(); status = element->deserialize(¤t_node, &is_early_node_valid, false); if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element submission"); } else { status = setSubmission(element); } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for submission "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } return status; }
bool WSF_CALL AviaryQuery::GetSubmissionID::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs) { axiom_node_t *parent = *dp_parent; bool status = AXIS2_SUCCESS; const axis2_char_t* text_value = NULL; axutil_qname_t *mqname = NULL; axutil_qname_t *element_qname = NULL; axiom_node_t *first_node = NULL; bool is_early_node_valid = true; axiom_node_t *current_node = NULL; axiom_element_t *current_element = NULL; while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT) { parent = axiom_node_get_next_sibling(parent, Environment::getEnv()); } if (NULL == parent) { return AXIS2_FAILURE; } current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent); if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname)) { first_node = axiom_node_get_first_child(parent, Environment::getEnv()); } else { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Failed in building adb object for GetSubmissionID : " "Expected %s but returned %s", axutil_qname_to_string(qname, Environment::getEnv()), axutil_qname_to_string(mqname, Environment::getEnv())); return AXIS2_FAILURE; } /* * building size element */ current_node = first_node; is_early_node_valid = false; while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } element_qname = axutil_qname_create(Environment::getEnv(), "size", NULL, NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("size", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("size", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node); if(text_value != NULL) { status = setSize(atoi(text_value)); } else { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element size"); status = AXIS2_FAILURE; } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for size "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } else if(!dont_care_minoccurs) { if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } /* this is not a nillable element*/ WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element size missing"); return AXIS2_FAILURE; } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } /* * building mode element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } } is_early_node_valid = false; element_qname = axutil_qname_create(Environment::getEnv(), "mode", NULL, NULL); if (isParticle() || (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("mode", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("mode", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } AviaryCommon::ScanMode* element = new AviaryCommon::ScanMode(); status = element->deserialize(¤t_node, &is_early_node_valid, false); if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element mode"); } else { status = setMode(element); } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for mode "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } /* * building offset element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv()); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv()); mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node); } } is_early_node_valid = false; element_qname = axutil_qname_create(Environment::getEnv(), "offset", NULL, NULL); if (isParticle() || (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("offset", axiom_element_get_localname(current_element, Environment::getEnv()))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("offset", axiom_element_get_localname(current_element, Environment::getEnv())))) { is_early_node_valid = true; } AviaryCommon::SubmissionID* element = new AviaryCommon::SubmissionID(); status = element->deserialize(¤t_node, &is_early_node_valid, false); if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element offset"); } else { status = setOffset(element); } if(AXIS2_FAILURE == status) { WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for offset "); if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, Environment::getEnv()); element_qname = NULL; } return status; }