RE: [Axis2] Setting hostname in axis2.xml ????` - WORKS NOW --- THANKS
Thanks Sagara, After adding the class parameter to the service tag, it is working. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 11:56 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, You have missed 3rd step that i mentioned, you should add class parameter to your service.xml file as follows. service name=ResponsysWSService class=com.rsys.ws.ResponsysWSServiceSkeleton Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, Attached is my skeleton class service.xml files. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 1:37 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
But if you see the services.xml it already has the class parameter defined as a parameter name ServiceClass (see below), instead of as an attribute in the service/ tag. Isn't that sufficient. service name=ResponsysWSService messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.rsys.ws.ResponsysWSServiceMessageReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.rsys.ws.ResponsysWSServiceSkeleton/parameter parameter name=useOriginalwsdltrue/parameter parameter name=modifyUserWSDLPortAddresstrue/parameter Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 11:56 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, You have missed 3rd step that i mentioned, you should add class parameter to your service.xml file as follows. service name=ResponsysWSService class=com.rsys.ws.ResponsysWSServiceSkeleton Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, Attached is my skeleton class service.xml files. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 1:37 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
Re: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Sagara, Attached is my skeleton class service.xml files. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 1:37 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ ?xml version=1.0 encoding=UTF-8? !-- This file was auto-generated from WSDL -- !-- by the Apache Axis2 version: 1.4 Built on : Apr 26, 2008 (06:24:30 EDT) -- serviceGroup service name=ResponsysWSService messageReceivers messageReceiver mep=http://www.w3.org/ns/wsdl/in-out; class=com.rsys.ws.ResponsysWSServiceMessageReceiverInOut/ /messageReceivers parameter name=ServiceClasscom.rsys.ws.ResponsysWSServiceSkeleton/parameter parameter name=useOriginalwsdltrue/parameter parameter name=modifyUserWSDLPortAddresstrue/parameter operation name=login mep=http://www.w3.org/ns/wsdl/in-out; namespace=urn:ws.rsys.com actionMapping\\/actionMapping outputActionMappingurn:ws.rsys.com:ResponsysWS:loginResponse/outputActionMapping faultActionMapping faultName=AccountFaulturn:ws.rsys.com:ResponsysWS:login:Fault:AccountFault/faultActionMapping faultActionMapping faultName=UnexpectedErrorFaulturn:ws.rsys.com:ResponsysWS:login:Fault:UnexpectedErrorFault/faultActionMapping /operation operation name=logout mep=http://www.w3.org/ns/wsdl/in-out; namespace=urn:ws.rsys.com actionMapping\\/actionMapping outputActionMappingurn:ws.rsys.com:ResponsysWS:logoutResponse/outputActionMapping faultActionMapping faultName=UnexpectedErrorFaulturn:ws.rsys.com:ResponsysWS:logout:Fault:UnexpectedErrorFault/faultActionMapping /operation operation name=createFolder mep=http://www.w3.org/ns/wsdl/in-out; namespace=urn:ws.rsys.com actionMapping\\/actionMapping outputActionMappingurn:ws.rsys.com:ResponsysWS:createFolderResponse/outputActionMapping faultActionMapping faultName=UnexpectedErrorFaulturn:ws.rsys.com:ResponsysWS:createFolder:Fault:UnexpectedErrorFault/faultActionMapping faultActionMapping faultName=FolderFaulturn:ws.rsys.com:ResponsysWS:createFolder:Fault:FolderFault/faultActionMapping /operation operation name=listFolders mep=http://www.w3.org/ns/wsdl/in-out; namespace=urn:ws.rsys.com actionMapping\\/actionMapping outputActionMappingurn:ws.rsys.com:ResponsysWS:listFoldersResponse/outputActionMapping faultActionMapping faultName=UnexpectedErrorFaulturn:ws.rsys.com:ResponsysWS:listFolders:Fault:UnexpectedErrorFault/faultActionMapping /operation operation name=deleteFolder mep=http://www.w3.org/ns/wsdl/in-out; namespace
Re: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Raghu, You have missed 3rd step that i mentioned, you should add class parameter to your service.xml file as follows. service name=ResponsysWSService class=com.rsys.ws.ResponsysWSServiceSkeleton Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, Attached is my skeleton class service.xml files. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 1:37 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
Re: [Axis2] Setting hostname in axis2.xml ????
Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ????
Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml Hi Raghu , You can use same hostname parameter programatically either in service level or module level . one possible approach is given below . 1. Implement the ServiceLifeCycle interface within your service class or as a separate class . 2. set the value to hostname parameter within the startUp ( ...) method. axisService.getAxisConfiguration().addParameter(hostname, myhost.com); 3. add your LifeCycle class to service.xml file. service name=SimpleService class=LifeCycleClassName Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi, I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so that the soap:address location in the WSDL (when user types ?wsdl) uses that hostname instead of showing a IP address. The problem I have is that my webservices war file is deployed on multiple servers and I can’t manually edit each axis2.xml file for each server. Is there any option to read the server name from some properties file set it to the hostname in axis2.xml programmatically? Thanks Raghu -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/