Hi all,
any hints/answer to solve this problem (see my previous email below)?
To put it in a nutshell:
Is it possible to set the request timeout (and other options params) at
runtime by configuration (!= programmatically)?
Thanks,
Alexis
On Thu, May 15, 2008 at 2:17 PM, Alexis Midon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following (pseudo) code to invoke an external web service with
> axis2. My goal is to configure the corresponding ServiceClient with a
> service.xml file added at runtime.
>
> client = new ServiceClient(new ConfigurationContext(axisConfig), null);
> is = new
> File("my/service/file/polled/at/runtime").toURI().toURL().openStream();
> builder = new ServiceBuilder(is, new
> ConfigurationContext(client.getAxisConfiguration()),
> client.getAxisService());
> builder.populateService(builder.buildOM());
>
> options = new Options();
> options.setTo(axisEPR);
> operationClient = client.createClient(ServiceClient.ANON_OUT_IN_OP);
> operationClient.setOptions(options)
> operationClient.execute(true);
>
>
> The service file looks like this:
>
> <service name="DummyService" scope="application" targetNamespace="http://
> .../TimeService/">
> <parameter name="requestTimeout" locked="false">120000</parameter>
> </service>
>
>
> I have 2 questions:
> #1. is it the right way to configure an anonymous service at runtime?
> #2. the requestTimeout is not taken into account. After looking at at the
> source code, it seems that Options#setTimeOutInMilliSeconds() is the only
> way to set the timeout. But I hope you might point me to a more dynamic way
> of tweaking this value. Actually this value may vary from one service to
> another.
>
> Thanks in advance for your answers.
>
> Alexis
>