Emanuele Benedetti wrote:
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?
You can use the same service client with different endpoints and
payloads. Are you using multiple threads ?
Damitha
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:be...@mclink.it
---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org
--
__________________________________________________________________
Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/
blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org