I have built an axis2 service in java, and configured it as transportsession. 
Also I have implemented a java client and it supports transportsession. I 
logged the session cookie ids in server side and get the same cookies for each 
java-stub. I generated client codes from wsdl2c tool, but found that one c-stub 
changes cookie id constantly. How to make c-stub supports transportsession? My 
codes of createing a c-stub:



    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;
    axis2_stub_t* stub = NULL;
    const axis2_char_t* endpoint_uri = NULL;

    env = axutil_env_create_all("jsweis.log", AXIS2_LOG_LEVEL_TRACE);
    address = "http://localhost:8888/axis2/services/jsweis";;
    endpoint_ref = axis2_endpoint_ref_create(env, address);
    options = axis2_options_create(env);
    axis2_options_set_to(options, env, endpoint_ref);
    client_home = AXIS2_GETENV("AXIS2C_HOME");

    endpoint_uri = axis2_endpoint_ref_get_address(endpoint_ref, env);
    stub = axis2_stub_create_jsweis(env, client_home, endpoint_uri);



Regards
Zhigang

Reply via email to