RE: Client handler tutorial
Below is a summary of configuring Axis2 for a client-side handler. I haven't actually tried it yet, so please let me know if something is wrong. Summary of configuring an axis2 v1.4 SOAP client for a custom client-side handler. This handler can, for example, add username, password and session id to the SOAP header: 1) Build a jar file with a .mar extension on the classpath/repository that contains: module.xml -contains a) module name, b) name of class that implements Module and c) name of class that extends AbstractHandler. Class that implements org.apache.axis2.modules.Module. class that extends AbstractHandler (the real work of your handler goes here). 2) axis2.xml -edit to include your new phase, also add a reference to your module: http://ws.apache.org/axis2/1_2/modules.html. Note that this link address server-side handlers. 3) services.xml -reference the module that contains the handler chain. Not needed for a client-side handler? 4) Choose a method for passing the configuration to the axis2 engine, either programatically via ConfigurationContext, or passing -D JVM parameters (-Daxis2.repo=C:\Axis2\repository, -Daxis2.xml=C:\Axis2\conf\axis2.xml). See http://wso2.org/library/585 for programatic configuration. From: Wally Dennis [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 11:08 AM To: axis-user@ws.apache.org Subject: Re: Client handler tutorial One way to specify the conf and repo for stand-alone clients is to use -D JVM parameters as shown here: -Daxis2.repo=C:\Axis2\repository -Daxis2.xml=C:\Axis2\conf\axis2.xml Wally "Detelin Yordanov" <[EMAIL PROTECTED]> 08/13/2008 10:26 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: Client handler tutorial Hi, When using Axis2 client (e.g. ServiceClient) you do not need any servlet container, it just uses Apache HttpClient to send and receive the request (if using HTTP). Underneath the ServiceClient will setup normal Axis2 runtime (as the one on server side) to process messages. The ServiceClient has constructors to specify an Axis2 ConfigurationContext which points to the "client-side" Axis2 configuration file, if no ConfigurationContext is given it will use (I think) a default axis2.xml from the Axis2 kernel jar. So if you need to define any handlers or whatsoever, you can create your axis2-conf for the client side, add your handlers, then create a ConfigurationContext and finally a ServiceClient. Regards, Detelin On Wed, Aug 13, 2008 at 4:19 PM, Franklin, Allen <[EMAIL PROTECTED]> wrote: Where I work we start with a hand-built wsdl and then run WSDL2Java to generate the client and server stubs and skeleton code. When I say 'client side handler' I am talking about a class that that implements AbstractHandler that (I think) I need to write to add a username, password and session id to the SOAP header. I'm still having trouble understanding if I need to deploy a servlet container (eg Tomcat) just to run an axis2 client? From: Martin Gainty [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Wednesday, August 13, 2008 9:00 AM To: axis-user@ws.apache.org <mailto:axis-user@ws.apache.org> Subject: RE: Client handler tutorial typical scenario is with the typical HTTP transport scenario you would build the server classes and deploy using the admin tool then use compiled WSDL2Java generated client stub to test I guess I would need to know which 'client side handler' you are referring to for specifics.. JMS/SMTP/Other ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: RE: Client handler tutorial Date: Wed, 13 Aug 2008 08:53:17 -0400 From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> To: axis-user@ws.apache.org <mailto:axis-user@ws.apache.org> Do I need to deploy my axis2 client into a servlet container to be able to use client-side handlers? Currently my client does not need a servlet container, it runs stand-alone. From: Martin Gainty [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Tuesday, August 12, 2008 6:46 PM To: axis-user@ws.apache.org <mailto:axis-user@ws.apache.org> Subject: RE: Client handler tutorial yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ <http://localhost:8080/axis2/axis2-admin/> HTH Martin __ Disclaimer and confidential
Re: Client handler tutorial
One way to specify the conf and repo for stand-alone clients is to use -D JVM parameters as shown here: -Daxis2.repo=C:\Axis2\repository -Daxis2.xml=C:\Axis2\conf\axis2.xml Wally "Detelin Yordanov" <[EMAIL PROTECTED]> 08/13/2008 10:26 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: Client handler tutorial Hi, When using Axis2 client (e.g. ServiceClient) you do not need any servlet container, it just uses Apache HttpClient to send and receive the request (if using HTTP). Underneath the ServiceClient will setup normal Axis2 runtime (as the one on server side) to process messages. The ServiceClient has constructors to specify an Axis2 ConfigurationContext which points to the "client-side" Axis2 configuration file, if no ConfigurationContext is given it will use (I think) a default axis2.xml from the Axis2 kernel jar. So if you need to define any handlers or whatsoever, you can create your axis2-conf for the client side, add your handlers, then create a ConfigurationContext and finally a ServiceClient. Regards, Detelin On Wed, Aug 13, 2008 at 4:19 PM, Franklin, Allen < [EMAIL PROTECTED]> wrote: Where I work we start with a hand-built wsdl and then run WSDL2Java to generate the client and server stubs and skeleton code. When I say 'client side handler' I am talking about a class that that implements AbstractHandler that (I think) I need to write to add a username, password and session id to the SOAP header. I'm still having trouble understanding if I need to deploy a servlet container (eg Tomcat) just to run an axis2 client? From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 9:00 AM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial typical scenario is with the typical HTTP transport scenario you would build the server classes and deploy using the admin tool then use compiled WSDL2Java generated client stub to test I guess I would need to know which 'client side handler' you are referring to for specifics.. JMS/SMTP/Other ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: RE: Client handler tutorial Date: Wed, 13 Aug 2008 08:53:17 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Do I need to deploy my axis2 client into a servlet container to be able to use client-side handlers? Currently my client does not need a servlet container, it runs stand-alone. From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 6:46 PM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: Re: Client handler tutorial Date: Tue, 12 Aug 2008 18:34:04 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks Reveal your inner athlete and share it with friends on Windows Live. Share now! Your PC, mobile phone, and online services work together like never before. See how Windows® fits your life The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemi
Re: Client handler tutorial
Hi, When using Axis2 client (e.g. ServiceClient) you do not need any servlet container, it just uses Apache HttpClient to send and receive the request (if using HTTP). Underneath the ServiceClient will setup normal Axis2 runtime (as the one on server side) to process messages. The ServiceClient has constructors to specify an Axis2 ConfigurationContext which points to the "client-side" Axis2 configuration file, if no ConfigurationContext is given it will use (I think) a default axis2.xml from the Axis2 kernel jar. So if you need to define any handlers or whatsoever, you can create your axis2-conf for the client side, add your handlers, then create a ConfigurationContext and finally a ServiceClient. Regards, Detelin On Wed, Aug 13, 2008 at 4:19 PM, Franklin, Allen <[EMAIL PROTECTED] > wrote: > Where I work we start with a hand-built wsdl and then run WSDL2Java to > generate the client and server stubs and skeleton code. > > When I say 'client side handler' I am talking about a class that that > implements AbstractHandler that (I think) I need to write > > to add a username, password and session id to the SOAP header. > > > > I'm still having trouble understanding if I need to deploy a servlet > container (eg Tomcat) just to run an axis2 client? > > > > *From:* Martin Gainty [mailto:[EMAIL PROTECTED] > *Sent:* Wednesday, August 13, 2008 9:00 AM > > *To:* axis-user@ws.apache.org > *Subject:* RE: Client handler tutorial > > > > typical scenario is > with the typical HTTP transport scenario you would build the server classes > and deploy using the admin tool > then use compiled WSDL2Java generated client stub to test > > I guess I would need to know which 'client side handler' you are referring > to for specifics.. > JMS/SMTP/Other > ? > Martin > __ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to the official > business of Sender. This transmission is of a confidential nature and Sender > does not endorse distribution to any party other than intended recipient. > Sender does not necessarily endorse content contained within this > transmission. > > -- > > Subject: RE: Client handler tutorial > Date: Wed, 13 Aug 2008 08:53:17 -0400 > From: [EMAIL PROTECTED] > To: axis-user@ws.apache.org > > Do I need to deploy my axis2 client into a servlet container to be able to > use client-side handlers? > > Currently my client does not need a servlet container, it runs stand-alone. > > > > *From:* Martin Gainty [mailto:[EMAIL PROTECTED] > *Sent:* Tuesday, August 12, 2008 6:46 PM > *To:* axis-user@ws.apache.org > *Subject:* RE: Client handler tutorial > > > > yuo can deploy the client mar from the admin utility try > http://localhost:8080/axis2/axis2-admin/ > > HTH > Martin > __ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to the official > business of Sender. This transmission is of a confidential nature and Sender > does not endorse distribution to any party other than intended recipient. > Sender does not necessarily endorse content contained within this > transmission. > -- > > Subject: Re: Client handler tutorial > Date: Tue, 12 Aug 2008 18:34:04 -0400 > From: [EMAIL PROTECTED] > To: axis-user@ws.apache.org > > I am having trouble figuring out how to add client-side handlers in axis2. > > I see the email reply, below, that there is no difference between client > and server side. > > But the configuration must be different since on the client side there is > no web container to put the axis2.xml configuration information for the > handler and also no place to put the .mar file. > > Client-side handler configuration remains a mystery to me. > > *Re: Client handler tutorial* > > Deepal Jayasinghe > Wed, 16 Apr 2008 22:57:25 -0700 > > Hi Chau, > > Are you referring to Axis2 ? > > if so there is no difference between client side and server side. > > > > Thank you! > > Deepal > > Anybody knows the link to client handler tutorial? Thanks > > > > > > > > > -- > > Reveal your inner athlete and share it with friends on Windows Live. Share > now!<http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us> > > > -- > > Your PC, mobile phone, and online services work together like never before. > See how Windows(R) fits your > life<http://clk.atdmt.com/MRT/go/108587394/direct/01/> >
RE: Client handler tutorial
Where I work we start with a hand-built wsdl and then run WSDL2Java to generate the client and server stubs and skeleton code. When I say 'client side handler' I am talking about a class that that implements AbstractHandler that (I think) I need to write to add a username, password and session id to the SOAP header. I'm still having trouble understanding if I need to deploy a servlet container (eg Tomcat) just to run an axis2 client? From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 9:00 AM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial typical scenario is with the typical HTTP transport scenario you would build the server classes and deploy using the admin tool then use compiled WSDL2Java generated client stub to test I guess I would need to know which 'client side handler' you are referring to for specifics.. JMS/SMTP/Other ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. ____________ Subject: RE: Client handler tutorial Date: Wed, 13 Aug 2008 08:53:17 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Do I need to deploy my axis2 client into a servlet container to be able to use client-side handlers? Currently my client does not need a servlet container, it runs stand-alone. From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 6:46 PM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. ____________ Subject: Re: Client handler tutorial Date: Tue, 12 Aug 2008 18:34:04 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks Reveal your inner athlete and share it with friends on Windows Live. Share now! <http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAG LM_WLYIA_whichathlete_us> Your PC, mobile phone, and online services work together like never before. See how Windows(r) fits your life <http://clk.atdmt.com/MRT/go/108587394/direct/01/>
RE: Client handler tutorial
typical scenario is with the typical HTTP transport scenario you would build the server classes and deploy using the admin tool then use compiled WSDL2Java generated client stub to test I guess I would need to know which 'client side handler' you are referring to for specifics.. JMS/SMTP/Other ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: RE: Client handler tutorial Date: Wed, 13 Aug 2008 08:53:17 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Do I need to deploy my axis2 client into a servlet container to be able to use client-side handlers? Currently my client does not need a servlet container, it runs stand-alone. From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 6:46 PM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: Re: Client handler tutorial Date: Tue, 12 Aug 2008 18:34:04 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks Reveal your inner athlete and share it with friends on Windows Live. Share now! _ Your PC, mobile phone, and online services work together like never before. http://clk.atdmt.com/MRT/go/108587394/direct/01/
RE: Client handler tutorial
Do I need to deploy my axis2 client into a servlet container to be able to use client-side handlers? Currently my client does not need a servlet container, it runs stand-alone. From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 6:46 PM To: axis-user@ws.apache.org Subject: RE: Client handler tutorial yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: Re: Client handler tutorial Date: Tue, 12 Aug 2008 18:34:04 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks Reveal your inner athlete and share it with friends on Windows Live. Share now! <http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAG LM_WLYIA_whichathlete_us>
RE: Client handler tutorial
yuo can deploy the client mar from the admin utility try http://localhost:8080/axis2/axis2-admin/ HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Subject: Re: Client handler tutorial Date: Tue, 12 Aug 2008 18:34:04 -0400 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks _ Reveal your inner athlete and share it with friends on Windows Live. http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us
Re: Client handler tutorial
I am having trouble figuring out how to add client-side handlers in axis2. I see the email reply, below, that there is no difference between client and server side. But the configuration must be different since on the client side there is no web container to put the axis2.xml configuration information for the handler and also no place to put the .mar file. Client-side handler configuration remains a mystery to me. Re: Client handler tutorial Deepal Jayasinghe Wed, 16 Apr 2008 22:57:25 -0700 Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks
Re: Client handler tutorial
Hi Chau, Are you referring to Axis2 ? if so there is no difference between client side and server side. Thank you! Deepal Anybody knows the link to client handler tutorial? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]