您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ AXIS2_FREE函数代码示例

51自学网 2021-06-01 19:39:01
  C++
这篇教程C++ AXIS2_FREE函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中AXIS2_FREE函数的典型用法代码示例。如果您正苦于以下问题:C++ AXIS2_FREE函数的具体用法?C++ AXIS2_FREE怎么用?C++ AXIS2_FREE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了AXIS2_FREE函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rp_read_bin_mime_image

//-----------------------------------------------------------------------------// Reads a binary image from the file fp.// The file should be composed of HTTP mime messages as received in the form of// an HTTP response. fp is already positioned at the start of the image.// The boundary is given by boundId.//char * rp_read_bin_mime_image(    const axutil_env_t * env,    FILE *fp,    const char *boundId,    int *len){    char     *image_binary   = NULL;    int      actual_filled   = 0;    TmpStore             *ts = NULL;    axutil_linked_list_t *ll = axutil_linked_list_create(env);    *len = 0;    Rp_cb_ctx fill_ctx;    init_rp_cb_ctx(env, &fill_ctx);    fill_ctx.fp    = fp;    fill_ctx.bound = boundId;    while (!fill_ctx.done)    {        ts = (TmpStore *)AXIS2_MALLOC(env->allocator, sizeof(TmpStore));        actual_filled = rp_fill_buff_CB(ts->buf, SP_IMG_BUF_SIZE, &fill_ctx);        if (0 == actual_filled)        {            AXIS2_FREE(env->allocator, ts);            break;        }        ts->size = actual_filled;        *len    += actual_filled;        axutil_linked_list_add (ll, env, (void *)ts);    }    image_binary = compose_buffer(env, *len, ll);    axutil_linked_list_free(ll, env);    return image_binary;}
开发者ID:EOxServer,项目名称:soap-proxy,代码行数:44,


示例2: build_om_payload_for_echo_svc_interop

/* build SOAP request message content using OM (for java interop)*/axiom_node_t *build_om_payload_for_echo_svc_interop(    const axutil_env_t *env){    axiom_node_t *ping_request_om_node = NULL;    axiom_element_t* ping_request_om_ele = NULL;    axiom_node_t *ping_om_node = NULL;    axiom_element_t* ping_om_ele = NULL;    axiom_node_t* text_om_node = NULL;    axiom_element_t * text_om_ele = NULL;    axiom_namespace_t *ns1 = NULL;    axiom_namespace_t *ns0 = NULL;    axis2_char_t *om_str = NULL;    ns0 = axiom_namespace_create(env, "http://InteropBaseAddress/interop", "ns0");    ns1 = axiom_namespace_create(env, "http://xmlsoap.org/Ping", "ns1");    ping_request_om_ele        = axiom_element_create(env, NULL, "PingRequest", ns0, &ping_request_om_node);    ping_om_ele = axiom_element_create(env, ping_request_om_node, "Ping", ns1, &ping_om_node);    text_om_ele = axiom_element_create(env, ping_om_node, "scenario", ns1, &text_om_node);    axiom_element_set_text(text_om_ele, env, "scenario", text_om_node);    text_om_node = NULL;    text_om_ele = axiom_element_create(env, ping_om_node, "origin", ns1, &text_om_node);    axiom_element_set_text(text_om_ele, env, "origin", text_om_node);    text_om_node = NULL;    text_om_ele = axiom_element_create(env, ping_om_node, "text", ns1, &text_om_node);    axiom_element_set_text(text_om_ele, env, "text", text_om_node);    om_str = axiom_node_to_string(ping_request_om_node, env);    if(om_str)    {        printf("/nSending OM : %s/n", om_str);        AXIS2_FREE(env->allocator, om_str);        om_str = NULL;    }    return ping_request_om_node;}
开发者ID:joshkamau,项目名称:wso2-wsf-php54,代码行数:39,


示例3: axutil_stream_write_basic

int AXIS2_CALLaxutil_stream_write_basic(    axutil_stream_t *stream,    const axutil_env_t *env,    const void *buffer,    size_t count){    int new_len = 0;    if(!buffer)        return -1;    new_len = (int)(stream->len + count);    /* We are sure that the difference lies within the int range */    if(new_len > stream->max_len)    {        axis2_char_t *tmp = (axis2_char_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t)            * (new_len + AXIS2_STREAM_DEFAULT_BUF_SIZE));        if(!tmp)        {            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);            return -1;        }        /*         * pre allocation: extra AXIS2_STREAM_DEFAULT_BUF_SIZE more bytes          * allocated          */        stream->max_len = new_len + AXIS2_STREAM_DEFAULT_BUF_SIZE;        memcpy(tmp, stream->buffer, sizeof(axis2_char_t) * stream->len);        AXIS2_FREE(env->allocator, stream->buffer_head);        stream->buffer = tmp;        stream->buffer_head = tmp;    }    memcpy(stream->buffer + (stream->len * sizeof(axis2_char_t)), buffer, count);    stream->len += (int)count;    /* We are sure that the difference lies within the int range */    return (int)count;}
开发者ID:jzoppi,项目名称:axis2c-trunk,代码行数:38,


示例4: service_admin_counter_set_last_count

void AXIS2_CALLservice_admin_counter_set_last_count (    const axutil_env_t *env,    axis2_msg_ctx_t *msg_ctx,    axis2_char_t *svc_name,    axis2_char_t *op_name,    int last_count){    int *count = NULL;    axis2_conf_ctx_t *conf_ctx = NULL;    axutil_property_t *property = NULL;    axutil_hash_t *last_counts = NULL;       conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);    if(svc_name && op_name)    {        axis2_char_t *key = NULL;        key = axutil_strcat(env, svc_name, "-", op_name, NULL);        property = axis2_conf_ctx_get_property(conf_ctx, env, SERVICE_ADMIN_COUNTER_LAST_OPERATION_COUNT);        /* set_last_count is always called after get_last_count. So checking for existence of property         * is not necessary here          */        last_counts = axutil_property_get_value(property, env);        count = axutil_hash_get(last_counts, key, AXIS2_HASH_KEY_STRING);        *count = last_count;        AXIS2_FREE(env->allocator, key);    }    else if(svc_name)    {        property = axis2_conf_ctx_get_property(conf_ctx, env, SERVICE_ADMIN_COUNTER_LAST_SERVICE_COUNT);         /* set_last_count is always called after get_last_count. So checking for existence of property         * is not necessary here          */        last_counts = axutil_property_get_value(property, env);        count = axutil_hash_get(last_counts, svc_name, AXIS2_HASH_KEY_STRING);        *count = last_count;    }}
开发者ID:AdrianRys,项目名称:wsf,代码行数:38,


示例5: build_om_programatically

