Re: Axis 2 deployment as part of existing web application
Hmm... Axis2 1.0 jars are pretty old(Close to 2 years now I think) and many bug fixes have gone into Axis2 since then. The latest stable release of Axis2 is 1.3. You can get the minimal set of jar files needed by following the instructions given here (http://wso2.org/blog/afkham-azeez/3081#comments ) Azeez On Feb 4, 2008 3:41 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I need a webservices that access may webapplication library so i embed the service in my webapplication like a post found in this mailinglist. 1) copy the web.xml that was in the book example 2) copy the WEB-INF/conf/axis2.xml file from the axis2.war file 3) put my services.xml and wsdl file in WEB-INF/services/MyService/META-INF 4) added a WEB-INF/module directory and added the appropriate changes to axis2.xml (I use the logging module so I can see the Soap calls) 5) added all of the jars from the axis2-min-1.0-bin.zip distribution Are there any limitation of that solution?? Is there any other way to access a existing web application information by service developed with axis2? thanks *Tiscali.Fax http://vas.tiscali.it/fax///*: ricevi gratis sulla tua email e invii a 12 cent per pagina senza scatto alla risposta -- Thanks Afkham Azeez http://azeez78.blogspot.com http://www.wso2.org GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
RE: Axis 2 deployment as part of existing web application
Jason, Thanks for your solution. Sounded like fun! I did my own form of experimentation and got it going. Basically I just did this: 1) copy the web.xml that was in the book example 2) copy the WEB-INF/conf/axis2.xml file from the axis2.war file 3) put my services.xml and wsdl file in WEB-INF/services/MyService/META-INF 4) added a WEB-INF/module directory and added the appropriate changes to axis2.xml (I use the logging module so I can see the Soap calls) 5) added all of the jars from the axis2-min-1.0-bin.zip distribution That seemed to do it. Really I just needed to make sure I had all the right jars. I still think theres some I can remove. Plus I used xmlbeans to create my service using WSDL2JAVA and have even more jars to add, which may cause me to switch that later to something less dependent. But alls well now! Whats documentation? ;) Brian Russell www.closerware.com -Original Message- From: Jason N [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 4:25 PM To: axis-user@ws.apache.org Subject: Re: Axis 2 deployment as part of existing web application Brian, I ran into the same problems as I tried to do both an embedded axis2 deploy and get Axis2-Spring up and running. Undoubtedly this is the wrong way to do it, and I'm sure there's a better way. However I couldn't find it. Chime in if you know a better way! Here's what I did: Starting with the axis2 war file I combined the lines from the axis2.war web.xml file with my project's web.xml file where they were relevant. I copied the conf directory from axis2.war over to web-inf\ of my project copied the modules directory from axis2.war over to web-inf\ of my project I created a services directory set up similar to the one that ws02 example gives however I just put services.xml, and the wsdl file in /web-inf/services/findService/META-INF I use a limited version of Maven and I did it this way so I could have a web service module that could be popped into the lib directory of the web app if I ever decided to move the web service code base out of the project. So basically all of the generated class files are in the web-inf/lib directory. I copied most of the axis2 lib files into the web-inf/lib directory. I can't really list them all right here, but off the top of my head: Please keep in mind this is coming straight from my lib directory so there may be things in here that you won't need. (xmlbeans, etc...) Annogen, axiom all, asm, axis2-*, backport, commons-config, commonds-dbcp, commons-digester, commons-httpclient, commons-logging, commons-pool, jaxen, jibx, neethi, stax-api, wstx-asl, xbean, xmlschema Anyway once all of that is in place and everything deploys ok, you should be able to acccess the web service by ip/webservicename/services/servicename Again this is just how I was able to get it up and running. I don't think it's a great solution, but I had to move on to writing documentation wooho! Good luck! j On 6/26/06, Brian Russell [EMAIL PROTECTED] wrote: I tried using the example referenced below [1] (http://www.wso2.net/kb/90)but was unable to get the mvn install to work. I'm not familiar with maven and therefore troubleshooting will be pretty tough. I followed the instructions of downloading the book.zip and then running the mvn install war:war command, but it fails while trying to execute the command. I'm simply trying to use it to figure out how to include axis2 as part of a current webapp so that I can run a web service from it. This is much more attractive (and necessary) than to have an axis2 app running to do hot deploys, etc. Really I just want to know what jars I need from axis2 and how it needs to be configured. That is why I was hoping to get this book example working. Here is my stack trace when running $ mvn install war:war : C:\projects\jakarta\axis\axis2-1_0\samples\bookmvn -e install war:war + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'war'. [INFO] [INFO] Building Book Example [INFO]task-segment: [install, war:war] [INFO] Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-model/2.0/maven-mod el-2.0.pom 2K downloaded Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven/2.0/maven-2.0.pom 8K downloaded Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/ple xus-utils-1.0.4.pom 6K downloaded Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0/maven-p roject-2.0.pom 1K downloaded Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-defau lt/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom 7K downloaded Downloading: http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classw orlds-1.1-alpha-2.pom 3K
RE: Axis 2 deployment as part of existing web application
ltArtifactResolver.java:140) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defau ltArtifactResolver.java:63) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromReposit ory(DefaultMavenProjectBuilder.java:467) ... 27 more Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData (LightweightHttpWagon.java:99) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.artifact.manager.DefaultWagonManager.verifyChecksum(Def aultWagonManager.java:520) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Defa ultWagonManager.java:380) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defaul tWagonManager.java:282) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defaul tWagonManager.java:244) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defau ltArtifactResolver.java:124) ... 29 more Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin -api/2.0/maven-plugin-api-2.0.pom.sha1 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:1149) at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData (LightweightHttpWagon.java:85) ... 35 more [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Jun 26 13:32:07 EDT 2006 [INFO] Final Memory: 3M/6M [INFO] If anyone has gotten this example going (or has successfully included axis2 in their current app), your help will be much appreciated. Thanks in advance! [1] http://www.wso2.net/kb/90 Brian Russell www.closerware.com -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 3:55 PM To: axis-user@ws.apache.org Subject: Re: Axis 2 deployment as part of existing web application Yes. See [1] for a POJO sample. You can similarly embed a WSDL2Java generated service as well. -- dims [1] http://www.wso2.net/kb/90 On 6/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I was wondering if Asix 2 can be deployed as part of an existing application war, just like original Axis was able to? Thanks, Ahmed This mail sent through www.mywaterloo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - 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: Axis 2 deployment as part of existing web application
Yes. See [1] for a POJO sample. You can similarly embed a WSDL2Java generated service as well. -- dims [1] http://www.wso2.net/kb/90 On 6/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I was wondering if Asix 2 can be deployed as part of an existing application war, just like original Axis was able to? Thanks, Ahmed This mail sent through www.mywaterloo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]