Changing service client options after between messages ------------------------------------------------------
Key: AXIS2C-1355 URL: https://issues.apache.org/jira/browse/AXIS2C-1355 Project: Axis2-C Issue Type: Bug Components: core/clientapi Affects Versions: 1.6.0 Environment: Axis2/C from svn (26 Feb 2009) Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux Reporter: Rutger van Eerd Priority: Minor I want to use a single service client to send multiple messages, with different options (i.e. SOAP action). Basicly I do the following. 1. Create service client object. 2. Create options object and set options. 3. Set options to service client (axis2_svc_client_set_options). 4. Execute message (axis2_svc_client_send_receive). 5. Create new options object and set new options. 6. Set new options to service client (axis2_svc_client_set_options). 7. Execute new message (axis2_svc_client_send_receive). When doing step 7, I get the following message when running under Valgrind. ==3630== Invalid read of size 4 ==3630== at 0x40954A2: axis2_options_get_xml_parser_reset (options.c:883) ==3630== by 0x4095E02: axis2_op_client_free (op_client.c:655) ==3630== by 0x4097D2E: axis2_svc_client_create_op_client (svc_client.c:1072) ==3630== by 0x4099735: axis2_svc_client_send_receive_with_op_qname (svc_client.c:835) ==3630== by 0x4099A1C: axis2_svc_client_send_receive (svc_client.c:939) ==3630== by 0x80496BA: main (client.cpp:273) ==3630== Address 0x427CD4C is 60 bytes inside a block of size 64 free'd ==3630== at 0x4004EFA: free (vg_replace_malloc.c:235) ==3630== by 0x4010E82: axutil_allocator_free_impl (allocator.c:92) ==3630== by 0x40951D8: axis2_options_free (options.c:787) ==3630== by 0x409785D: axis2_svc_client_set_options (svc_client.c:376) ==3630== by 0x804961F: main (client.cpp:261) My guess is that the op_client tries to access the old options object from step 2/3. This is no longer valid as it has been freed when setting the new options (step 6). Or is svc_client not designed to send multiple messages with different options? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.