Can you send the stack trace? On Mon, Aug 3, 2009 at 6:17 PM, Nabeel Naseem Ahsan <ahsan.nab...@gmail.com>wrote:
> I tried using this property with axis2 1.5.0, but i got an segmentation > fault. Can anyone help me out? > > Nabeel Ahsan > > > On Fri, Jul 10, 2009 at 4:48 PM, Sam Carleton <scarle...@gmail.com> wrote: > >> Thank you for posting the answer, this could be very useful! >> >> On Fri, Jul 10, 2009 at 7:10 AM, Stefan Hristov <shris...@gcn.bg> wrote: >> >>> Well, looking at the source usually helps :) >>> >>> There is a property in msg_ctx called AXIS2_SVR_PEER_IP_ADDR which >>> contains the remote peer IP address. >>> So basically this is how one could get the web-service consumer IP >>> address: >>> >>> axutil_property_t *peer = axis2_msg_ctx_get_property >>> (msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR); >>> char *remote_ip = (char *) axutil_property_get_value >>> (peer, env); >>> AXIS2_LOG_INFO (env->log, "Got a call from %s", >>> remote_ip); >>> >>> On Thursday 09 July 2009 18:40:46 Stefan Hristov wrote: >>> > Hi all, >>> > >>> > I am writing a web-service using Axis2/C v1.6.0. The service is >>> deployed with Apache2 mod-axis2.so. >>> > >>> > I need to get the sender IP address (or anything which can be used to >>> identify the consumer) when my service is called (meaning, in >>> axis2_svc_skel_XXX_invoke function). >>> > >>> > I have searched through the API documentation using axis2_msg_ctx_t as >>> a reference (the startup data I have in invoke function), but unfortunately >>> the functions I've found return my own address (the full URL, actually), not >>> senders. I mean axis2_msg_ctx_get_from and axis2_options_get_from, both >>> yielding axis2_endpoint_ref_t type. There are few similar other functions, >>> but they all are returning NULL. >>> > >>> > Any suggestions or pointers, please? :) >>> > >>> >> >> > -- http://wso2.org http://llvm.org http://www.minix3.org