Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 82868 invoked from network); 7 Aug 2009 13:22:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 13:22:03 -0000 Received: (qmail 41324 invoked by uid 500); 7 Aug 2009 13:22:08 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 41254 invoked by uid 500); 7 Aug 2009 13:22:08 -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 41245 invoked by uid 99); 7 Aug 2009 13:22:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 13:22:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cchinu@gmail.com designates 209.85.212.193 as permitted sender) Received: from [209.85.212.193] (HELO mail-vw0-f193.google.com) (209.85.212.193) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 13:22:00 +0000 Received: by vws31 with SMTP id 31so1535964vws.28 for ; Fri, 07 Aug 2009 06:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ERSxaZcpyJuMzil8Cpd7vPIG0c3lxDAgej/GjxYka0A=; b=lxv8JKcup+vt7p7YhqeR/B02gDsHAHvP2CmoVaF6oEVb/3FNCSk9R6GQOz7vW8tKEw EZaJcXYSvbe2DtykeVYei1hm4QKDDILX7u2FyqNBnyjjTmYx/DMgHgm+0EJW0DCs8iUc oJjyeXK5mRJl24hTLocGFMLGzBXHPxbtjgZHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=k8dzAU4teZPsG6EwXvNtCj3h1/SR1juiyFPGwZiDb82f/0LiZodRiiUaEyZHV2J0+L 8i2mQF/oH2lRFMa1Jf/gjLvscOEo2QPv9N/wOeHSUMtrCYHZ7P2dVyoU42p1yaMB6/Zq BgqI9le1aJV4QsgoVj30/Lx/OkbOC8CwFnKwE= MIME-Version: 1.0 Received: by 10.220.91.194 with SMTP id o2mr751696vcm.4.1249651299007; Fri, 07 Aug 2009 06:21:39 -0700 (PDT) In-Reply-To: <11e852b50908070606k76b7f741ra031692479c9fd9f@mail.gmail.com> References: <11e852b50908070606k76b7f741ra031692479c9fd9f@mail.gmail.com> Date: Fri, 7 Aug 2009 18:51:38 +0530 Message-ID: Subject: Re: Writing a service with multiple operations From: Chinmoy Chakraborty To: axis-user@ws.apache.org Content-Type: multipart/alternative; boundary=0016e6471916c53ce004708d1ddb X-Virus-Checked: Checked by ClamAV on apache.org --0016e6471916c53ce004708d1ddb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit You can have multiple operations for a single service name. You just need to set the action (operation name) of a service you want to invoke. Options options = new Options(); RPCServiceClient client = new RPCServiceClient(); options.setTo(targetEPR); options.setAction(OPERATION_NAME); options.setTimeOutInMilliSeconds(600000); client.setOptions(options); ................ and your service name should be .../service/service_name. HTH, Chinmoy On Fri, Aug 7, 2009 at 6:36 PM, Chris Mannion wrote: > Hi all > > I've been re-building my old Axis based web-services as Axis2 services > but am a little puzzled about one issue. Two of the services I have > make multiple operations available so I'm just wondering how I got > about building that with Axis2. All the other services that I've > managed to deploy so far all have only one operation so I've managed > to build Java classes with one method which takes an OMElement as > input without really understanding how Axis2 knows that that's the > correct method to call when the web-service is invoked. Now that > there will be multiple methods to match multiple operations on the > web-service, I really need to properly understand how Axis determines > which class method relates to which WS operation. Is it as simple as > making sure the methods have the same name as the operations or is > there something more complicated I'll need to do? > > -- > Chris Mannion > iCasework and LocalAlert implementation team > 0208 144 4416 > --0016e6471916c53ce004708d1ddb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
You can have multiple operations for a single service name. You just n= eed to set the action (operation name) of a service you want to invoke.
=A0
=A0=A0=A0=A0=A0=A0=A0=A0=A0 Options options =3D new Options();
=A0= =A0=A0=A0=A0=A0=A0=A0=A0 RPCServiceClient client =3D new RPCServiceClient()= ;
=A0=A0=A0=A0=A0=A0=A0=A0=A0 options.setTo(targetEPR);
=A0=A0=A0=A0= =A0=A0=A0=A0=A0 options.setAction(OPERATION_NAME);
=A0=A0=A0=A0=A0=A0=A0= =A0=A0 options.setTimeOutInMilliSeconds(600000);
=A0=A0=A0=A0=A0=A0=A0=A0=A0 client.setOptions(options);
................
and your service name should be .../service/service_name.
=A0
HTH,
Chinmoy

=A0
On Fri, Aug 7, 2009 at 6:36 PM, Chris Mannion <chris.m= annion@nonstopgov.com> wrote:
Hi all

I've been re-b= uilding my old Axis based web-services as Axis2 services
but am a little= puzzled about one issue. =A0Two of the services I have
make multiple operations available so I'm just wondering how I got
a= bout building that with Axis2. =A0All the other services that I've
m= anaged to deploy so far all have only one operation so I've managed
to build Java classes with one method which takes an OMElement as
input = without really understanding how Axis2 knows that that's the
correct= method to call when the web-service is invoked. =A0Now that
there will = be multiple methods to match multiple operations on the
web-service, I really need to properly understand how Axis determines
wh= ich class method relates to which WS operation. =A0Is it as simple as
ma= king sure the methods have the same name as the operations or is
there s= omething more complicated I'll need to do?

--
Chris Mannion
iCasework and LocalAlert= implementation team
0208 144 4416

--0016e6471916c53ce004708d1ddb--