Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 44971 invoked from network); 24 Apr 2006 18:59:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Apr 2006 18:59:56 -0000 Received: (qmail 61185 invoked by uid 500); 24 Apr 2006 18:59:47 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 61168 invoked by uid 500); 24 Apr 2006 18:59:47 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 61157 invoked by uid 99); 24 Apr 2006 18:59:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 11:59:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of davanum@gmail.com designates 64.233.162.197 as permitted sender) Received: from [64.233.162.197] (HELO nz-out-0102.google.com) (64.233.162.197) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 11:59:45 -0700 Received: by nz-out-0102.google.com with SMTP id 4so845586nzn for ; Mon, 24 Apr 2006 11:59:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OTkO7DdSaKfbxvhEi7+6Dm8W2sKhqZT2+SwFXQKfsLM5TQrr+CT17E9pmrSZkTR4cYZ3LfKKpyIWjSTRf9qQmfhUx9/UgYScFRylB4VLNJ8E3N1JaSMqLeXfQsqLl4EOVoe2a8ry6QfZUlX90A5UIJPKy0Zv3iW06pyBnxgpzMk= Received: by 10.37.12.2 with SMTP id p2mr1669618nzi; Mon, 24 Apr 2006 11:59:24 -0700 (PDT) Received: by 10.36.68.1 with HTTP; Mon, 24 Apr 2006 11:59:24 -0700 (PDT) Message-ID: <19e0530f0604241159w760a01f4md3e20b0c1d51a602@mail.gmail.com> Date: Mon, 24 Apr 2006 14:59:24 -0400 From: "Davanum Srinivas" Reply-To: dims@apache.org To: axis-user@ws.apache.org Subject: Re: [Axis2][0.95] error when creating two times ServiceClient without a service In-Reply-To: <0IY800H85OCIIK@mail.uni-rostock.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <0IY800H85OCIIK@mail.uni-rostock.de> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andreas, Could u please log a bug report? thanks, dims On 4/24/06, Andreas Bobek wrote: > Hi, > > I found out that when creating a ServiceClient with the same configuratio= n > context and a null service causes an exception at the second time: > > .. > ServiceClient client1 =3D new ServiceClient(confCtxt, null); // ok > .. > ServiceClient client2 =3D 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 =3D null; > AxisService anonymousService =3D > confCtxt.getAxisConfiguration().getService(ServiceClient.ANON_SERVICE); > if(anonymousService =3D=3D null){ > client =3D new ServiceClient(confCtxt, null); > } > else{ > client =3D new ServiceClient(confCtxt, anonymousService); > } > > I suppose it to be a bug? > > Regards, Andreas Bobek. > > -- Davanum Srinivas : http://wso2.com/blogs/