这篇教程C++ AXIS2_LOG_ERROR函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AXIS2_LOG_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ AXIS2_LOG_ERROR函数的具体用法?C++ AXIS2_LOG_ERROR怎么用?C++ AXIS2_LOG_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AXIS2_LOG_ERROR函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: adb_ServerException_deserialize_objaxis2_status_t AXIS2_CALLadb_ServerException_deserialize_obj( adb_ServerException_t* _ServerException, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _ServerException, 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 ServerException : " "NULL element can not be passed to deserialize"); return AXIS2_FAILURE; } first_node = axiom_node_get_first_child(parent, env); /* * building Exception 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); } element_qname = axutil_qname_create(env, "Exception", "http://org.apache.axis2/xsd", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = NULL; /* just to avoid warning */ 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 = adb_ServerException_set_Exception(_ServerException, env, current_property_node); } else { status = adb_ServerException_set_Exception(_ServerException, env, NULL); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for Exception "); if(element_qname) { axutil_qname_free(element_qname, env); }//.........这里部分代码省略.........
开发者ID:harunjuhasz,项目名称:wsf,代码行数:101,
示例2: rampart_replay_detector_with_flat_fileAXIS2_EXTERN axis2_status_t AXIS2_CALLrampart_replay_detector_with_flat_file( rampart_replay_detector_t *rrd, const axutil_env_t *env, axis2_msg_ctx_t* msg_ctx, rampart_context_t *rampart_context){ axutil_linked_list_t *ll = NULL; const axis2_char_t *msg_id = NULL; const axis2_char_t *ts = NULL; const axis2_char_t *addr_msg_id = NULL; int max_rcds = RAMPART_RD_DEF_MAX_RCDS; axis2_status_t status = AXIS2_FAILURE; axutil_hash_t *sec_process_result = NULL; /*Get timestamp from security processed results */ sec_process_result = rampart_get_all_security_processed_results(env, msg_ctx); ts = axutil_hash_get(sec_process_result, RAMPART_SPR_TS_CREATED, AXIS2_HASH_KEY_STRING); /* get message id from addressing headers */ addr_msg_id = axis2_msg_ctx_get_wsa_message_id(msg_ctx, env); if(!ts && addr_msg_id) { msg_id = addr_msg_id; } else if(ts && !addr_msg_id) { msg_id = ts; } else if(ts && addr_msg_id) { msg_id = axutil_strcat(env, addr_msg_id, ts, NULL); } else { msg_id = NULL; } if(!msg_id) { /* using default msg id */ msg_id = "RAMPART-DEFAULT-TS"; AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[rampart]No msg_id specified, using default = %s", msg_id); } ll = axutil_linked_list_create(env); if(!ll) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart]Linked list creation failed."); return AXIS2_FAILURE; } status = rampart_replay_detector_read_file(env, ll); if(status != AXIS2_SUCCESS) { /* we have to clear linked list. We don't need to write the contents. So pass false to * denote whether to write the content */ rampart_replay_detector_write_file(env, ll, AXIS2_FALSE); return AXIS2_FAILURE; } else { /* Get the number of records to be kept */ if(rampart_context_get_rd_val(rampart_context, env)) { max_rcds = axutil_atoi(rampart_context_get_rd_val(rampart_context, env)); AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[rampart]Using the specified max_rcds %d/n", max_rcds ); } else { AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[rampart]Using the default max_rcds %d/n", max_rcds ); } /* If the table already have the same key it's a replay */ if(rampart_replay_detector_check_in_linked_list(ll, env, (void*)msg_id)) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart]For ID=%s, a replay detected", msg_id); rampart_replay_detector_write_file(env, ll, AXIS2_FALSE); return AXIS2_FAILURE; } /* if number of records saved are more than allowed, we have to remove them */ while(axutil_linked_list_size(ll, env) >= max_rcds) { axis2_char_t *tmp_msg_id = NULL; tmp_msg_id = (axis2_char_t*)axutil_linked_list_remove_first(ll, env); AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[rampart]Deleting record %s/n", tmp_msg_id ); AXIS2_FREE(env->allocator, tmp_msg_id); tmp_msg_id = NULL; } /* Add current record */ status = axutil_linked_list_add(ll, env, (void*)axutil_strdup(env,msg_id)); if(status == AXIS2_SUCCESS) {//.........这里部分代码省略.........
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:101,
示例3: adb_listControlOperations_deserialize_obj axis2_status_t AXIS2_CALL adb_listControlOperations_deserialize_obj( adb_listControlOperations_t* _listControlOperations, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _listControlOperations, 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 listControlOperations : " "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, _listControlOperations-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for listControlOperations : " "Expected %s but returned %s", axutil_qname_to_string(_listControlOperations-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building serviceName 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); } element_qname = axutil_qname_create(env, "serviceName", "http://org.apache.axis2/xsd", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_listControlOperations_set_serviceName(_listControlOperations, env, text_value); }//.........这里部分代码省略.........
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:101,
示例4: axis2_svc_createAXIS2_EXTERN axis2_svc_t *AXIS2_CALLaxis2_svc_create( const axutil_env_t * env){ axis2_svc_t *svc = NULL; svc = (axis2_svc_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_t)); if(!svc) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory"); return NULL; } svc->parent = NULL; svc->axis_svc_name = NULL; svc->filename = NULL; svc->svc_desc = NULL; svc->wsdl_path = NULL; svc->folder_path = NULL; svc->last_update = 0; svc->param_container = NULL; svc->flow_container = NULL; svc->op_alias_map = NULL; svc->op_action_map = NULL; svc->op_rest_map = NULL; svc->module_list = NULL; svc->ns_map = NULL; svc->ns_count = 0; svc->schema_list = NULL; svc->schema_mapping_table = NULL; svc->schema_loc_adjusted = AXIS2_FALSE; svc->custom_schema_name_prefix = NULL; svc->custom_schema_name_suffix = NULL; svc->schema_target_ns = NULL; svc->schema_target_ns_prefix = NULL; svc->target_ns = NULL; svc->target_ns_prefix = NULL; svc->sc_calc_count = 0; svc->impl_class = NULL; svc->qname = NULL; svc->style = NULL; svc->base = NULL; svc->param_container = axutil_param_container_create(env); if(!svc->param_container) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service param container creation failed"); return NULL; } svc->flow_container = axis2_flow_container_create(env); if(!svc->flow_container) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service flow container creation failed"); return NULL; } svc->op_alias_map = axutil_hash_make(env); if(!svc->op_alias_map) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation alias map creation failed"); return NULL; } svc->op_action_map = axutil_hash_make(env); if(!svc->op_action_map) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation action map creation failed"); return NULL; } svc->op_rest_map = axutil_hash_make(env); if(!svc->op_rest_map) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation rest map creation failed"); return NULL; } /** Create module list of default size */ svc->module_list = axutil_array_list_create(env, 0); if(!svc->module_list) { axis2_svc_free(svc, env); AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service module list creation failed"); return NULL; } svc->schema_list = axutil_array_list_create(env, AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);//.........这里部分代码省略.........
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:101,
示例5: adb_changePassword_deserialize_obj axis2_status_t AXIS2_CALL adb_changePassword_deserialize_obj( adb_changePassword_t* _changePassword, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _changePassword, 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 changePassword : " "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, _changePassword-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for changePassword : " "Expected %s but returned %s", axutil_qname_to_string(_changePassword-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building userName 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); } element_qname = axutil_qname_create(env, "userName", "http://service.mgt.user.carbon.wso2.org", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_changePassword_set_userName(_changePassword, env, text_value); }//.........这里部分代码省略.........
开发者ID:AdrianRys,项目名称:wsf,代码行数:101,
示例6: adb_DSAKeyValueTypeSequence_type1_deserialize_obj axis2_status_t AXIS2_CALL adb_DSAKeyValueTypeSequence_type1_deserialize_obj( adb_DSAKeyValueTypeSequence_type1_t* _DSAKeyValueTypeSequence_type1, 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; void *element = NULL; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _DSAKeyValueTypeSequence_type1, AXIS2_FAILURE); first_node = parent; /* * building Seed 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); } element_qname = axutil_qname_create(env, "Seed", "http://www.w3.org/2000/09/xmldsig#", NULL); if (adb_CryptoBinary_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)axis2_extension_mapper_create_from_node(env, ¤t_node, "adb_CryptoBinary"); status = adb_CryptoBinary_deserialize((adb_CryptoBinary_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE); if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element Seed"); } else { status = adb_DSAKeyValueTypeSequence_type1_set_Seed(_DSAKeyValueTypeSequence_type1, env, (adb_CryptoBinary_t*)element); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for Seed "); 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 Seed missing"); return AXIS2_FAILURE; } //.........这里部分代码省略.........
开发者ID:isidrogc,项目名称:libkolibre-daisyonline,代码行数:101,
示例7: prf_queryPackageListResponseType_serialize_obj//.........这里部分代码省略......... { /* 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(element_ns) { axiom_namespace_free(element_ns, env); } } } } xsi_ns = axiom_namespace_create (env, "http://www.pratsam.org/ns/profile/", xsi_prefix); xsi_type_attri = axiom_attribute_create (env, "type", "queryPackageListResponseType", xsi_ns); axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent); if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.pratsam.org/ns/profile/", AXIS2_HASH_KEY_STRING))) { p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * PRF_DEFAULT_NAMESPACE_PREFIX_LIMIT); sprintf(p_prefix, "n%d", (*next_ns_index)++); axutil_hash_set(namespaces, "http://www.pratsam.org/ns/profile/", AXIS2_HASH_KEY_STRING, p_prefix); axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env, "http://www.pratsam.org/ns/profile/", p_prefix)); } if (!_queryPackageListResponseType->is_valid_packageListResult) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property packageListResult"); return NULL; } else { start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (4 + axutil_strlen(p_prefix) + axutil_strlen("packageListResult"))); /* 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("packageListResult"))); /* axutil_strlen("</:>") + 1 = 5 */ /* * parsing packageListResult element */ sprintf(start_input_str, "<%s%spackageListResult", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); start_input_str_len = axutil_strlen(start_input_str); sprintf(end_input_str, "</%s%spackageListResult>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); end_input_str_len = axutil_strlen(end_input_str); if(!prf_packageListType_is_particle()) { axutil_stream_write(stream, env, start_input_str, start_input_str_len); } prf_packageListType_serialize(_queryPackageListResponseType->property_packageListResult, env, current_node, parent_element, prf_packageListType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index); if(!prf_packageListType_is_particle()) { axutil_stream_write(stream, env, end_input_str, end_input_str_len); } AXIS2_FREE(env->allocator,start_input_str); AXIS2_FREE(env->allocator,end_input_str); } return parent; }
开发者ID:kolibre,项目名称:libkolibre-profileservice,代码行数:101,
示例8: sandesha2_msg_creator_create_create_seq_msg//.........这里部分代码省略......... temp_reply_to = sandesha2_msg_ctx_get_reply_to(application_rm_msg, env); if(temp_reply_to) { axis2_endpoint_ref_t *reply_to_epr = NULL; reply_to_address = axis2_endpoint_ref_get_address(temp_reply_to, env); reply_to_epr = axis2_endpoint_ref_create(env, reply_to_address); if(reply_to_epr) { axis2_msg_ctx_set_reply_to(create_seq_msg_ctx, env, reply_to_epr); } } create_seq_rm_msg = sandesha2_msg_ctx_create(env, create_seq_msg_ctx); AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "create_seq_internal_seq_id:%s", internal_seq_id); rm_version = sandesha2_utils_get_rm_version(env, application_msg_ctx); if(!rm_version) { AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_FIND_RM_VERSION_OF_GIVEN_MSG, AXIS2_FAILURE); return NULL; } rm_ns_value = sandesha2_spec_specific_consts_get_rm_ns_val(env, rm_version); addressing_ns_value = sandesha2_utils_get_seq_property(env, internal_seq_id, SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, seq_prop_mgr); create_seq_part = sandesha2_create_seq_create(env, addressing_ns_value, rm_ns_value); if(!create_seq_part) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] creating create sequence message failed"); return NULL; } /* Adding sequence offer if present */ op_ctx = axis2_msg_ctx_get_op_ctx(application_msg_ctx, env); if(op_ctx) { axis2_op_t *operation = NULL; int mep = -1; axis2_char_t *offered_seq_id = NULL; /*axutil_property_t *property = NULL; axis2_ctx_t *ctx = NULL; ctx = axis2_msg_ctx_get_base(application_msg_ctx, env); property = axis2_ctx_get_property(ctx, env, SANDESHA2_CLIENT_OFFERED_SEQ_ID); if(property) { offered_seq_id = axutil_property_get_value(property, env); }*/ operation = axis2_op_ctx_get_op(op_ctx, env); mep = axis2_op_get_axis_specific_mep_const(operation, env); if(mep == AXIS2_MEP_CONSTANT_OUT_IN) { offered_seq_id = axutil_uuid_gen(env); } /*if(offered_seq_id && 0 != axutil_strcmp("", offered_seq_id))*/ if(offered_seq_id) { sandesha2_seq_offer_t *offer_part = NULL; sandesha2_identifier_t *identifier = NULL; sandesha2_endpoint_t *endpoint = NULL;
开发者ID:basicDM,项目名称:wso2-wsf-cpp-gg,代码行数:67,
示例9: mainintmain( int argc, char **argv){ const axutil_env_t *env = NULL; const axis2_char_t *address = NULL; axis2_endpoint_ref_t *endpoint_ref = NULL; axis2_options_t *options = NULL; const axis2_char_t *client_home = NULL; axis2_svc_client_t *svc_client = NULL; axiom_node_t *payload = NULL; axiom_node_t *ret_node = NULL; /* Set up the environment */ env = axutil_env_create_all("echo_blocking.log", AXIS2_LOG_LEVEL_TRACE); /* Set end point reference of echo service */ address = "http://localhost:9090/axis2/services/echo"; if (argc > 1) address = argv[1]; if (axutil_strcmp(address, "-h") == 0) { printf("Usage : %s [endpoint_url]/n", argv[0]); printf("use -h for help/n"); return 0; } printf("Using endpoint : %s/n", address); /* Create EPR with given address */ endpoint_ref = axis2_endpoint_ref_create(env, address); /* Setup options */ options = axis2_options_create(env); axis2_options_set_to(options, env, endpoint_ref); /* Set up deploy folder. It is from the deploy folder, the configuration is picked up * using the axis2.xml file. * In this sample client_home points to the Axis2/C default deploy folder. The client_home can * be different from this folder on your system. For example, you may have a different folder * (say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the * modules that the client uses */ client_home = AXIS2_GETENV("WSFC_HOME"); if (!client_home || !strcmp(client_home, "")) client_home = "../.."; /* Create service client */ svc_client = axis2_svc_client_create(env, client_home); if (!svc_client) { printf ("Error creating service client, Please check WSFC_HOME again/n"); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" " %d :: %s", env->error->error_number, AXIS2_ERROR_GET_MESSAGE(env->error)); return -1; } /* Set service client options */ axis2_svc_client_set_options(svc_client, env, options); /* Build the SOAP request message payload using OM API. */ payload = build_om_payload_for_echo_svc(env); /* Send request */ ret_node = axis2_svc_client_send_receive(svc_client, env, payload); if (ret_node) { axis2_char_t *om_str = NULL; om_str = axiom_node_to_string(ret_node, env); if (om_str) { printf("/nReceived OM : %s/n", om_str); AXIS2_FREE(env->allocator, om_str); } printf("/necho client invoke SUCCESSFUL!/n"); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" " %d :: %s", env->error->error_number, AXIS2_ERROR_GET_MESSAGE(env->error)); printf("echo client invoke FAILED!/n"); } if (svc_client) { axis2_svc_client_free(svc_client, env); svc_client = NULL; } if (env) { axutil_env_free((axutil_env_t *) env); env = NULL; }//.........这里部分代码省略.........
开发者ID:joshkamau,项目名称:wso2-wsf-php54,代码行数:101,
示例10: adb_serviceProvider_type0_serialize_obj axiom_node_t* AXIS2_CALL adb_serviceProvider_type0_serialize_obj( adb_serviceProvider_type0_t* _serviceProvider_type0, 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; axiom_namespace_t* xsi_ns = NULL; axiom_attribute_t* xsi_type_attri = NULL; axis2_char_t* type_attrib = 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; axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT]; axis2_char_t *text_value_2; axis2_char_t *text_value_2_temp; 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; AXIS2_ENV_CHECK(env, NULL); AXIS2_PARAM_CHECK(env->error, _serviceProvider_type0, NULL); 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; if(!parent_tag_closed) { if(_serviceProvider_type0->is_valid_id) { p_prefix = NULL; text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) * (5 + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT + axutil_strlen(_serviceProvider_type0->property_id) + axutil_strlen("id"))); sprintf(text_value, " %s%s%s=/"%s/"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"", "id", _serviceProvider_type0->property_id); axutil_stream_write(stream, env, text_value, axutil_strlen(text_value)); AXIS2_FREE(env-> allocator, text_value); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-optional attribute id"); return NULL; } string_to_stream = ">"; axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream)); tag_closed = 1; } if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.daisy.org/ns/daisy-online/", 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, "http://www.daisy.org/ns/daisy-online/", AXIS2_HASH_KEY_STRING, p_prefix); axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env, "http://www.daisy.org/ns/daisy-online/", p_prefix)); } //.........这里部分代码省略.........
开发者ID:nossrf,项目名称:libkolibre-daisyonline,代码行数:101,
示例11: sandesha2_msg_creator_create_create_seq_res_msg/** * Create a new create_seq_response message. * @param env axis2 environment struct * @param create_seq_msg * @param out_msg * @param new_seq_id * @param seq_prop_mgr * @return sandesha2_msg_ctx_t */sandesha2_msg_ctx_t *sandesha2_msg_creator_create_create_seq_res_msg( const axutil_env_t *env, sandesha2_msg_ctx_t *create_seq_msg, axis2_msg_ctx_t *out_msg, axis2_char_t *new_seq_id, sandesha2_seq_property_mgr_t *seq_prop_mgr){ axis2_conf_ctx_t *conf_ctx = NULL; axis2_msg_ctx_t *temp_msg_ctx = NULL; axis2_char_t *rm_version = NULL; axis2_char_t *rm_ns_value = NULL; axis2_char_t *addressing_ns_value = NULL; axis2_char_t *new_msg_id = NULL; axis2_char_t *temp_action = NULL; axutil_string_t *soap_action = NULL; axiom_soap_envelope_t *envelope = NULL; axiom_soap_envelope_t *temp_envelope = NULL; axiom_soap_body_t *temp_soap_body = NULL; axiom_node_t *temp_om_node = NULL; sandesha2_create_seq_res_t *create_seq_res = NULL; sandesha2_identifier_t *identifier = NULL; sandesha2_seq_offer_t *offer = NULL; sandesha2_msg_ctx_t *create_seq_res_rm_msg_ctx = NULL; sandesha2_create_seq_t *cs = NULL; int soap_version = -1; AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2] Entry:sandesha2_msg_creator_create_create_seq_res_msg"); temp_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(create_seq_msg, env); conf_ctx = axis2_msg_ctx_get_conf_ctx(temp_msg_ctx, env); cs = sandesha2_msg_ctx_get_create_seq(create_seq_msg, env); rm_version = sandesha2_utils_get_rm_version(env, temp_msg_ctx); if(!rm_version) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find rm version of given message"); AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_FIND_RM_VERSION_OF_GIVEN_MSG, AXIS2_FAILURE); return NULL; } rm_ns_value = sandesha2_spec_specific_consts_get_rm_ns_val(env, rm_version); addressing_ns_value = sandesha2_utils_get_seq_property(env, new_seq_id, SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, seq_prop_mgr); if(!addressing_ns_value) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find addressing namespace value"); return NULL; } create_seq_res = sandesha2_create_seq_res_create(env, rm_ns_value, addressing_ns_value); identifier = sandesha2_identifier_create(env, rm_ns_value); sandesha2_identifier_set_identifier(identifier, env, new_seq_id); sandesha2_create_seq_res_set_identifier(create_seq_res, env, identifier); offer = sandesha2_create_seq_get_seq_offer(cs, env); if(offer) { axis2_char_t *out_seq_id = NULL; sandesha2_identifier_t *temp_identifier = NULL; AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Offer present"); temp_identifier = sandesha2_seq_offer_get_identifier(offer, env); out_seq_id = sandesha2_identifier_get_identifier(temp_identifier, env); if(out_seq_id && axutil_strcmp("", out_seq_id)) { sandesha2_accept_t *accept = NULL; axis2_endpoint_ref_t *acks_to_epr = NULL; sandesha2_acks_to_t *acks_to = NULL; sandesha2_address_t *address = NULL; AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] out_seq_id present"); accept = sandesha2_accept_create(env, rm_ns_value, addressing_ns_value); if(accept) { axis2_endpoint_ref_t *temp_to_epr = NULL; acks_to_epr = sandesha2_msg_ctx_get_to(create_seq_msg, env); if(acks_to_epr) { temp_to_epr = sandesha2_util_endpoint_ref_clone(env, acks_to_epr); } address = sandesha2_address_create(env, addressing_ns_value, temp_to_epr); acks_to = sandesha2_acks_to_create(env, address, rm_ns_value, addressing_ns_value); sandesha2_accept_set_acks_to(accept, env, acks_to); sandesha2_create_seq_res_set_accept(create_seq_res, env, accept);//.........这里部分代码省略.........
开发者ID:basicDM,项目名称:wso2-wsf-cpp-gg,代码行数:101,
示例12: adb_serviceProvider_type0_deserialize_obj axis2_status_t AXIS2_CALL adb_serviceProvider_type0_deserialize_obj( adb_serviceProvider_type0_t* _serviceProvider_type0, 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; 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, _serviceProvider_type0, 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 serviceProvider_type0 : " "NULL element can not be passed to deserialize"); return AXIS2_FAILURE; } 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); /* * building label 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); } element_qname = axutil_qname_create(env, "label", "http://www.daisy.org/ns/daisy-online/", NULL); if (adb_label_type0_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)axis2_extension_mapper_create_from_node(env, ¤t_node, "adb_label_type0"); status = adb_label_type0_deserialize((adb_label_type0_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE); if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element label"); } else {//.........这里部分代码省略.........
开发者ID:nossrf,项目名称:libkolibre-daisyonline,代码行数:101,
示例13: adb_ProductComplete_deserialize axis2_status_t AXIS2_CALL adb_ProductComplete_deserialize( adb_ProductComplete_t* _ProductComplete, 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; void *element = NULL; axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _ProductComplete, 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 ProductComplete : " "NULL elemenet 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, _ProductComplete-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for ProductComplete : " "Expected %s but returned %s", axutil_qname_to_string(_ProductComplete-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building productInfo 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); } element_qname = axutil_qname_create(env, "productInfo", "http://webser.com", NULL); if (adb_ProductCompleteType_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)adb_ProductCompleteType_create(env); status = adb_ProductCompleteType_deserialize((adb_ProductCompleteType_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE);//.........这里部分代码省略.........
开发者ID:hanxiangduo,项目名称:axis2c-test,代码行数:101,
示例14: axis2_amqp_process_requestaxis2_status_taxis2_amqp_process_request( const axutil_env_t* env, axis2_amqp_request_processor_resource_pack_t* request_resource_pack){ axiom_xml_reader_t* xml_reader = NULL; axiom_stax_builder_t* stax_builder = NULL; axiom_soap_builder_t* soap_builder = NULL; axis2_transport_out_desc_t* out_desc = NULL; axis2_transport_in_desc_t* in_desc = NULL; axis2_msg_ctx_t* msg_ctx = NULL; axiom_soap_envelope_t* soap_envelope = NULL; axis2_engine_t* engine = NULL; const axis2_char_t* soap_ns_uri = NULL; axis2_bool_t is_soap_11 = AXIS2_FALSE; axis2_char_t *soap_body_str = NULL; int soap_body_len = 0; axis2_bool_t is_mtom = AXIS2_FALSE; axis2_status_t status = AXIS2_FAILURE; axutil_hash_t *binary_data_map = NULL; axiom_soap_body_t *soap_body = NULL; axutil_property_t* reply_to_property = NULL; /* Create msg_ctx */ if(!request_resource_pack->conf_ctx) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Conf Context not Available"); return AXIS2_FAILURE; } out_desc = axis2_conf_get_transport_out(axis2_conf_ctx_get_conf( request_resource_pack->conf_ctx, env), env, AXIS2_TRANSPORT_ENUM_AMQP); if(!out_desc) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Transport Out Descriptor not Found"); return AXIS2_FAILURE; } in_desc = axis2_conf_get_transport_in(axis2_conf_ctx_get_conf(request_resource_pack->conf_ctx, env), env, AXIS2_TRANSPORT_ENUM_AMQP); if(!in_desc) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Transport In Descriptor not Found"); return AXIS2_FAILURE; } /* Create msg_ctx */ msg_ctx = axis2_msg_ctx_create(env, request_resource_pack->conf_ctx, in_desc, out_desc); axis2_msg_ctx_set_server_side(msg_ctx, env, AXIS2_TRUE); /* Handle MTOM */ if(strstr(request_resource_pack->content_type, AXIS2_AMQP_HEADER_ACCEPT_MULTIPART_RELATED)) { axis2_char_t* mime_boundary = axis2_amqp_util_get_value_from_content_type(env, request_resource_pack->content_type, AXIS2_AMQP_HEADER_CONTENT_TYPE_MIME_BOUNDARY); if(mime_boundary) { axiom_mime_parser_t *mime_parser = NULL; int soap_body_len = 0; axutil_param_t *buffer_size_param = NULL; axutil_param_t *max_buffers_param = NULL; axutil_param_t *attachment_dir_param = NULL; axis2_char_t *value_size = NULL; axis2_char_t *value_num = NULL; axis2_char_t *value_dir = NULL; int size = 0; int num = 0; mime_parser = axiom_mime_parser_create(env); buffer_size_param = axis2_msg_ctx_get_parameter(msg_ctx, env, AXIS2_MTOM_BUFFER_SIZE); if(buffer_size_param) { value_size = (axis2_char_t*)axutil_param_get_value(buffer_size_param, env); if(value_size) { size = atoi(value_size); axiom_mime_parser_set_buffer_size(mime_parser, env, size); } } max_buffers_param = axis2_msg_ctx_get_parameter(msg_ctx, env, AXIS2_MTOM_MAX_BUFFERS); if(max_buffers_param) { value_num = (axis2_char_t*)axutil_param_get_value(max_buffers_param, env); if(value_num) { num = atoi(value_num); axiom_mime_parser_set_max_buffers(mime_parser, env, num); } } /* If this paramter is there mime_parser will cached the attachment * using to the directory for large attachments. */ attachment_dir_param = axis2_msg_ctx_get_parameter(msg_ctx, env, AXIS2_ATTACHMENT_DIR); if(attachment_dir_param) { value_dir = (axis2_char_t*)axutil_param_get_value(attachment_dir_param, env);//.........这里部分代码省略.........
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:101,
示例15: adb_changeRolePermissionsResponse_deserialize_obj axis2_status_t AXIS2_CALL adb_changeRolePermissionsResponse_deserialize_obj( adb_changeRolePermissionsResponse_t* _changeRolePermissionsResponse, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _changeRolePermissionsResponse, 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 changeRolePermissionsResponse : " "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, _changeRolePermissionsResponse-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for changeRolePermissionsResponse : " "Expected %s but returned %s", axutil_qname_to_string(_changeRolePermissionsResponse-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building return 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); } element_qname = axutil_qname_create(env, "return", "http://services.resource.ui.mgt.registry.carbon.wso2.org", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { if (!axutil_strcasecmp(text_value , "true")) { status = adb_changeRolePermissionsResponse_set_return(_changeRolePermissionsResponse, env,//.........这里部分代码省略.........
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:101,
示例16: adb_TransportData_deserialize_obj axis2_status_t AXIS2_CALL adb_TransportData_deserialize_obj( adb_TransportData_t* _TransportData, 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; void *element = NULL; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _TransportData, 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 TransportData : " "NULL element can not be passed to deserialize"); return AXIS2_FAILURE; } first_node = axiom_node_get_first_child(parent, env); /* * building details 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); } element_qname = axutil_qname_create(env, "details", "http://mgt.transport.carbon.wso2.org/xsd", NULL); if (adb_TransportDetails_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)axis2_extension_mapper_create_from_node(env, ¤t_node, "adb_TransportDetails"); status = adb_TransportDetails_deserialize((adb_TransportDetails_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE); if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element details"); } else { status = adb_TransportData_set_details(_TransportData, env, (adb_TransportDetails_t*)element); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for details "); if(element_qname) { axutil_qname_free(element_qname, env);//.........这里部分代码省略.........
开发者ID:AdrianRys,项目名称:wsf,代码行数:101,
示例17: tcpmon_entry_new_entry_funct/** executes as new entry arises */void *AXIS2_CALLtcpmon_entry_new_entry_funct( axutil_thread_t * thd, void *data){ tcpmon_entry_request_data_t *req_data = (tcpmon_entry_request_data_t *) data; const axutil_env_t *env = NULL; int client_socket = -1; int host_socket = -1; tcpmon_session_t *session; TCPMON_SESSION_TRANS_ERROR_FUNCT on_trans_fault_funct; TCPMON_SESSION_NEW_ENTRY_FUNCT on_new_entry; axutil_stream_t *client_stream = NULL; axutil_stream_t *host_stream = NULL; int buffer_size = 0; axis2_char_t *headers = NULL; axis2_char_t *content = NULL; axis2_char_t *buffer = NULL; time_t now; struct tm *localTime = NULL; int arrived_secs = 0; int sent_secs = 0; int time_diff_i = 0; int target_port = 0; axis2_char_t *target_host = NULL; int test_bit = 0; int format_bit = 0; tcpmon_entry_t *entry = NULL; tcpmon_entry_impl_t *entry_impl = NULL; env = req_data->env; client_socket = req_data->socket; session = req_data->session; on_trans_fault_funct = tcpmon_session_get_on_trans_fault(session, env); on_new_entry = tcpmon_session_get_on_new_entry(session, env); entry = tcpmon_entry_create(env); entry_impl = AXIS2_INTF_TO_IMPL(entry); target_port = TCPMON_SESSION_GET_TARGET_PORT(session, env); target_host = TCPMON_SESSION_GET_TARGET_HOST(session, env); if (target_port == -1 || target_host == NULL) { axutil_network_handler_close_socket(env, client_socket); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Missing target port and host" "input missing"); if (on_trans_fault_funct) { (on_trans_fault_funct) (env, "Missing target port and host"); } if (thd) { AXIS2_FREE(env->allocator, thd); } if (data) { AXIS2_FREE(env->allocator, (tcpmon_entry_request_data_t *)data); } return NULL; } client_stream = axutil_stream_create_socket(env, client_socket); if (!client_stream) { axutil_network_handler_close_socket(env, client_socket); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error in creating client stream" "handling response"); /** call the callback */ if (on_trans_fault_funct) { (on_trans_fault_funct) (env, "error in creating the client stream"); } if (thd) { AXIS2_FREE(env->allocator, thd); } if (data) { AXIS2_FREE(env->allocator, (tcpmon_entry_request_data_t *)data); } return NULL; } buffer = tcpmon_util_read_current_stream(env, client_stream, &buffer_size, &headers, &content); headers =(char *) tcpmon_util_str_replace(env, headers,"localhost", target_host); test_bit = TCPMON_SESSION_GET_TEST_BIT(session, env); if (test_bit) { tcpmon_util_write_to_file("reqest", buffer); } format_bit = TCPMON_SESSION_GET_FORMAT_BIT(session, env); TCPMON_ENTRY_SET_FORMAT_BIT(entry, env, format_bit); now = time(NULL);//.........这里部分代码省略.........
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:101,
示例18: adb_unsubscribeResponse_deserialize_obj axis2_status_t AXIS2_CALL adb_unsubscribeResponse_deserialize_obj( adb_unsubscribeResponse_t* _unsubscribeResponse, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _unsubscribeResponse, 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 unsubscribeResponse : " "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, _unsubscribeResponse-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for unsubscribeResponse : " "Expected %s but returned %s", axutil_qname_to_string(_unsubscribeResponse-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building message 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); } element_qname = axutil_qname_create(env, "message", NULL, NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("message", axiom_element_get_localname(current_element, env))))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname) || !axutil_strcmp("message", axiom_element_get_localname(current_element, env)))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_unsubscribeResponse_set_message(_unsubscribeResponse, env, text_value); }//.........这里部分代码省略.........
开发者ID:akimdi,项目名称:laba2,代码行数:101,
示例19: prf_queryPackageListResponseType_deserialize_obj axis2_status_t AXIS2_CALL prf_queryPackageListResponseType_deserialize_obj( prf_queryPackageListResponseType_t* _queryPackageListResponseType, 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; void *element = NULL; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _queryPackageListResponseType, 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 queryPackageListResponseType : " "NULL element can not be passed to deserialize"); return AXIS2_FAILURE; } first_node = axiom_node_get_first_child(parent, env); /* * building packageListResult 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); } element_qname = axutil_qname_create(env, "packageListResult", "http://www.pratsam.org/ns/profile/", NULL); if (prf_packageListType_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)axis2_prf_extension_mapper_create_from_node(env, ¤t_node, "prf_packageListType"); status = prf_packageListType_deserialize((prf_packageListType_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE); if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element packageListResult"); } else { status = prf_queryPackageListResponseType_set_packageListResult(_queryPackageListResponseType, env, (prf_packageListType_t*)element); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for packageListResult "); if(element_qname) { axutil_qname_free(element_qname, env);//.........这里部分代码省略.........
开发者ID:kolibre,项目名称:libkolibre-profileservice,代码行数:101,
示例20: adb_unsubscribeResponse_serialize_obj axiom_node_t* AXIS2_CALL adb_unsubscribeResponse_serialize_obj( adb_unsubscribeResponse_t* _unsubscribeResponse, 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_node_t* current_node = NULL; int tag_closed = 0; 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; axis2_char_t *text_value_1; axis2_char_t *text_value_1_temp; 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, _unsubscribeResponse, NULL); namespaces = axutil_hash_make(env); next_ns_index = &next_ns_index_value; ns1 = axiom_namespace_create (env, "http://mopevm.ru/axis2/services/types", "n"); axutil_hash_set(namespaces, "http://mopevm.ru/axis2/services/types", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n")); parent_element = axiom_element_create (env, NULL, "unsubscribeResponse", ns1 , &parent); axiom_element_set_namespace(parent_element, env, ns1, parent); data_source = axiom_data_source_create(env, parent, ¤t_node); stream = axiom_data_source_get_stream(data_source, env); p_prefix = NULL; if (!_unsubscribeResponse->is_valid_message) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property message"); return NULL; } else { start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (4 + axutil_strlen(p_prefix) + axutil_strlen("message"))); /* 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("message"))); /* axutil_strlen("</:>") + 1 = 5 */ /* * parsing message element */ sprintf(start_input_str, "<%s%smessage>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); start_input_str_len = axutil_strlen(start_input_str); sprintf(end_input_str, "</%s%smessage>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); end_input_str_len = axutil_strlen(end_input_str); //.........这里部分代码省略.........
开发者ID:akimdi,项目名称:laba2,代码行数:101,
示例21: axis2_svc_add_module_ops/** * Here we extract all operations defined in module.xml and built execution * chains for them by calling axis2_phase_resolver_build_execution_chains_for_module_op() * function. Within that function handlers of the modules defined for that * operation are added to module operation chains appropriately. */AXIS2_EXTERN axis2_status_t AXIS2_CALLaxis2_svc_add_module_ops( axis2_svc_t * svc, const axutil_env_t * env, axis2_module_desc_t * module_desc, axis2_conf_t * conf){ axutil_hash_t *map = NULL; axutil_hash_index_t *hash_idx = NULL; axis2_phase_resolver_t *phase_resolver = NULL; axis2_op_t *op_desc = NULL; axis2_status_t status = AXIS2_FAILURE; const axis2_char_t *svcname = NULL; axis2_char_t *modname = NULL; axis2_char_t *opname = NULL; AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_svc_add_module_ops"); AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE); svcname = axis2_svc_get_name(svc, env); modname = axutil_qname_get_localpart(axis2_module_desc_get_qname(module_desc, env), env); map = axis2_module_desc_get_all_ops(module_desc, env); phase_resolver = axis2_phase_resolver_create_with_config_and_svc(env, conf, svc); if(!phase_resolver) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service %s", svcname); return AXIS2_FAILURE; } for(hash_idx = axutil_hash_first(map, env); hash_idx; hash_idx = axutil_hash_next(env, hash_idx)) { void *v = NULL; axutil_hash_this(hash_idx, NULL, NULL, &v); op_desc = (axis2_op_t *)v; opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), env); status = axis2_phase_resolver_build_execution_chains_for_module_op(phase_resolver, env, op_desc); if(AXIS2_SUCCESS != status) { axis2_phase_resolver_free(phase_resolver, env); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Builidng module operation %s failed for module %s", opname, modname); return status; } status = axis2_svc_add_op(svc, env, op_desc); if(AXIS2_SUCCESS != status) { axis2_phase_resolver_free(phase_resolver, env); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Adding operation %s to service %s failed", opname, svcname); return status; } } axis2_phase_resolver_free(phase_resolver, env); AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_svc_add_module_ops"); return AXIS2_SUCCESS;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:67,
示例22: axis2_http_accept_record_createAXIS2_EXTERN axis2_http_accept_record_t *AXIS2_CALLaxis2_http_accept_record_create( const axutil_env_t * env, const axis2_char_t * str){ axis2_char_t *tmp_accept_record = NULL; axis2_char_t *tmp = NULL; axis2_http_accept_record_t *accept_record = NULL; float quality = 1.0; int level = -1; axis2_char_t *name = NULL; AXIS2_PARAM_CHECK(env->error, str, NULL); tmp_accept_record = (axis2_char_t *) axutil_strdup(env, str); if (!tmp_accept_record) { AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "unable to strdup string %s", str); return NULL; } accept_record = (axis2_http_accept_record_t *) AXIS2_MALLOC (env->allocator, sizeof(axis2_http_accept_record_t)); if (!accept_record) { AXIS2_HANDLE_ERROR (env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); return NULL; } memset ((void *)accept_record, 0, sizeof (axis2_http_accept_record_t)); accept_record->record = axutil_strtrim(env, tmp_accept_record, AXIS2_SPACE_COMMA); tmp = strchr(tmp_accept_record, AXIS2_Q); if (tmp) { *tmp = AXIS2_ESC_NULL; tmp++; tmp = axutil_strtrim(env, tmp, AXIS2_EQ_N_SEMICOLON); if (tmp) { sscanf(tmp, "%f", &quality); AXIS2_FREE(env->allocator, tmp); } } tmp = strstr(tmp_accept_record, AXIS2_LEVEL); if (tmp) { *tmp = AXIS2_ESC_NULL; tmp++; tmp = axutil_strtrim(env, tmp, AXIS2_EQ_N_SEMICOLON); if (tmp) { sscanf(tmp, "%d", &level); AXIS2_FREE(env->allocator, tmp); } } tmp = axutil_strtrim(env, tmp_accept_record, AXIS2_SPACE_SEMICOLON); if (tmp) { name = tmp; } if (!name || quality > 1.0 || quality < 0.0) { axis2_http_accept_record_free(accept_record, env); return NULL; } accept_record->name = name; accept_record->quality = quality; accept_record->level = level; AXIS2_FREE(env->allocator, tmp_accept_record); return accept_record;}
开发者ID:cs525-koala,项目名称:eucalyptus-deps,代码行数:79,
示例23: axis2_svc_add_opAXIS2_EXTERN axis2_status_t AXIS2_CALLaxis2_svc_add_op( axis2_svc_t * svc, const axutil_env_t * env, axis2_op_t * op){ axis2_status_t status = AXIS2_FAILURE; axis2_msg_recv_t *msg_recv = NULL; const axutil_qname_t *qname = NULL; axis2_char_t *key = NULL; const axis2_char_t *svcname = NULL; axutil_array_list_t *mappings_list = NULL; int size = 0; int j = 0; AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE); svcname = axis2_svc_get_name(svc, env); qname = axis2_op_get_qname(op, env); if(qname) key = axutil_qname_get_localpart(qname, env); mappings_list = axis2_op_get_wsamapping_list(op, env); /* Adding action mappings into service */ if(mappings_list) size = axutil_array_list_size(mappings_list, env); for(j = 0; j < size; j++) { axis2_char_t *mapping = NULL; mapping = (axis2_char_t *)axutil_array_list_get(mappings_list, env, j); status = axis2_svc_add_mapping(svc, env, mapping, op); if(AXIS2_SUCCESS != status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Adding operation %s to service %s mapping list failed", svcname, key); return status; } } status = axis2_op_set_parent(op, env, svc); if(AXIS2_SUCCESS != status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting service %s as operation %s parent failed", svcname, key); return status; } msg_recv = axis2_op_get_msg_recv(op, env); if(msg_recv == NULL) { msg_recv = axis2_desc_builder_load_default_msg_recv(env); axis2_op_set_msg_recv(op, env, msg_recv); } if(key) { /* If service defines the operation, then we should not override with module level * operation. Module operations are global. If any setting to be modified, those operations * can be defined in service */ if(!axutil_hash_get(svc->op_alias_map, key, AXIS2_HASH_KEY_STRING)) { axutil_hash_set(svc->op_alias_map, key, AXIS2_HASH_KEY_STRING, op); } } return AXIS2_SUCCESS;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:63,
示例24: axis2_xmpp_client_on_normal_nodeint axis2_xmpp_client_on_normal_node( axis2_xmpp_session_data_t *session, iks* node){ if(!strcmp("stream:features", iks_name(node))) { session->features = iks_stream_features(node); if(session->use_sasl) { if(session->use_tls && !iks_is_secure(session->parser)) { if(!session->authorized) { /* we might be in the process of establishing TLS. so should return OK */ return IKS_OK; } return IKS_HOOK; } if(session->authorized) { /* Bind a resource if required */ xmpp_process_msg(session, node); } else { if(session->features & IKS_STREAM_SASL_MD5) { iks_start_sasl(session->parser, IKS_SASL_DIGEST_MD5, session->jid->user, session->password); } else if(session->features & IKS_STREAM_SASL_PLAIN) { iks_start_sasl(session->parser, IKS_SASL_PLAIN, session->jid->user, session->password); }#ifdef AXIS2_XMPP_GSSAPI else if (session->features & IKS_STREAM_SASL_GSSAPI) { iks_start_sasl (session->parser, IKS_SASL_GSSAPI, session->jid->user, session->password); }#endif /* AXIS2_XMPP_GSSAPI */ } } else { /* features node */ if(!strcmp("stream:features", iks_name(node))) { if(session->authorized) xmpp_process_msg(session, node); } } } else if(!strcmp("failure", iks_name(node))) { AXIS2_LOG_ERROR(session->env->log, AXIS2_LOG_SI, "[xmpp]Authentication failed."); return IKS_HOOK; } else if(!strcmp("success", iks_name(node))) { AXIS2_LOG_INFO(session->env->log, "[xmpp]Authentication successful."); session->authorized = 1; iks_send_header(session->parser, session->server); } else { ikspak *pak; pak = iks_packet(node); iks_filter_packet(session->filter, pak); } return IKS_OK;}
开发者ID:AdrianRys,项目名称:wsf,代码行数:79,
示例25: rampart_replay_detector_write_filestatic axis2_status_trampart_replay_detector_write_file( const axutil_env_t *env, axutil_linked_list_t* ll, axis2_bool_t write_content){ FILE* file = NULL; axis2_char_t *file_dir = NULL; axis2_char_t *file_name = NULL; file_dir = rampart_replay_detector_file_dir(env); if (write_content) { file_name = axutil_stracat(env, file_dir, REPLAY_FILE); file = fopen (file_name, "w+"); if (!file) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart]Creating replay file failed" ); AXIS2_FREE(env->allocator, file_name); file_name = axutil_stracat(env, file_dir, INDICATOR_FILE); remove(file_name); AXIS2_FREE(env->allocator, file_name); AXIS2_FREE(env->allocator, file_dir); return AXIS2_FAILURE; }#ifndef WIN32 else { axis2_char_t *command = NULL; command = axutil_stracat(env, "chmod 666 ", file_name); system(command); AXIS2_FREE(env->allocator, command); }#endif AXIS2_FREE(env->allocator, file_name); } while(axutil_linked_list_size(ll, env) > 0) { axis2_char_t *tmp_msg_id = NULL; tmp_msg_id = (axis2_char_t*)axutil_linked_list_remove_first(ll, env); if (file) { fwrite(tmp_msg_id, sizeof(axis2_char_t), axutil_strlen(tmp_msg_id), file); fputc(DELIMIT, file); } AXIS2_FREE(env->allocator, tmp_msg_id); tmp_msg_id = NULL; } if (file) { fclose(file); } file_name = axutil_stracat(env, file_dir, INDICATOR_FILE); remove(file_name); AXIS2_FREE(env->allocator, file_name); AXIS2_FREE(env->allocator, file_dir); return AXIS2_SUCCESS;}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:64,
示例26: adb_getServiceAnnouncementsResponse_deserialize_obj axis2_status_t AXIS2_CALL adb_getServiceAnnouncementsResponse_deserialize_obj( adb_getServiceAnnouncementsResponse_t* _getServiceAnnouncementsResponse, 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; void *element = NULL; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _getServiceAnnouncementsResponse, 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 getServiceAnnouncementsResponse : " "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, _getServiceAnnouncementsResponse-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for getServiceAnnouncementsResponse : " "Expected %s but returned %s", axutil_qname_to_string(_getServiceAnnouncementsResponse-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building announcements 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); } element_qname = axutil_qname_create(env, "announcements", "http://www.daisy.org/ns/daisy-online/", NULL); if (adb_announcements_type0_is_particle() || (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } element = (void*)axis2_extension_mapper_create_from_node(env, ¤t_node, "adb_announcements_type0"); status = adb_announcements_type0_deserialize((adb_announcements_type0_t*)element, env, ¤t_node, &is_early_node_valid, AXIS2_FALSE);//.........这里部分代码省略.........
开发者ID:isidrogc,项目名称:libkolibre-daisyonline,代码行数:101,
示例27: rampart_replay_detector_read_filestatic axis2_status_trampart_replay_detector_read_file( const axutil_env_t *env, axutil_linked_list_t* ll){ FILE* temp_file = NULL; FILE* file = NULL; axis2_char_t buffer[sizeof(axis2_char_t) * (BUFFER_LEN + 1)]; int ch_read = 0; char* key = NULL; axis2_char_t *file_dir = NULL; axis2_char_t *file_name = NULL; char dilim[2]; dilim[0] = DELIMIT; dilim[1] = 0; /* * check whether some other threads are using the file. In that case, the indicator file will * not be empty. If no other threads are using it, then the file will not available */ file_dir = rampart_replay_detector_file_dir(env); file_name = axutil_stracat(env, file_dir, INDICATOR_FILE); temp_file = fopen(file_name, "r"); while (temp_file) { fclose (temp_file);#ifdef WIN32 Sleep (5000);#else sleep (5);#endif temp_file = fopen(file_name, "r"); } temp_file = fopen(file_name, "w+"); AXIS2_FREE(env->allocator, file_name); if (!temp_file) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart]Creating indicator file failed" ); AXIS2_FREE(env->allocator, file_dir); return AXIS2_FAILURE; } fclose (temp_file); /* * now we can safely read the actual replay content file */ file_name = axutil_stracat(env, file_dir, REPLAY_FILE); file = fopen (file_name, "r"); AXIS2_FREE(env->allocator, file_dir); AXIS2_FREE(env->allocator, file_name); if (file) { axis2_char_t* whole_buffer = NULL; do { ch_read = fread (buffer, sizeof(axis2_char_t), BUFFER_LEN, file); buffer[ch_read] = 0; if (!ch_read) break; if (whole_buffer) { axis2_char_t* temp_str = whole_buffer; whole_buffer = axutil_stracat(env, temp_str, buffer); AXIS2_FREE(env->allocator, temp_str); } else { whole_buffer = axutil_strdup(env, buffer); } }while (!feof(file)); fclose(file); if (whole_buffer) { key = strtok(whole_buffer, dilim); while (key) { axutil_linked_list_add(ll, env, (void*)axutil_strdup(env,key)); key = strtok(NULL, dilim); } AXIS2_FREE(env->allocator, whole_buffer); } } return AXIS2_SUCCESS;}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:90,
示例28: adb_getServiceAnnouncementsResponse_serialize_obj axiom_node_t* AXIS2_CALL adb_getServiceAnnouncementsResponse_serialize_obj( adb_getServiceAnnouncementsResponse_t* _getServiceAnnouncementsResponse, 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_node_t* current_node = NULL; int tag_closed = 0; axis2_char_t* xsi_prefix = NULL; axiom_namespace_t* xsi_ns = NULL; axiom_attribute_t* xsi_type_attri = 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; axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT]; 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, _getServiceAnnouncementsResponse, NULL); namespaces = axutil_hash_make(env); next_ns_index = &next_ns_index_value; ns1 = axiom_namespace_create (env, "http://www.daisy.org/ns/daisy-online/", "n"); axutil_hash_set(namespaces, "http://www.daisy.org/ns/daisy-online/", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n")); parent_element = axiom_element_create (env, NULL, "getServiceAnnouncementsResponse", ns1 , &parent); axiom_element_set_namespace(parent_element, env, ns1, parent); data_source = axiom_data_source_create(env, parent, ¤t_node); stream = axiom_data_source_get_stream(data_source, env); if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.daisy.org/ns/daisy-online/", 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, "http://www.daisy.org/ns/daisy-online/", AXIS2_HASH_KEY_STRING, p_prefix); axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env, "http://www.daisy.org/ns/daisy-online/", p_prefix)); } if (!_getServiceAnnouncementsResponse->is_valid_announcements) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property announcements"); return NULL; } else { start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (4 + axutil_strlen(p_prefix) + axutil_strlen("announcements"))); /* 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("announcements"))); /* axutil_strlen("</:>") + 1 = 5 */ /* * parsing announcements element */ //.........这里部分代码省略.........
开发者ID:isidrogc,项目名称:libkolibre-daisyonline,代码行数:101,
示例29: adb_Metric_deserialize axis2_status_t AXIS2_CALL adb_Metric_deserialize( adb_Metric_t* _Metric, 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; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; 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, _Metric, 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 Metric : " "NULL elemenet can not be passed to deserialize"); return AXIS2_FAILURE; } first_node = axiom_node_get_first_child(parent, env); /* * building unit 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); } element_qname = axutil_qname_create(env, "unit", "http://util.services.statistics.carbon.wso2.org/xsd", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_Metric_set_unit(_Metric, env, text_value); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for unit "); if(element_qname) { axutil_qname_free(element_qname, env); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, env); element_qname = NULL;//.........这里部分代码省略.........
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:101,
示例30: mainintmain( int argc, char **argv){ const axutil_env_t *env = NULL; const axis2_char_t *address = NULL; axis2_endpoint_ref_t *endpoint_ref = NULL; axis2_endpoint_ref_t *reply_to = NULL; axis2_options_t *options = NULL; const axis2_char_t *client_home = NULL; axis2_svc_client_t *svc_client = NULL; axiom_node_t *payload = NULL; axis2_callback_t *callback = NULL; int count = 0; /* Set up the environment */ env = axutil_env_create_all("echo_non_blocking_dual.log", AXIS2_LOG_LEVEL_TRACE); /* Set end point reference of echo service */ address = "http://localhost:9090/axis2/services/echo"; if (argc > 1) address = argv[1]; if (axutil_strcmp(address, "-h") == 0) { printf("Usage : %s [endpoint_url]/n", argv[0]); printf("use -h for help/n"); return 0; } printf("Using endpoint : %s/n", address); /* Create EPR with given address */ endpoint_ref = axis2_endpoint_ref_create(env, address); /* Setup options */ options = axis2_options_create(env); axis2_options_set_to(options, env, endpoint_ref); axis2_options_set_use_separate_listener(options, env, AXIS2_TRUE); /* Seperate listner needs addressing, hence addressing stuff in options */ axis2_options_set_action(options, env, "http://ws.apache.org/axis2/c/samples/echoString"); reply_to = axis2_endpoint_ref_create(env, "http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__"); axis2_options_set_reply_to(options, env, reply_to); /* Set up deploy folder. It is from the deploy folder, the configuration is picked up * using the axis2.xml file. * In this sample client_home points to the Axis2/C default deploy folder. The client_home can * be different from this folder on your system. For example, you may have a different folder * (say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the * modules that the client uses */ client_home = AXIS2_GETENV("AXIS2C_HOME"); if (!client_home || !strcmp(client_home, "")) client_home = "../.."; /* Create service client */ svc_client = axis2_svc_client_create(env, client_home); if (!svc_client) { printf ("Error creating service client, Please check AXIS2C_HOME again/n"); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" " %d :: %s", env->error->error_number, AXIS2_ERROR_GET_MESSAGE(env->error)); return -1; } /* Set service client options */ axis2_svc_client_set_options(svc_client, env, options); axis2_svc_client_engage_module(svc_client, env, AXIS2_MODULE_ADDRESSING); /*axis2_svc_client_engage_module(svc_client, env, "sandesha2"); */ /* Build the SOAP request message payload using OM API. */ payload = build_om_payload_for_echo_svc(env); /* Create the callback object with default on_complete and on_error callback functions */ callback = axis2_callback_create(env); /* Set our on_complete fucntion pointer to the callback object */ axis2_callback_set_on_complete(callback, echo_callback_on_complete); /* Set our on_error function pointer to the callback object */ axis2_callback_set_on_error(callback, echo_callback_on_error); /* Send request */ axis2_svc_client_send_receive_non_blocking(svc_client, env, payload, callback); /** Wait till callback is complete. Simply keep the parent thread running until our on_complete or on_error is invoked */ while (count < MAX_COUNT) {//.........这里部分代码省略.........
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:101,
注:本文中的AXIS2_LOG_ERROR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AXIS2_MALLOC函数代码示例 C++ AXIS2_FREE函数代码示例 |