RE: Axis2 Client config location
Thanks for this, much appreciated From: Sameera Jayasoma [mailto:[EMAIL PROTECTED] Sent: 03 July 2008 20:22 To: axis-user@ws.apache.org Subject: Re: Axis2 Client config location Hi Brian, I just have look at Axis2 source code. I noticed that Axis2 uses the system properties "axis2.repo" and "axis2.xml" to get the locations of the repository and the axis2.xml, if you haven't specified them in your client side code. So you can use -Daxis2.repo or -Daxis2.xml system properties. 1. If you are using serviceClient, use the constructor which requires no parameters ServiceClient sc = new ServiceClient(); 2. If you are using generated client stub (There may be a better solution) ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(nul l, null); ServiceStub stub = new ServiceStub(ctx); Thanks Sameera Jayasoma Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://sameera-jayasoma.blogspot.com/ __ FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com __
Re: Axis2 Client config location
Hi Brian, I just have look at Axis2 source code. I noticed that Axis2 uses the system properties "axis2.repo" and "axis2.xml" to get the locations of the repository and the axis2.xml, if you haven't specified them in your client side code. So you can use -Daxis2.repo or -Daxis2.xml system properties. 1. If you are using serviceClient, use the constructor which requires no parameters * ServiceClient sc = new ServiceClient(); * 2. If you are using generated client stub (There may be a better solution) * ConfigurationContext ctx = ConfigurationContextFactory** .createConfigurationContextFrom**FileSystem(null, null); ServiceStub stub = new ServiceStub(ctx);* Thanks Sameera Jayasoma Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://sameera-jayasoma.blogspot.com/
RE: Axis2 Client config location
Hi, Thanks, I had seen this but I was hoping that there was a configuration way of doing this rather than needing to hardcode the repository location. Is there any system parameter way equivalent to the axis1 approach ? Thanks, Brian -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: 03 July 2008 11:05 To: axis-user@ws.apache.org Subject: Re: Axis2 Client config location Hi Brian, You can use ConfigurationContext to pick up config files (e.g:- axis2.xml) as follows 1.Create configurationContext from file system as follows. ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem("\h ome\user\axis2\repository","\home\user\axis2\conf\\axis2.xml"); 2. Pass it to stub constructor (If you are using generated client stub) ServiceStub stub = new ServiceStub(cc); If you are using serviceClient; ServiceClient sc = new ServiceClient(cc); HTH Charitha Brian Dillon wrote: >Hi, > >Is there way to indicate where a standalone axis2 client should pick up >it's configuration files (e.g. in axis1 this could be done using >-Daxis.ClientConfigFile). > >Thanks, > >Brian > >__ >FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. >The information contained in this e-mail is confidential, may be >privileged and is intended only for the user of the recipient named >above. If you are not the intended recipient or a representative of the >intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. > >If you have received this e-mail in error, please notify the sender >immediately by return e-mail and permanently delete the copy you >received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. >Registered in Ireland, No. 205721. http://www.FINEOS.com >__ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Client config location
Hi Brian, You can use ConfigurationContext to pick up config files (e.g:- axis2.xml) as follows 1.Create configurationContext from file system as follows. ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem("\home\user\axis2\repository","\home\user\axis2\conf\\axis2.xml"); 2. Pass it to stub constructor (If you are using generated client stub) ServiceStub stub = new ServiceStub(cc); If you are using serviceClient; ServiceClient sc = new ServiceClient(cc); HTH Charitha Brian Dillon wrote: Hi, Is there way to indicate where a standalone axis2 client should pick up it's configuration files (e.g. in axis1 this could be done using -Daxis.ClientConfigFile). Thanks, Brian __ FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]