Re: AXIS2: Dynamic creation and deploy of service
Moving further with this, I have created a service named AddService (as a POJO) that is responsible for deploying new services. I am running Axis2 as a web app in JBoss. Following some of the suggestions on deploying services dynamically, I have the following code in an operation of the AddService that I am trying to run: = public void deployNewService(String serviceName, String serviceClass) throws Exception { ConfigurationContext myConfigContext = MessageContext.getCurrentMessageContext().getConfigurationContext(); AxisService service = AxisService.createService(serviceClass, myConfigContext.getAxisConfiguration(), org.apache.axis2.receivers.RawXMLINOutMessageReceiver.class); myConfigContext.getAxisConfiguration().addService(service); For now, the serviceClass is present in the AddService.aar. But when this operation is invoked from a soap client, I am getting the following error. --- Caused by: java.lang.ClassNotFoundException: mytest.CreateRequestSkeleton.class at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.ws.java2wsdl.SchemaGenerator.init(SchemaGenerator.java:92) at org.apache.axis2.description.AxisService.createService(AxisService.java:1474) -- Note that the mytest.CreateRequestSkeleton class is present in the AddService.aar. I also tried adding the class in a jar and place it in axis2.war/WEB--INF/lib directory. What am I missing here? Should'nt the class be loaded from either the aar or from the WEB-INF/lib? Thanks, Shantanu Sen - Original Message From: Shantanu Sen [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, February 20, 2007 12:51:29 PM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Angel, That is exactly what I am looking for. I think there is no other way for generating the service - we have to run wsdl2java with the -adb option and gather the generated artifacts, although I was looking for avoiding the generation of an aar file and hoping that I could do the service creation programmatically and supply a 'skeleton' that will implement the relevant service operations as defined in the WSDL. But I do not see any way I can do that. The next phase is deployment - please post the code (or if that is not possible the basic steps that are required) for programmatic (hot) deployment. Thanks for your help. Shantanu - Original Message From: Angel Todorov [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Saturday, February 17, 2007 1:32:38 AM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu, I have coded exactly what you want, including patches to the deployment engine of Axis2. There is a remote deployment API which you can call from anywhere via HTTP or a web service. The repository listener is synchronized so that a File system scheduler and a remote deployment call don't intervene. You also get feedback regarding the status of the deployed service (faulty or not, and if faulty - why). If you could wait until tomorrow i can send these to the ML. Thanks. Best, Angel On 2/16/07, Shantanu Sen [EMAIL PROTECTED] wrote: Yes, if you could send some pointers it would be of great help. Firstly - to generate the service I can run the wsdl2java and generate the necessary artifacts. Is there any other way? All we are interested is that the service will have multiple operations that take in XML documents, so if we have just an OMElement as the input and output for each of these operations, it will work fine for us. Secondly, once I have a service, how do I programmatically register the service (axis2 is running as a web app on an appserver). Once we register the service programmatically (i.e. hot deployment) can we also persist the deployment? Any help would be greatly appreciated. Thanks, Shantanu - Original Message From: Deepal Jayasinghe [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, February 15, 2007 8:57:37 PM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu ; There is no sample as such in the axis2 codebase for this particular case, but if you want we will be able to help you. Thanks Deepal Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen
Re: AXIS2: Dynamic creation and deploy of service
Hi Angel, That is exactly what I am looking for. I think there is no other way for generating the service - we have to run wsdl2java with the -adb option and gather the generated artifacts, although I was looking for avoiding the generation of an aar file and hoping that I could do the service creation programmatically and supply a 'skeleton' that will implement the relevant service operations as defined in the WSDL. But I do not see any way I can do that. The next phase is deployment - please post the code (or if that is not possible the basic steps that are required) for programmatic (hot) deployment. Thanks for your help. Shantanu - Original Message From: Angel Todorov [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Saturday, February 17, 2007 1:32:38 AM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu, I have coded exactly what you want, including patches to the deployment engine of Axis2. There is a remote deployment API which you can call from anywhere via HTTP or a web service. The repository listener is synchronized so that a File system scheduler and a remote deployment call don't intervene. You also get feedback regarding the status of the deployed service (faulty or not, and if faulty - why). If you could wait until tomorrow i can send these to the ML. Thanks. Best, Angel On 2/16/07, Shantanu Sen [EMAIL PROTECTED] wrote: Yes, if you could send some pointers it would be of great help. Firstly - to generate the service I can run the wsdl2java and generate the necessary artifacts. Is there any other way? All we are interested is that the service will have multiple operations that take in XML documents, so if we have just an OMElement as the input and output for each of these operations, it will work fine for us. Secondly, once I have a service, how do I programmatically register the service (axis2 is running as a web app on an appserver). Once we register the service programmatically (i.e. hot deployment) can we also persist the deployment? Any help would be greatly appreciated. Thanks, Shantanu - Original Message From: Deepal Jayasinghe [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, February 15, 2007 8:57:37 PM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu ; There is no sample as such in the axis2 codebase for this particular case, but if you want we will be able to help you. Thanks Deepal Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen - 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] - 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: Dynamic creation and deploy of service
Hi Shantanu, I have coded exactly what you want, including patches to the deployment engine of Axis2. There is a remote deployment API which you can call from anywhere via HTTP or a web service. The repository listener is synchronized so that a File system scheduler and a remote deployment call don't intervene. You also get feedback regarding the status of the deployed service (faulty or not, and if faulty - why). If you could wait until tomorrow i can send these to the ML. Thanks. Best, Angel On 2/16/07, Shantanu Sen [EMAIL PROTECTED] wrote: Yes, if you could send some pointers it would be of great help. Firstly - to generate the service I can run the wsdl2java and generate the necessary artifacts. Is there any other way? All we are interested is that the service will have multiple operations that take in XML documents, so if we have just an OMElement as the input and output for each of these operations, it will work fine for us. Secondly, once I have a service, how do I programmatically register the service (axis2 is running as a web app on an appserver). Once we register the service programmatically (i.e. hot deployment) can we also persist the deployment? Any help would be greatly appreciated. Thanks, Shantanu - Original Message From: Deepal Jayasinghe [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, February 15, 2007 8:57:37 PM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu ; There is no sample as such in the axis2 codebase for this particular case, but if you want we will be able to help you. Thanks Deepal Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2: Dynamic creation and deploy of service
Yes, if you could send some pointers it would be of great help. Firstly - to generate the service I can run the wsdl2java and generate the necessary artifacts. Is there any other way? All we are interested is that the service will have multiple operations that take in XML documents, so if we have just an OMElement as the input and output for each of these operations, it will work fine for us. Secondly, once I have a service, how do I programmatically register the service (axis2 is running as a web app on an appserver). Once we register the service programmatically (i.e. hot deployment) can we also persist the deployment? Any help would be greatly appreciated. Thanks, Shantanu - Original Message From: Deepal Jayasinghe [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, February 15, 2007 8:57:37 PM Subject: Re: AXIS2: Dynamic creation and deploy of service Hi Shantanu ; There is no sample as such in the axis2 codebase for this particular case, but if you want we will be able to help you. Thanks Deepal Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen - 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]
AXIS2: Dynamic creation and deploy of service
Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2: Dynamic creation and deploy of service
Hi Shantanu ; There is no sample as such in the axis2 codebase for this particular case, but if you want we will be able to help you. Thanks Deepal Is there any sample that shows how to programmatically create a service (from a WSDL) and deploy it on an instance of Axis2 running on a appserver such as JBoss? Thanks, Shantanu Sen - 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]