Return-Path: Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: (qmail 90892 invoked from network); 20 Sep 2010 20:20:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Sep 2010 20:20:35 -0000 Received: (qmail 4147 invoked by uid 500); 20 Sep 2010 20:20:35 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 4042 invoked by uid 500); 20 Sep 2010 20:20:34 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 4034 invoked by uid 99); 20 Sep 2010 20:20:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 20:20:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.110.128.103] (HELO smtpout5.mclink.it) (195.110.128.103) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 20:20:25 +0000 Received: from smtpoutgw3.mclink.it (smtpoutgw3.mclink.it [77.43.30.43]) by smtpout5.mclink.it (8.13.6/8.13.6) with ESMTP id o8KKK23a048341 for ; Mon, 20 Sep 2010 22:20:02 +0200 (CEST) (envelope-from benem@mclink.it) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AusLAM5el0zDbohb/2dsb2JhbACGc0KMdX+MdHHDNoVBBIo4hHg Received: from smail1.mclink.it ([195.110.136.91]) by smtpoutgw3.mclink.it with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Sep 2010 22:20:03 +0200 Received: from Silvestro (net77-43-69-89.mclink.it [77.43.69.89]) (authenticated bits=0) by smail1.mclink.it (8.12.9p2/8.12.9) with ESMTP id o8KKK1xA046796 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 20 Sep 2010 22:20:02 +0200 (CEST) (envelope-from benem@mclink.it) Date: Mon, 20 Sep 2010 22:19:55 +0200 From: Emanuele Benedetti Reply-To: Emanuele Benedetti X-Priority: 3 (Normal) Message-ID: <33863994.20100920221955@mclink.it> To: c-user@axis.apache.org Subject: Multiple svc_client MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Ciao C-user I have a problem: I'm writing a client that sends soap messages with axis2. I need send messages to different addresses based on the message type. So in my client application I've created an axis2c environment with axutil_env_create_all and multiple axis2 option with axis2_options_create, one for each address. I've created and attach an end point reference with axis2_endpoint_ref_create and axis2_options_set_to and, finally I've created a service client with axis2_svc_client_create and attached to the option with axis2_svc_client_set_options. When is time to send a message I choose the correct svc_client and send a message with axis2_svc_client_send_receive. I reuse the svc_client for every message (so i create the various svc_client objects at the beginning of the program and use them when needed). If I use only one svc_client all is working fine but as soon as I started to send messages to more than one svc_client after few messages the program crashes trying to free something inside axis2_svc_client_send_receive. Is it not possible to use different svc_client object at the same time? I had to free and create a svc_client with the correct address for every request? Here there is the backtrace: #0 0xb7070950 in free () from /lib/i686/cmov/libc.so.6 #1 0xb71fdad2 in xmlCharEncCloseFunc () from /usr/lib/libxml2.so.2 #2 0xb722d64f in xmlFreeParserInputBuffer () from /usr/lib/libxml2.so.2 #3 0xb72022b3 in xmlFreeInputStream () from /usr/lib/libxml2.so.2 #4 0xb72022f8 in xmlFreeParserCtxt () from /usr/lib/libxml2.so.2 #5 0xb72c08c3 in xmlFreeTextReader () from /usr/lib/libxml2.so.2 #6 0xb73d9bed in axis2_libxml2_reader_wrapper_free (parser=0xc280d48, env=0x119a31a0) at libxml2_reader_wrapper.c:518 #7 0xb73d89d8 in axiom_xml_reader_free (parser=0xc280d48, env=0x119a31a0) at ../xml_reader.c:34 #8 0xb73f3a9a in axiom_stax_builder_free (om_builder=0x104fcb68, env=0x119a31a0) at om_stax_builder.c:911 #9 0xb73fe536 in axiom_soap_builder_free (soap_builder=0xd93ff40, env=0x119a31a0) at soap_builder.c:198 #10 0xb73fcb8f in axiom_soap_envelope_free (soap_envelope=0xc38b7e8, env=0x119a31a0) at soap_envelope.c:178 #11 0xb73b2f7d in axis2_msg_ctx_free (msg_ctx=0xc02b8d8, env=0x119a31a0) at msg_ctx.c:423 #12 0xb73b3a4a in axis2_op_ctx_free (op_ctx=0x11d35f20, env=0x119a31a0) at op_ctx.c:164 #13 0xb73ba42a in axis2_op_client_free (op_client=0xd0a6ce8, env=0x119a31a0) at op_client.c:641 #14 0xb73bc354 in axis2_svc_client_create_op_client (svc_client=0x119bd870, env=0x119a31a0, op_qname=0xb610bf40) at svc_client.c:963 #15 0xb73bcf16 in axis2_svc_client_send_receive_with_op_qname (svc_client=0x119bd870, env=0x119a31a0, op_qname=0xb610bf40, payload=0xb6120238) at svc_client.c:726 #16 0xb73bd1d3 in axis2_svc_client_send_receive (svc_client=0x119bd870, env=0x119a31a0, payload=0xb6120238) at svc_client.c:830 Thank you for the help. This is -- Saluti Emanuele mailto:benem@mclink.it --------------------------------------------------------------------- To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org For additional commands, e-mail: c-user-help@axis.apache.org