axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Lin <everex...@yahoo.com.cn>
Subject [AXIS2C]: Query failed wtih client stub generated by WSDL2C
Date Mon, 11 Jun 2007 03:13:54 GMT
Hi

I had used axis_c 1.6b for sometime, and move to axis2c 1.0 recently. My developing rutine
is to write wsdl file first, and generate stub and server skeleton code with WSDL2C and put
my own code in the right place. There is a change from axisc 1.6b t axis2c 1.0, and I met
a problem while developing the client code. 
The interface is quite simple, both the input and the output are strings, the client stub
is genereated succefully, and I write the the client code as following: 

...
    axutil_env_t*          env          = NULL;
    axis2_char_t*          client_home  = NULL;
    axis2_char_t*          endpoint_uri = NULL;
    axis2_stub_t*          stub         = NULL;

    axis2_GetUrlServerInput_t*  url_svr_in  = NULL;
    axis2_GetUrlServerOutput_t* url_svr_out = NULL;

    endpoint_uri = "http://localhost:9090/axis2/services/ServerRequest";
    env = axutil_env_create_all("server_request.log",
                                AXIS2_LOG_LEVEL_TRACE);


    client_home = AXIS2_GETENV("AXIS2C_HOME");

    if (!client_home)
        client_home = "../../../deploy";

    stub = axis2_stub_ServerRequest_create(env,
                                           client_home,
                                           endpoint_uri);

    url_svr_in = axis2_GetUrlServerInput_create(env);
    axis2_char_t * p_group_name = "group1";
    axis2_GetUrlServerInput_set_group_name(url_svr_in,
                                           env,
                                           p_group_name);

    url_svr_out =
        axis2_stub_ServerRequest_doGetUrlServer(stub,
                                                env,
                                                url_svr_in);


    axis2_char_t * p_svr_addr;
    if (url_svr_out != NULL) {
        p_svr_addr = axis2_GetUrlServerOutput_get_server_address(url_svr_out,
                                                                 env);
        strcpy(svr_addr, p_svr_addr);
        printf("Output %s \n", p_svr_addr);
    }
    else
    {
        printf("No url_svr_out output \n");
    }
... 
The code is compiled successfully and everything looks good, but it doesn't work, NO SOAP
MESSAGE IS BEING SENT TO THE SERVER. Does anyone can tell me where is the problem in my implementation
of the client ?

-Thanks
 
Everex



       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get
online.
http://smallbusiness.yahoo.com/webhosting 
Mime
View raw message