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?

Thanks,
Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to