/* build SOAP request message content using OM */axiom_node_t *build_om_programatically(    const axutil_env_t * env){    axiom_node_t *notify_om_node = NULL;    axiom_element_t *notify_om_ele = NULL;    axiom_namespace_t *ns1 = NULL;    axis2_char_t *buffer = NULL;    ns1 = axiom_namespace_create(env, "http://example.org/notify", "m");    notify_om_ele =        axiom_element_create(env, NULL, "notify", ns1, &notify_om_node);    axiom_element_set_text(notify_om_ele, env, "notify5", notify_om_node);    buffer = axiom_node_to_string(notify_om_node, env);    if (buffer)    {        printf("/nSending OM node in XML : %s /n", buffer);        AXIS2_FREE(env->allocator, buffer);    }    return notify_om_node;}
开发者ID:joshkamau,项目名称:wso2-wsf-php54,代码行数:24,


示例6: build_om_payload_for_echo_svc

/* build SOAP request message content using OM */axiom_node_t *build_om_payload_for_echo_svc(const axutil_env_t *env){    axiom_node_t *echo_om_node = NULL;    axiom_element_t* echo_om_ele = NULL;    axiom_node_t* text_om_node = NULL;    axiom_element_t * text_om_ele = NULL;    axiom_namespace_t *ns1 = NULL;    axis2_char_t *om_str = NULL;    ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples", "ns1");    echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node);    text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node);    axiom_element_set_text(text_om_ele, env, "echo5", text_om_node);    om_str = axiom_node_to_string(echo_om_node, env);    if (om_str)    {        AXIS2_FREE(env->allocator, om_str);        om_str =  NULL;    }    return echo_om_node;}
开发者ID:AdrianRys,项目名称:wsf,代码行数:24,


示例7: axutil_dll_desc_create_platform_specific_dll_name

AXIS2_EXTERN axis2_char_t *AXIS2_CALLaxutil_dll_desc_create_platform_specific_dll_name(    axutil_dll_desc_t *dll_desc,    const axutil_env_t *env,    const axis2_char_t *class_name){    axis2_char_t *temp_name = NULL;    AXIS2_ENV_CHECK(env, NULL);    /* allow config to give a literal lib name since it may want a      * versioned lib like "libfoo.so.0" */    if (axutil_strstr(class_name, AXIS2_LIB_SUFFIX)) {            /* assume the class_name is the literal lib file name */            dll_desc->dll_name = axutil_strdup(env,class_name);            return dll_desc->dll_name;    }    temp_name = axutil_stracat(env, AXIS2_LIB_PREFIX, class_name);    dll_desc->dll_name = axutil_stracat(env, temp_name, AXIS2_LIB_SUFFIX);    AXIS2_FREE(env->allocator, temp_name);    return dll_desc->dll_name;}
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:23,


示例8: axiom_output_set_xml_version

AXIS2_EXTERN axis2_status_t AXIS2_CALLaxiom_output_set_xml_version(    axiom_output_t * om_output,    const axutil_env_t * env,    axis2_char_t * xml_version){    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);    AXIS2_PARAM_CHECK(env->error, xml_version, AXIS2_FAILURE);    if(om_output->xml_version)    {        AXIS2_FREE(env->allocator, om_output->xml_version);        om_output->xml_version = NULL;    }    om_output->xml_version = axutil_strdup(env, xml_version);    if(!om_output->xml_version)    {        return AXIS2_FAILURE;    }    return AXIS2_SUCCESS;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:23,


示例9: Axis2Service_free

  static int AXIS2_CALL Axis2Service_free(axis2_svc_skeleton_t *pSvcSkeleton, const axutil_env_t *pEnv)  {    staff::LogDebug() << "stopping StaffService";#if !defined WIN32    m_bShuttingDown = true;    staff::ServiceDispatcher::Inst().Deinit();#endif#ifndef WITHOUT_SECURITY    staff_security_free();#endif    if (pSvcSkeleton)    {      AXIS2_FREE(pEnv->allocator, pSvcSkeleton);      pSvcSkeleton = NULL;    }    staff::CrashHandler::Disable();    return AXIS2_SUCCESS;   }
开发者ID:AmesianX,项目名称:staff,代码行数:23,


示例10: axis2_handler_desc_set_class_name

AXIS2_EXTERN axis2_status_t AXIS2_CALLaxis2_handler_desc_set_class_name(    axis2_handler_desc_t * handler_desc,    const axutil_env_t * env,    const axis2_char_t * class_name){    if(handler_desc->class_name)    {        AXIS2_FREE(env->allocator, handler_desc->class_name);    }    if(class_name)    {        handler_desc->class_name = axutil_strdup(env, class_name);        if(!handler_desc->class_name)        {            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");            return AXIS2_FAILURE;        }    }    return AXIS2_SUCCESS;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:24,


示例11: adb_getReservationStatusesResponse_free

        axis2_status_t AXIS2_CALL        adb_getReservationStatusesResponse_free (                adb_getReservationStatusesResponse_t* _getReservationStatusesResponse,                const axutil_env_t *env)        {                            int i = 0;                int count = 0;                void *element = NULL;                        AXIS2_ENV_CHECK(env, AXIS2_FAILURE);            AXIS2_PARAM_CHECK(env->error, _getReservationStatusesResponse, AXIS2_FAILURE);            adb_getReservationStatusesResponse_reset_reservationStatuses(_getReservationStatusesResponse, env);                        if(_getReservationStatusesResponse)            {                AXIS2_FREE(env->allocator, _getReservationStatusesResponse);                _getReservationStatusesResponse = NULL;            }            return AXIS2_SUCCESS;        }
开发者ID:arun07,项目名称:minisip_salcas,代码行数:24,


示例12: axiom_output_free

AXIS2_EXTERN void AXIS2_CALLaxiom_output_free(    axiom_output_t * om_output,    const axutil_env_t * env){    AXIS2_ENV_CHECK_VOID(env);    if(om_output->xml_version)    {        AXIS2_FREE(env->allocator, om_output->xml_version);    }    if(om_output->mime_boundary)    {        AXIS2_FREE(env->allocator, om_output->mime_boundary);    }    if(om_output->next_content_id)    {        AXIS2_FREE(env->allocator, om_output->next_content_id);    }    if(om_output->root_content_id)    {        AXIS2_FREE(env->allocator, om_output->root_content_id);    }    if(om_output->xml_writer)    {        axiom_xml_writer_free(om_output->xml_writer, env);    }    if(om_output->binary_node_list)    {        axutil_array_list_free(om_output->binary_node_list, env);    }    if(om_output->content_type)    {        AXIS2_FREE(env->allocator, om_output->content_type);    }    AXIS2_FREE(env->allocator, om_output);    return;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:42,


示例13: adb_UAKType_serialize_obj

        axiom_node_t* AXIS2_CALL        adb_UAKType_serialize_obj(                adb_UAKType_t* _UAKType,                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_data_source_t *data_source = NULL;            axutil_stream_t *stream = NULL;            axis2_char_t *text_value;                            axiom_namespace_t *ns1 = NULL;               axis2_char_t *p_prefix = NULL;                                  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(_UAKType->is_valid_issuerID)                {                                        p_prefix = NULL;                                                 text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *                                                             (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +                                                             axutil_strlen(_UAKType->property_issuerID) +                                                                 axutil_strlen("issuerID")));                           sprintf(text_value, " %s%s%s=/"%s/"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",                                                "issuerID", _UAKType->property_issuerID);                           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 issuerID");                      return NULL;                   }                                   if(_UAKType->is_valid_collectionID)                {                                        p_prefix = NULL;                                                 text_value = (axis2_char_t*) AXIS2_MALLOC (env-> allocator, sizeof (axis2_char_t) *                                                             (5  + ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT +                                                             axutil_strlen(_UAKType->property_collectionID) +                                                                 axutil_strlen("collectionID")));                           sprintf(text_value, " %s%s%s=/"%s/"", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":"",                                                "collectionID", _UAKType->property_collectionID);                           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 collectionID");                      return NULL;                   }                                 string_to_stream = ">";               axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));              tag_closed = 1;                        }                       if(!parent_tag_closed && !tag_closed)               {                  text_value = ">";                   axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));               }                              text_value = adb_UAKType_serialize_to_string(_UAKType, env, namespaces);               if(text_value)               {                    axutil_stream_write(stream, env, text_value, axutil_strlen(text_value));                    AXIS2_FREE(env->allocator, text_value);               }//.........这里部分代码省略.........
开发者ID:kolibre,项目名称:libkolibre-daisyonline,代码行数:101,


示例14: adb_UAKType_deserialize_obj

        axis2_status_t AXIS2_CALL        adb_UAKType_deserialize_obj(                adb_UAKType_t* _UAKType,                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;                                  status = AXIS2_FAILURE;            if(parent)            {                axis2_char_t *attrib_text = NULL;                attrib_text = axiom_element_get_attribute_value_by_name(axiom_node_get_data_element(parent, env), env, "nil");                if (attrib_text != NULL && !axutil_strcasecmp(attrib_text, "true"))                {                                     /* but the wsdl says that, this is non nillable */                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element UAKType");                    status = AXIS2_FAILURE;                                   }                else                {                    axiom_node_t *text_node = NULL;                    axiom_text_t *text_element = NULL;                    text_node = axiom_node_get_first_child(parent, env);                    if (text_node &&                            axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)                        text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, env);                    text_value = "";                    if(text_element && axiom_text_get_value(text_element, env))                    {                        text_value = (axis2_char_t*)axiom_text_get_value(text_element, env);                    }                    status = adb_UAKType_deserialize_from_string(_UAKType, env, text_value, parent);                }            }                             parent_element = (axiom_element_t *)axiom_node_get_data_element(parent, env);                 attribute_hash = axiom_element_get_all_attributes(parent_element, env);                                                                parent_attri = NULL;                  attrib_text = NULL;                  if(attribute_hash)                  {                       axutil_hash_index_t *hi;                       void *val;                       const void *key;                       for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))                        {                           axutil_hash_this(hi, &key, NULL, &val);                                                                                     if(!strcmp((axis2_char_t*)key, "issuerID"))                                                            {                                   parent_attri = (axiom_attribute_t*)val;                                   AXIS2_FREE(env->allocator, hi);                                   break;                               }                       }                  }                  if(parent_attri)                  {                    attrib_text = axiom_attribute_get_value(parent_attri, env);                  }                  else                  {                    /* this is hoping that attribute is stored in "issuerID", this happnes when name is in default namespace */                    attrib_text = axiom_element_get_attribute_value_by_name(parent_element, env, "issuerID");                  }                  if(attrib_text != NULL)                  {                                            adb_UAKType_set_issuerID(_UAKType,                                                          env, attrib_text);                                            }//.........这里部分代码省略.........
开发者ID:kolibre,项目名称:libkolibre-daisyonline,代码行数:101,


示例15: adb_TransformTypeChoice_serialize_obj

        axiom_node_t* AXIS2_CALL        adb_TransformTypeChoice_serialize_obj(                adb_TransformTypeChoice_t* _TransformTypeChoice,                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)        {                                     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;                    axis2_char_t *text_value_1_temp;                                        axis2_char_t *text_value_2;                    axis2_char_t *text_value_2_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;                        AXIS2_ENV_CHECK(env, NULL);            AXIS2_PARAM_CHECK(env->error, _TransformTypeChoice, 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(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))              {                  /* it is better to stick with the standard prefix */                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");                                    axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);                  if(parent_element)                  {                        axiom_namespace_t *element_ns = NULL;                        element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",                                                            xsi_prefix);                        axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);                        if(element_ns)                        {                            axiom_namespace_free(element_ns, env);                        }                  }              }              type_attrib = axutil_strcat(env, " ", xsi_prefix, ":type=/"TransformTypeChoice/"", NULL);              axutil_stream_write(stream, env, type_attrib, axutil_strlen(type_attrib));              AXIS2_FREE(env->allocator, type_attrib);                              string_to_stream = ">";               axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));              tag_closed = 1;                        }            else {              /* if the parent tag closed we would be able to declare the type directly on the parent element */               if(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))              {                  /* it is better to stick with the standard prefix */                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");                                    axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);                  if(parent_element)                  {                        axiom_namespace_t *element_ns = NULL;//.........这里部分代码省略.........
开发者ID:isidrogc,项目名称:libkolibre-daisyonline,代码行数:101,


示例16: axis2_stub_on_complete_IIp2Location_get

        axis2_status_t AXIS2_CALL axis2_stub_on_complete_IIp2Location_get(axis2_callback_t *callback, const axutil_env_t *env)        {            axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_getResponse_t* _getResponse, void *data);            struct axis2_stub_IIp2Location_get_callback_data* callback_data = NULL;            void *user_data = NULL;            axis2_status_t status = AXIS2_SUCCESS;            adb_getResponse_t* ret_val;                        axiom_node_t *ret_node = NULL;            axiom_soap_envelope_t *soap_envelope = NULL;                        callback_data = (struct axis2_stub_IIp2Location_get_callback_data*)axis2_callback_get_data(callback);                        soap_envelope = axis2_callback_get_envelope(callback, env);            if(soap_envelope)            {                axiom_soap_body_t *soap_body;                soap_body = axiom_soap_envelope_get_body(soap_envelope, env);                if(soap_body)                {                    axiom_soap_fault_t *soap_fault = NULL;                    axiom_node_t *body_node = axiom_soap_body_get_base_node(soap_body, env);                      if(body_node)                    {                        ret_node = axiom_node_get_first_child(body_node, env);                    }                }                                            }            user_data = callback_data->data;            on_complete = callback_data->on_complete;                                if(ret_node != NULL)                    {                        ret_val = adb_getResponse_create(env);                             if(adb_getResponse_deserialize(ret_val, env, &ret_node, NULL, AXIS2_FALSE ) == AXIS2_FAILURE)                        {                            AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the LendResponse_deserialize: "                                                                    "This should be due to an invalid XML");                            adb_getResponse_free(ret_val, env);                            ret_val = NULL;                        }                     }                     else                     {                         ret_val = NULL;                      }                                              status = on_complete(env, ret_val, user_data);                                      if(callback_data)            {                AXIS2_FREE(env->allocator, callback_data);            }            return status;        }
开发者ID:tempo-rary,项目名称:ip2LocationSample,代码行数:67,


示例17: add_subscriber

int add_subscriber(){    remote_registry_t *remote_registry = NULL;    const axutil_env_t *env = NULL;    axis2_char_t *subscription_id = NULL;    axis2_char_t *id = NULL;    axis2_char_t *path = NULL;     axis2_char_t *index_path = NULL;     remote_registry_resource_t *res = NULL;    axutil_hash_t *properties = NULL;	    char *content = (char *) strdup("<subscription><syn:endpoint xmlns:syn=/"http://ws.apache.org/ns/synapse/"><syn:address uri=/"http://localhost:9000/services/SimpleStockQuoteService/" /></syn:endpoint></subscription>");    axis2_char_t *epr_type = "application/vnd.epr";    axis2_char_t *filter = "/weather/4/";    axis2_char_t *reg_url = "http://localhost:9762/registry";    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);    subscription_id = axutil_strcat(env, "urn:uuid:", axutil_uuid_gen(env), NULL);    path = axutil_strcat(env, filter, SUBSCRIPTION_COLLECTION_NAME, "/", subscription_id, NULL);    id = axutil_strcat(env, reg_url, filter, SUBSCRIPTION_COLLECTION_NAME, "/", subscription_id, NULL);    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");    topic_index_init();    res = remote_registry_resource_create(env);    remote_registry_resource_set_content(res, env, content);    remote_registry_resource_set_content_len(res, env, axutil_strlen(content));    remote_registry_resource_set_media_type(res, env, epr_type);    remote_registry_resource_set_description(res, env, "");    properties = axutil_hash_make(env);    if(properties)    {        axutil_hash_set(properties, axutil_strdup(env, "expires"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "*"));        axutil_hash_set(properties, axutil_strdup(env, "staticFlag"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "false"));        axutil_hash_set(properties, axutil_strdup(env, "filterValue"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, filter));        axutil_hash_set(properties, axutil_strdup(env, "subManagerURI"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "http://10.100.1.44:8280/services/SampleEventSource"));        axutil_hash_set(properties, axutil_strdup(env, "filterDialect"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "http://synapse.apache.org/eventing/dialect/topicFilter"));        remote_registry_resource_set_properties(res, env, properties);    }    remote_registry_put(remote_registry, env, path, res);    if(id)    {        AXIS2_FREE(env->allocator, id);    }    if(path)    {        AXIS2_FREE(env->allocator, path);        path = NULL;    }    if(res)    {        remote_registry_resource_free(res, env);        res = NULL;    }    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);    if(!res)    {        return 0;    }    id = axutil_strcat(env, reg_url, TOPIC_INDEX, NULL);    properties = remote_registry_resource_get_properties(res, env);    if(properties)    {        path = axutil_strcat(env, filter, SUBSCRIPTION_COLLECTION_NAME, NULL);        axutil_hash_set(properties, subscription_id, AXIS2_HASH_KEY_STRING, path);        remote_registry_resource_set_properties(res, env, properties);    }    remote_registry_resource_set_content(res, env, NULL);    remote_registry_resource_set_content_len(res, env, 0);    index_path = axutil_strcat(env, TOPIC_INDEX, "/TopicIndex", NULL);    remote_registry_put(remote_registry, env, TOPIC_INDEX, res);    if(id)    {        AXIS2_FREE(env->allocator, id);    }    if(res)    {        remote_registry_resource_free(res, env);        res = NULL;    }    printf("/n");    return 0;}
开发者ID:MI-LA01,项目名称:kt_wso2-php5.3,代码行数:89,


示例18: axutil_url_create

AXIS2_EXTERN axutil_url_t *AXIS2_CALLaxutil_url_create(    const axutil_env_t *env,    const axis2_char_t *protocol,    const axis2_char_t *host,    const int port,    const axis2_char_t *path){    axutil_url_t *url = NULL;    AXIS2_ENV_CHECK(env, NULL);    AXIS2_PARAM_CHECK(env->error, protocol, NULL);    if(!protocol || !*protocol || strstr(protocol, "://") || (host && strchr(host, '/')))    {        return NULL;    }    url = (axutil_url_t *)AXIS2_MALLOC(env->allocator, sizeof(axutil_url_t));    if(!url)    {        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");        return NULL;    }    url->protocol = axutil_strdup(env, protocol);    url->host = NULL;    url->path = NULL;    url->server = NULL;    url->query = NULL;    if(host)    {        url->host = (axis2_char_t *)axutil_strdup(env, host);        url->port = port;    }    else    {        url->port = 0;    }    /** if the path is not starting with / we have to make it so     */    if(path)    {        axis2_char_t *params = NULL;        axis2_char_t *temp = NULL;        if(path[0] == '/')        {            temp = (axis2_char_t *)axutil_strdup(env, path);        }        else        {            temp = axutil_stracat(env, "/", path);        }        params = strchr(temp, '?');        if(!params)        {            params = strchr(temp, '#');        }        if(params)        {            url->query = (axis2_char_t *)axutil_strdup(env, params);            *params = '/0';        }        url->path = (axis2_char_t *)axutil_strdup(env, temp);        AXIS2_FREE(env->allocator, temp);    }    return url;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:71,


示例19: prf_logOnResponseType_serialize_obj

        axiom_node_t* AXIS2_CALL        prf_logOnResponseType_serialize_obj(                prf_logOnResponseType_t* _logOnResponseType,                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)        {                                     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[PRF_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;                        AXIS2_ENV_CHECK(env, NULL);            AXIS2_PARAM_CHECK(env->error, _logOnResponseType, 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(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))              {                  /* it is better to stick with the standard prefix */                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");                                    axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);                  if(parent_element)                  {                        axiom_namespace_t *element_ns = NULL;                        element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",                                                            xsi_prefix);                        axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);                        if(element_ns)                        {                            axiom_namespace_free(element_ns, env);                        }                  }              }              type_attrib = axutil_strcat(env, " ", xsi_prefix, ":type=/"logOnResponseType/"", NULL);              axutil_stream_write(stream, env, type_attrib, axutil_strlen(type_attrib));              AXIS2_FREE(env->allocator, type_attrib);                              string_to_stream = ">";               axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));              tag_closed = 1;                        }            else {              /* if the parent tag closed we would be able to declare the type directly on the parent element */               if(!(xsi_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING)))              {                  /* it is better to stick with the standard prefix */                  xsi_prefix = (axis2_char_t*)axutil_strdup(env, "xsi");                                    axutil_hash_set(namespaces, "http://www.w3.org/2001/XMLSchema-instance", AXIS2_HASH_KEY_STRING, xsi_prefix);                  if(parent_element)                  {                        axiom_namespace_t *element_ns = NULL;                        element_ns = axiom_namespace_create(env, "http://www.w3.org/2001/XMLSchema-instance",                                                            xsi_prefix);                        axiom_element_declare_namespace_assume_param_ownership(parent_element, env, element_ns);                        if(element_ns)//.........这里部分代码省略.........
开发者ID:kolibre,项目名称:libkolibre-profileservice,代码行数:101,


示例20: wsf_wsdl_request

WSF_WSDL_EXTERN axis2_bool_t WSF_WSDL_CALL wsf_wsdl_request(    const axutil_env_t* env,    axis2_char_t* wsdl_file_name,    const axis2_char_t* operation_name,	    wsf_wsdl_data_t* parameters,    axis2_char_t* script_binding_home,    axis2_svc_client_t* svc_client,    axutil_hash_t* svc_client_user_options,    axis2_char_t* service_name,    axis2_char_t* port_name,    wsf_wsdl_data_t** response){    int soap_version = 2;     int has_fault = AXIS2_FALSE;    int binding_style = WSDL_BINDING_STYLE_DOC_LIT_W;    axis2_char_t* payload = NULL;	    axiom_node_t* payload_node = NULL;    axis2_char_t* request_buffer = NULL;	    axiom_node_t* type_map = NULL;	    axis2_char_t *res_text = NULL;	    axiom_node_t* sig_axiom = NULL;	    axiom_node_t *fault_node = NULL;	    axiom_node_t* wsdl_axiom = NULL;	    axiom_node_t* params_node = NULL;	    axiom_node_t* returns_node = NULL;	    axiom_soap_body_t *soap_body = NULL;	    axiom_node_t *body_base_node = NULL;	    /*axis2_char_t *wrapper_element = NULL;*/	    axiom_node_t* operation_axiom = NULL;	    axiom_soap_fault_t *soap_fault = NULL;	    axis2_options_t *client_options = NULL;	    /*axis2_char_t *wrapper_element_ns = NULL;*/	    /*axiom_node_t *axiom_soap_base_node = NULL;	*/    axiom_soap_envelope_t *response_envelope = NULL;	    wsf_wsdl_data_template_t* input_template = NULL;	    wsf_wsdl_data_template_t* output_template = NULL;	    axis2_bool_t is_version1_wsdl = AXIS2_FALSE;    axis2_char_t* xslt_location = NULL;    axis2_char_t* type_map_file = NULL;    AXIS2_LOG_TRACE_MSG(env->log, "Starting execution of wsf_wsdl_request...");     xslt_location = axutil_strcat(env, script_binding_home, WSF_WSDL_XSLT_LOCATION_POSTFIX, NULL);    type_map_file = axutil_strcat(env, script_binding_home, WSF_WSDL_TYPE_MAP_POSTFIX, NULL);    client_options = (axis2_options_t *)axis2_svc_client_get_options(svc_client, env);    axis2_options_set_xml_parser_reset(client_options, env, AXIS2_FALSE);    if (!wsf_wsdl_parser_load_wsdl(env, wsdl_file_name, xslt_location, &wsdl_axiom, &sig_axiom, &is_version1_wsdl, AXIS2_FALSE))        return AXIS2_FALSE;    wsdl_util_create_type_map(env, type_map_file, &type_map);    wsdl_util_manage_client_options(env,         svc_client,         svc_client_user_options,         client_options,         operation_name,         wsdl_axiom,         is_version1_wsdl,         sig_axiom,         service_name,        port_name,        &operation_axiom,         &soap_version);    wsdl_util_identify_binding_style(env, operation_axiom, &binding_style);    if (!operation_axiom)    {        AXIS2_LOG_ERROR_MSG(env->log, "Operation axiom is NULL");        if (wsdl_axiom)             axiom_node_free_tree(wsdl_axiom, env);        if (sig_axiom)            axiom_node_free_tree(sig_axiom, env);        if (type_map)            axiom_node_free_tree(type_map, env);        return AXIS2_FALSE;    }    wsdl_util_get_params_node(env, operation_axiom, &params_node);    wsdl_util_get_returns_node(env, operation_axiom, &returns_node);    wsdl_data_util_axiom_to_template(env, params_node, &input_template);    wsdl_data_util_axiom_to_template(env, returns_node, &output_template);#ifdef WSDL_DEBUG_MODE    {        axis2_char_t* buffer = NULL;        wsdl_data_util_serialize_data(env, parameters, &buffer);        AXIS2_LOG_DEBUG_MSG(env->log, buffer);        AXIS2_FREE(env->allocator, buffer);        wsdl_data_util_serialize_template(env, input_template, &buffer);        AXIS2_LOG_DEBUG_MSG(env->log, buffer);        AXIS2_FREE(env->allocator, buffer);        buffer = NULL;    }//.........这里部分代码省略.........
开发者ID:kasungayan,项目名称:commons,代码行数:101,


示例21: wsf_wsdl_mode_initialize_for_service

/** * initializes the service and create the wsdl_info_t structure */WSF_WSDL_EXTERN axis2_bool_t WSF_WSDL_CALLwsf_wsdl_mode_initialize_for_service(    const axutil_env_t* env,    axis2_char_t* wsdl_file_name,    axis2_char_t* script_binding_home,    axis2_svc_t* service,    axis2_conf_ctx_t* worker_conf_ctx,    axutil_hash_t* script_service_user_options,    axis2_char_t* service_name,    axis2_char_t* port_name,    wsf_wsdl_info_t** wsdl_info){    axiom_node_t* type_map = NULL;	    axiom_node_t* sig_axiom = NULL;	    axiom_node_t* wsdl_axiom = NULL;	    axutil_hash_t* operations = NULL;    axis2_bool_t success = AXIS2_FAILURE;    wsf_wsdl_info_t* info = NULL;    axis2_bool_t is_version1_wsdl = AXIS2_FALSE;    axis2_char_t* xslt_location = NULL;    axis2_char_t* type_map_file = NULL;    xslt_location = axutil_strcat(env, script_binding_home, WSF_WSDL_XSLT_LOCATION_POSTFIX, NULL);    type_map_file = axutil_strcat(env, script_binding_home, WSF_WSDL_TYPE_MAP_POSTFIX, NULL);    if (wsf_wsdl_parser_load_wsdl(env,                                   wsdl_file_name,                                   xslt_location,                                   &wsdl_axiom,                                   &sig_axiom,                                   &is_version1_wsdl,                                   AXIS2_TRUE))    {        wsf_wsdl_util_handle_service_security(env,                                              service,                                              worker_conf_ctx,                                              script_service_user_options,                                              service_name,                                              port_name,                                              wsdl_axiom,                                              is_version1_wsdl);                                                  wsdl_util_create_type_map(env, type_map_file, &type_map);        wsdl_util_get_operations(env, sig_axiom, &operations);        if (wsdl_info)        {            if (*wsdl_info)            {                       AXIS2_FREE(env->allocator, *wsdl_info);            }            info = (wsf_wsdl_info_t*)AXIS2_MALLOC(env->allocator, sizeof(wsf_wsdl_info_t));            info->type_map = type_map;            info->operations = operations;            *wsdl_info = info;            success = AXIS2_SUCCESS;        }    }       return success;}
开发者ID:kasungayan,项目名称:commons,代码行数:69,


示例22: main

//.........这里部分代码省略.........    {        axis2_options_set_http_method(options, env, AXIS2_HTTP_PUT);    }    else if (AXIS2_TRUE == method_delete)    {        axis2_options_set_http_method(options, env, AXIS2_HTTP_DELETE);    }    /* 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_svc_client_get_last_response_has_fault(svc_client, env))    {        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 FAILED!/n");    }    else 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 if (method_head &&        axis2_svc_client_get_last_response_has_fault(svc_client, env))    {        /* HEAD request should probably be removed from this file,         * and be relocated to transport unit tests.         */        printf("/necho client invoke FAILED!/n");    }    else if (method_head)    {        /* HEAD request should probably be removed from this file,         * and be relocated to transport unit tests.         */        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;    }    return 0;}
开发者ID:joshkamau,项目名称:wso2-wsf-php54,代码行数:101,


示例23: adb_getPermissionsResponse_serialize_obj

//.........这里部分代码省略.........                                             "http://services.resource.ui.mgt.registry.carbon.wso2.org",                                             "n");                            axutil_hash_set(namespaces, "http://services.resource.ui.mgt.registry.carbon.wso2.org", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n"));                                                                parent_element = axiom_element_create (env, NULL, "getPermissionsResponse", ns1 , &parent);                                                            axiom_element_set_namespace(parent_element, env, ns1, parent);                                data_source = axiom_data_source_create(env, parent, &current_node);                    stream = axiom_data_source_get_stream(data_source, env);                                         if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://services.resource.ui.mgt.registry.carbon.wso2.org", 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://services.resource.ui.mgt.registry.carbon.wso2.org", AXIS2_HASH_KEY_STRING, p_prefix);                                                      axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,                                            "http://services.resource.ui.mgt.registry.carbon.wso2.org",                                            p_prefix));                       }                                         if (!_getPermissionsResponse->is_valid_return)                   {                                                 /* no need to complain for minoccurs=0 element */                                                                         }                   else                   {                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *                                 (4 + axutil_strlen(p_prefix) +                                   axutil_strlen("return")));                                                                   /* 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("return")));                                  /* axutil_strlen("</:>") + 1 = 5 */                                                                                                                                       /*                      * parsing return element                      */                                                                    sprintf(start_input_str, "<%s%sreturn",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                                                     start_input_str_len = axutil_strlen(start_input_str);                        sprintf(end_input_str, "</%s%sreturn>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                        end_input_str_len = axutil_strlen(end_input_str);                                                 if(!adb_PermissionBean_is_particle())                            {                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);                            }                            adb_PermissionBean_serialize(_getPermissionsResponse->property_return,                                                                                  env, current_node, parent_element,                                                                                 adb_PermissionBean_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);                                                        if(!adb_PermissionBean_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);                 }                                     if(namespaces)                   {                       axutil_hash_index_t *hi;                       void *val;                       for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi))                        {                           axutil_hash_this(hi, NULL, NULL, &val);                           AXIS2_FREE(env->allocator, val);                       }                       axutil_hash_free(namespaces, env);                   }                            return parent;        }
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:101,


示例24: axiom_text_serialize

AXIS2_EXTERN axis2_status_t AXIS2_CALLaxiom_text_serialize(    axiom_text_t * om_text,    const axutil_env_t * env,    axiom_output_t * om_output){    int status = AXIS2_SUCCESS;    axis2_char_t *attribute_value = NULL;    const axis2_char_t *text = NULL;    axiom_xml_writer_t *om_output_xml_writer = NULL;    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);    AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);    if(!axiom_text_get_is_binary(om_text, env))    {        if(om_text->value)        {            status = axiom_output_write(om_output, env, AXIOM_TEXT, 1, axutil_string_get_buffer(                om_text->value, env));        }    }    else    {        om_output_xml_writer = axiom_output_get_xml_writer(om_output, env);        if(axiom_output_is_optimized(om_output, env) && om_text->optimize)        {            if(!(axiom_text_get_content_id(om_text, env)))            {                axis2_char_t *content_id = axiom_output_get_next_content_id(om_output, env);                if(content_id)                {                    om_text->content_id = axutil_strdup(env, content_id);                }            }            attribute_value = axutil_stracat(env, "cid:", om_text->content_id);            /*send binary as MTOM optimised */            if(om_text->om_attribute)            {                axiom_attribute_free(om_text->om_attribute, env);                om_text->om_attribute = NULL;            }            om_text->om_attribute = axiom_attribute_create(env, "href", attribute_value, NULL);            AXIS2_FREE(env->allocator, attribute_value);            attribute_value = NULL;            if(!om_text->is_swa) /* This is a hack to get SwA working */            {                axiom_text_serialize_start_part(om_text, env, om_output);            }            else            {                status = axiom_output_write(om_output, env, AXIOM_TEXT, 1, om_text->content_id);            }            axiom_output_write_optimized(om_output, env, om_text);            axiom_output_write(om_output, env, AXIOM_ELEMENT, 0);        }        else        {            text = axiom_text_get_text(om_text, env);            axiom_xml_writer_write_characters(om_output_xml_writer, env, (axis2_char_t *)text);        }    }    return status;}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:71,


示例25: axutil_url_parse_string

AXIS2_EXTERN axutil_url_t *AXIS2_CALLaxutil_url_parse_string(    const axutil_env_t *env,    const axis2_char_t *str_url){    /**     * Only accepted format is :      * protocol://host:port/path     * Added file:///path     * port is optional and the default port is assumed     * if path is not present / (root) is assumed     */    axis2_char_t *tmp_url_str = NULL;    axutil_url_t *ret = NULL;    const axis2_char_t *protocol = NULL;    axis2_char_t *path = NULL;    axis2_char_t *port_str = NULL;    axis2_char_t *host = NULL;    int port = 0;    AXIS2_ENV_CHECK(env, NULL);    AXIS2_PARAM_CHECK(env->error, str_url, NULL);    tmp_url_str = axutil_strdup(env, str_url);    if(!tmp_url_str)    {        return NULL;    }    protocol = tmp_url_str;    host = strstr(tmp_url_str, "://");    if(!host)    {        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);        AXIS2_FREE(env->allocator, tmp_url_str);        return NULL;    }    if(axutil_strlen(host) < 3 * sizeof(axis2_char_t))    {        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid IP or hostname");        AXIS2_FREE(env->allocator, tmp_url_str);        return NULL;    }    *host = '/0';    host += 3 * sizeof(axis2_char_t); /* skip "://" part */    if(axutil_strlen(host) <= 0)    {        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid IP or hostname");        AXIS2_FREE(env->allocator, tmp_url_str);        return NULL;    }    /* if the url is file:// thing we need the protocol and     * path only     */    if(0 == axutil_strcasecmp(protocol, (const axis2_char_t *)"file"))    {        ret = axutil_url_create(env, protocol, NULL, 0, host);        AXIS2_FREE(env->allocator, tmp_url_str);        return ret;    }    port_str = strchr(host, ':');    if(!port_str)    {        path = strchr(host, '/');        if(!path)        {            path = strchr(host, '?');        }        else        {            *path++ = '/0';        }        if(!path)        {            path = strchr(host, '#');        }        if(!path)        {            /* No path - assume def path ('/') */            /* here we have protocol + host + def port + def path */            ret = axutil_url_create(env, protocol, host, port, "/");            AXIS2_FREE(env->allocator, tmp_url_str);            return ret;        }        else        {            axis2_char_t *path_temp = NULL;            path_temp = axutil_strdup(env, path);            *path = '/0';            /* here we have protocol + host + def port + path */            ret = axutil_url_create(env, protocol, host, port, path_temp);            AXIS2_FREE(env->allocator, tmp_url_str);            AXIS2_FREE(env->allocator, path_temp);            return ret;        }    }//.........这里部分代码省略.........
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:101,


示例26: adb_CipherReference_serialize_obj

//.........这里部分代码省略.........            AXIS2_ENV_CHECK(env, NULL);            AXIS2_PARAM_CHECK(env->error, _CipherReference, NULL);                                             namespaces = axutil_hash_make(env);                    next_ns_index = &next_ns_index_value;                                                ns1 = axiom_namespace_create (env,                                             "http://www.w3.org/2001/04/xmlenc#",                                             "n");                            axutil_hash_set(namespaces, "http://www.w3.org/2001/04/xmlenc#", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n"));                                                                parent_element = axiom_element_create (env, NULL, "CipherReference", ns1 , &parent);                                                            axiom_element_set_namespace(parent_element, env, ns1, parent);                                data_source = axiom_data_source_create(env, parent, &current_node);                    stream = axiom_data_source_get_stream(data_source, env);                                         if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://www.w3.org/2001/04/xmlenc#", 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.w3.org/2001/04/xmlenc#", AXIS2_HASH_KEY_STRING, p_prefix);                                                      axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,                                            "http://www.w3.org/2001/04/xmlenc#",                                            p_prefix));                       }                                         if (!_CipherReference->is_valid_CipherReference)                   {                                                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property CipherReference");                            return NULL;                                             }                   else                   {                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *                                 (4 + axutil_strlen(p_prefix) +                                   axutil_strlen("CipherReference")));                                                                   /* 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("CipherReference")));                                  /* axutil_strlen("</:>") + 1 = 5 */                                                                                                                                       /*                      * parsing CipherReference element                      */                                                                    sprintf(start_input_str, "<%s%sCipherReference",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                                                     start_input_str_len = axutil_strlen(start_input_str);                        sprintf(end_input_str, "</%s%sCipherReference>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                        end_input_str_len = axutil_strlen(end_input_str);                    adb_CipherReferenceType_serialize(_CipherReference->property_CipherReference,                                                                                  env, current_node, parent_element,                                                                                 adb_CipherReferenceType_is_particle() || AXIS2_TRUE, namespaces, next_ns_index);                                                                      AXIS2_FREE(env->allocator,start_input_str);                     AXIS2_FREE(env->allocator,end_input_str);                 }                                     if(namespaces)                   {                       axutil_hash_index_t *hi;                       void *val;                       for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi))                        {                           axutil_hash_this(hi, NULL, NULL, &val);                           AXIS2_FREE(env->allocator, val);                       }                       axutil_hash_free(namespaces, env);                   }                            return parent;        }
开发者ID:isidrogc,项目名称:libkolibre-daisyonline,代码行数:101,


示例27: adb_subscriberRequest_serialize_obj

//.........这里部分代码省略.........                             int next_ns_index_value = 0;                        AXIS2_ENV_CHECK(env, NULL);            AXIS2_PARAM_CHECK(env->error, _subscriberRequest, 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, "subscriberRequest", ns1 , &parent);                                                            axiom_element_set_namespace(parent_element, env, ns1, parent);                                data_source = axiom_data_source_create(env, parent, &current_node);                    stream = axiom_data_source_get_stream(data_source, env);                                         p_prefix = NULL;                                         if (!_subscriberRequest->is_valid_number)                   {                                                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property number");                            return NULL;                                             }                   else                   {                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *                                 (4 + axutil_strlen(p_prefix) +                                   axutil_strlen("number")));                                                                   /* 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("number")));                                  /* axutil_strlen("</:>") + 1 = 5 */                                                                                                                                       /*                      * parsing number element                      */                                                                    sprintf(start_input_str, "<%s%snumber>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                                                    start_input_str_len = axutil_strlen(start_input_str);                        sprintf(end_input_str, "</%s%snumber>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                        end_input_str_len = axutil_strlen(end_input_str);                                                   sprintf (text_value_1, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _subscriberRequest->property_number);                                                        axutil_stream_write(stream, env, start_input_str, start_input_str_len);                                                      axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));                                                      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);                 }                                     if(namespaces)                   {                       axutil_hash_index_t *hi;                       void *val;                       for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi))                        {                           axutil_hash_this(hi, NULL, NULL, &val);                           AXIS2_FREE(env->allocator, val);                       }                       axutil_hash_free(namespaces, env);                   }                            return parent;        }
开发者ID:akimdi,项目名称:laba2,代码行数:101,


示例28: main

//.........这里部分代码省略.........    /* Build the SOAP request message payload using OM API. */    payload =        build_soap_body_content(env, operation, google_key, word_to_spell);    /* Send request */    ret_node = axis2_svc_client_send_receive(svc_client, env, payload);    if (axis2_svc_client_get_last_response_has_fault(svc_client, env))    {        axiom_soap_envelope_t *soap_envelope = NULL;        axiom_soap_body_t *soap_body = NULL;        axiom_soap_fault_t *soap_fault = NULL;        axis2_char_t *fault_string = NULL;        printf("/nResponse has a SOAP fault/n");        soap_envelope =            axis2_svc_client_get_last_response_soap_envelope(svc_client, env);        if (soap_envelope)        {            soap_body = axiom_soap_envelope_get_body(soap_envelope, env);        }        if (soap_body)        {            soap_fault = axiom_soap_body_get_fault(soap_body, env);        }        if (soap_fault)        {            fault_string = axiom_node_to_string(axiom_soap_fault_get_base_node                                                (soap_fault, env), env);            printf("/nReturned SOAP fault: %s/n", fault_string);            AXIS2_FREE (env->allocator, fault_string);        }        if (svc_client)        {            axis2_svc_client_free(svc_client, env);            svc_client = NULL;        }        if (env)        {            axutil_env_free((axutil_env_t *) env);            env = NULL;        }        return -1;    }    if (ret_node)    {        if (axiom_node_get_node_type(ret_node, env) == AXIOM_ELEMENT)        {            axis2_char_t *result = NULL;            axiom_element_t *result_ele = NULL;            axiom_node_t *ret_node1 = NULL;            result_ele =                (axiom_element_t *) axiom_node_get_data_element(ret_node, env);            if (axutil_strcmp                (axiom_element_get_localname(result_ele, env),                 "doSpellingSuggestionResponse") != 0)            {                print_invalid_om(env, ret_node);
开发者ID:joshkamau,项目名称:wso2-wsf-php54,代码行数:67,


示例29: adb_getOperationRequestCount_serialize_obj

//.........这里部分代码省略.........                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("serviceName")));                                  /* axutil_strlen("</:>") + 1 = 5 */                                                                                                                                       /*                      * parsing serviceName element                      */                                                                    sprintf(start_input_str, "<%s%sserviceName>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                                                    start_input_str_len = axutil_strlen(start_input_str);                        sprintf(end_input_str, "</%s%sserviceName>",                                 p_prefix?p_prefix:"",                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");                        end_input_str_len = axutil_strlen(end_input_str);                                               text_value_1 = _getOperationRequestCount->property_serviceName;                                                      axutil_stream_write(stream, env, start_input_str, start_input_str_len);                                                                                  text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);                           if (text_value_1_temp)                           {                               axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));                               AXIS2_FREE(env->allocator, text_value_1_temp);                           }                           else                           {                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));                           }                                                      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);                 }                                         if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://org.apache.axis2/xsd", 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://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING, p_prefix);                                                      axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,                                            "http://org.apache.axis2/xsd",                                            p_prefix));                       }                                         if (!_getOperationRequestCount->is_valid_operationName)                   {                                                 /* no need to complain for minoccurs=0 element */                                                      
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:65,


示例30: axiom_mime_body_part_write_to_list

AXIS2_EXTERN axis2_status_t AXIS2_CALLaxiom_mime_body_part_write_to_list(    axiom_mime_body_part_t *mime_body_part,    const axutil_env_t *env,    axutil_array_list_t *list){    axutil_hash_index_t *hash_index = NULL;    const void *key = NULL;    void *value = NULL;    axis2_char_t *header_str = NULL;    axis2_char_t *temp_header_str = NULL;    int header_str_size = 0;    axis2_status_t status = AXIS2_FAILURE;    axiom_mime_part_t *mime_header_part = NULL;    /* We have the mime headers in the hash with thier keys     * So first concatenate them to a one string */    for(hash_index = axutil_hash_first(mime_body_part->header_map, env); hash_index; hash_index        = axutil_hash_next(env, hash_index))    {        axutil_hash_this(hash_index, &key, NULL, &value);        if(key && value)        {            /* First conactenate to the already conacatenated stuff */            temp_header_str = axutil_stracat(env, header_str, (axis2_char_t *)key);            if(header_str)            {                AXIS2_FREE(env->allocator, header_str);            }            header_str = temp_header_str;            temp_header_str = axutil_stracat(env, header_str, ": ");            AXIS2_FREE(env->allocator, header_str);            header_str = temp_header_str;            /* Add the new stuff */            temp_header_str = axutil_stracat(env, header_str, (axis2_char_t *)value);            AXIS2_FREE(env->allocator, header_str);            header_str = temp_header_str;            /* Next header will be in a new line. So lets add it */            temp_header_str = axutil_stracat(env, header_str, AXIS2_CRLF);            AXIS2_FREE(env->allocator, header_str);            header_str = temp_header_str;        }    }    /* If there is a data handler that's mean there is an attachment. Attachment     * will always start after an additional new line . So let's add it .*/    if(mime_body_part->data_handler)    {        temp_header_str = axutil_stracat(env, header_str, AXIS2_CRLF);        AXIS2_FREE(env->allocator, header_str);        header_str = temp_header_str;    }    if(header_str)    {        header_str_size = axutil_strlen(header_str);    }    /* Now we have the complete mime_headers string for a particular mime part.     * First wrap it as a mime_part_t .Then add it to the array list so     * later through the transport this can be written to the wire. */    mime_header_part = axiom_mime_part_create(env);    if(mime_header_part)    {        mime_header_part->part = (axis2_byte_t *)header_str;        mime_header_part->part_size = header_str_size;        mime_header_part->type = AXIOM_MIME_PART_BUFFER;    }    else    {        return AXIS2_FAILURE;    }    axutil_array_list_add(list, env, mime_header_part);    /* Then if the data_handler is there let's add the binary data, may be     * buffer , may be file name and information.      */    if(mime_body_part->data_handler)    {        status = axiom_data_handler_add_binary_data(mime_body_part->data_handler, env, list);        if(status != AXIS2_SUCCESS)        {            return status;        }    }    return AXIS2_SUCCESS;}
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:97,



注:本文中的AXIS2_FREE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ AXIS2_LOG_ERROR函数代码示例
C++ AWAIT_EXPECT_RESPONSE_STATUS_EQ函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。