Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 39799 invoked from network); 5 Apr 2010 07:35:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 07:35:51 -0000 Received: (qmail 59713 invoked by uid 500); 5 Apr 2010 07:35:50 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 59483 invoked by uid 500); 5 Apr 2010 07:35:49 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 59474 invoked by uid 99); 5 Apr 2010 07:35:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 07:35:48 +0000 X-ASF-Spam-Status: No, hits=-1215.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 07:35:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3AB8E234C48C for ; Mon, 5 Apr 2010 07:35:27 +0000 (UTC) Message-ID: <980912085.684181270452927239.JavaMail.jira@brutus.apache.org> Date: Mon, 5 Apr 2010 07:35:27 +0000 (UTC) From: "Stephan van Hugten (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Commented: (AXIS2-4662) Improve Spring Integration for Axis2 In-Reply-To: <1525014555.485881269513267520.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853332#action_12853332 ] Stephan van Hugten commented on AXIS2-4662: ------------------------------------------- I'm sorry, this might only be clear to Andreas and me. My zip is a patch file based on Andreas' scratch project[1]. Andreas here chose to pass configurationContext as an attribute in the first setup, so I just followed him for my patch. I can see your point as well. I would like something like this: [1] http://svn.apache.org/repos/asf/axis/axis2/java/core/scratch/java/veithen/spring/axis2-spring-core/ > Improve Spring Integration for Axis2 > ------------------------------------ > > Key: AXIS2-4662 > URL: https://issues.apache.org/jira/browse/AXIS2-4662 > Project: Axis2 > Issue Type: Improvement > Components: kernel > Affects Versions: 1.5.1 > Reporter: Stephan van Hugten > Attachments: axis2-spring-core.zip, POC_Axis2.zip > > > I wanted to create an application that has tight integration between Axis2 webservices and Spring. There is already a solution presented at the Axis2 website, http://ws.apache.org/axis2/1_5_1/spring.html, but I found that solution very cumbersome in my opinion and doesn't support the JSR 181 annotations. > With my proposed approach it is possible to fully integrate the Axis2 run-time with a spring container, whether it is stand-alone or in a web server such as Tomcat. This solution also supports both the JSR 181 annotated classes and the regular AAR-files. > To fully integrate Axis2 with Spring I have overridden the SimpleAxis2Server class used by the standard stand-alone run-time. A full listing of this class is included in my example application. > The important stuff is in line 21 up to 36. First it determines the absolute path of the repository and config location parameters. Then it passes those to the AxisRunner constructor (lines 10 to 13) and starts the server. After it successfully starts the Axis2 server it returns the bean to the Spring Container. > After the creation of the bean it will invoke setDeployedWebservices (lines 46 to 51) which will cycle through the passed webservice classes and deploy them at the created run-time. That's it! No additional configuration or packaging is needed. If the Spring container starts up, so does the Axis2 run-time and the webservices get deployed. > The needed configuration in order to integrate Axis2 is quite simple. Below is a complete listing of my applicationContext.xml (Spring 2.5.6): > > > > > > > > > > com.example.poc.webservice.WeatherSpringService > > > > > > With a little bit more effort I think it's also possible to integrate this solution with the Spring component scan, making it possible to annotate the webservice classes and the run-time with @component. I have tested my war-project with Tomcat 6 and Sun Webserver 7. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org