[jira] [Commented] (AXIS2C-1686) Can't reuse svc_client ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (AXIS2C-1686) Can't reuse svc_client ?

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/AXIS2C-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15412757#comment-15412757 ]

Rafael Bronzeri commented on AXIS2C-1686:

Hi Alexis,

Yes, you can reuse svc_client. In your example, the second call to axis2_svc_client_send_receive invalidates ret_node1, but you can get the values from ret_node2.
To reuse svc_client you have to read response before another call to axis2_svc_client_send_receive, something like this:
        ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
        if (ret_node)
                //read the response

        ret_node2 = axis2_svc_client_send_receive(svc_client, env, payload);

        if (ret_node2)
                //read another response

I think that the program should not crash when you try to reuse object, We can do some improvement in trunk version.

> Can't reuse svc_client ?
> ------------------------
>                 Key: AXIS2C-1686
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1686
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: transport/http
>         Environment: Linux / Ubuntu 14.04
> Mac OS X
>            Reporter: Alexis Gruet
>            Priority: Minor
>             Fix For: 1.7.0
> When a single svc_client is created i've send two requests, like this pseudo code :
> ret_node1 = axis2_svc_client_send_receive (svc_client, _env.get, payload);
> ret_node2 = axis2_svc_client_send_receive (svc_client, _env.get, payload);
> but the http client crash when building the soap_env, somewhere in soap_builder.c:281 ( axiom_soap_builder_next() )
> svc_client can't not be reused ? for each request we have to recreate a new svc_client ? However, In the axis2c samples ( echo service ) i can almost see the same case, so i suppose this should be supported.
> ( I use the SVN Trunk )

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]