axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: [Axis2][0.95] error when creating two times ServiceClient without a service
Date Mon, 24 Apr 2006 18:59:24 GMT
Andreas,

Could u please log a bug report?

thanks,
dims

On 4/24/06, Andreas Bobek <andreas.bobek@uni-rostock.de> wrote:
> Hi,
>
> I found out that when creating a ServiceClient with the same configuration
> context and a null service causes an exception at the second time:
>
> ..
> ServiceClient client1 = new ServiceClient(confCtxt, null); // ok
> ..
> ServiceClient client2 = new ServiceClient(confCtxt, null); // throws
> Exception
>
>
> Maybe this is intended by you?
>
> Up to now I see two possibilities to avoid this exception:
> 1.) Reusing the client.
> 2.) Check whether an anonymous service was already created and let the
> ServiceClient create one (if missed):
> ServiceClient client = null;
> AxisService anonymousService =
> confCtxt.getAxisConfiguration().getService(ServiceClient.ANON_SERVICE);
> if(anonymousService == null){
>         client = new ServiceClient(confCtxt, null);
> }
> else{
>         client = new ServiceClient(confCtxt, anonymousService);
> }
>
> I suppose it to be a bug?
>
> Regards, Andreas Bobek.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Mime
View raw message