Hi, I am a student in tsinghua university, China, recently I used axis2/C to develop a web system, I encounter a problem confusing a long time, I want to add a custom http header in my response message, I write to following code hoping to achive it, but I failed(because I can not see my header in tool tcpmon), can you help me? thank you very much! axis2_op_ctx_t *op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env); axis2_msg_ctx_t *out_msg_ctx; out_msg_ctx = axis2_op_ctx_get_msg_ctx(op_ctx, env, AXIS2_WSDL_MESSAGE_LABEL_OUT); axis2_char_t *header_name = "x_object_name"; /*Custom header name*/ axis2_char_t *header_value = "1234567"; /*Custom header value*/ axis2_http_header_t *http_header = axis2_http_header_create(env, header_name, header_value); axutil_array_list_t *http_headers_list = axutil_array_list_create(env, 10); axutil_array_list_add(http_headers_list, env, http_header); axis2_msg_ctx_set_http_output_headers(out_msg_ctx, env, http_headers_list); /*I used this method to set my custom http header*/
2010-12-13 ruanhuabin
