axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: axis2_svc_client_get_options returns a "const" ?
Date Thu, 05 Oct 2006 08:08:26 GMT
Ishan De Silva wrote:
> Samisa Abeysinghe wrote:
>> Ishan De Silva wrote:
>>> Hi,
>>> The get_option function of the service client returns a const 
>>> axis2_options_t pointer.
>> The idea is that use would create options and would own options. 
>> Hence not need to access options from service client in your client 
>> program. Rather use the pointer to options that you passes to service 
>> client.
> I came across this problem when writing a module. I'm providing a 
> library function which takes in a service client as an IN parameter. 
> Inside the function, I want to change the wsa:Action and use that 
> client to send a message. I remember the old action so that I can set 
> it back when returning from the function. So in this situation, I 
> don't own the options nor the client.
> As a work around, I can forcefully cast the return value from 
> get_option fn to a non-const type. Is that the correct way to go?
Yes that is a possible workaround.
However, in the handler, you have access to message context, using which 
you can gain access to WSA action.

BTW, what sort of a handler you are writing that requires a service 
client within it?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message