Jul 19th, 2006, 02:43 PM
Actual instructions for getting samples up and running
Are there any? I've followed what I could find on here to no avail. The instructions in the redme.txt files don't seem to work (for example, "ant war" doesn't produce a WAR file).
I have a brand new install of Tomcat.
I have an un-zipped spring-ws-1.0-m1 folder.
I have an un-zipped spring-framework-2.0-rc2 folder.
Jul 19th, 2006, 03:46 PM
Which sample are you trying to run? What errors do you get?
Originally Posted by jcvanvorst
If you run an "ant war" in spring-ws-1.0-m1/projects/spring-ws/spring-ws-samples/echo, or projects/spring-ws/spring-ws-samples/airline, you should end up with a war in target/artifacts/war/.
Note that the airline sample is a complete application, and requires a database to run. Scripts to setup a MySQL or PostGresql database are provided in src/etc/db. The echo sample does not have this requirement.
Jul 19th, 2006, 04:01 PM
I missed the error output from the ANT script. The build was failing because it could not locade the org.w3c.* classes, which are not in the 1.4 JDK which is default on my machine (damn employer still not up to 5.0). After pointing to the 5.0 JDK the echo app builds quite nicely.
Sorry for the bother.
Jul 25th, 2006, 02:21 PM
getting echo to run in eclipse
I have had success getting the samples to work in eclipse, with the sydeo plugin. Sysdeo lets you run your tomcat server in the eclipse environment. Doing so, the project builds automatically and you can test without deploying (although creating a war file and deploying it to the tomcat webapps directory after that works well). One issue though, I tried it with myEclipse and had some conflicts there (but it is good for the standard eclipse).
So if anyone is interested try:
1) installing the sysdeo plugin from - http://www.sysdeo.com/eclipse/tomcatplugin
2) Assuming tomcat is already installed on your system, configure eclipse to use it
I use version 5.x, tomcat home pointing to the root of my tomcat install
the tomcat base pointing and under advanced, tomcat base also points there.
3) Create a new project (web>Dynamic web project) and configure the tomcat runtime to be Apache Tomcat. Also again specify the tomcat install directory and the jre (for me jdk1.5) in the server setup). Note that if you just create a project as oppossed to a dynamic web project, it won't run on the server.
4) I don't use the j2ee perpsective since it isn't necessary for these spring apps
5) I then copy from the samples the ...\src\main\java\org\springframework\ws\samples\e cho directory to the new src directory
6) Fix the packages to match your project by double clicking on the package error in the code in eclipse, and choosing move ... to package ...
7) Also copy the files from the sample WEB-INF directory to the WEB-INF directory of your new project
8) copy echo.wsdl, echo.xsd and index.html to your webContent directory
9) Make sure that all the jar files you need are in a directory and added to your build path (right mouse click, properties, java build path)
10) Right mouse click on the project, and choose run as, run on server, then define a server (or chose one if you already defined one)
11) You should see the Spring-WS Echo index page. You can easily debug this way too (setting break points etc) without setting up remote debugging.
12) You can easily test the echo app using the web service explorer in eclipse (under the run menu), click on the icon near the top to the left of the star and under the minimize icon to get to the wsdl main, and then enter your wsdl path (such as http://localhost:8080/echo/echo.wsdl) into the url field. If things are set up correctly, you can click on an operation (echo), enter some info into the echoRequest field and click go. Your echo result should display in the status at the bottom of the explorer screen.
FYI: This works for web services, but I also have written and tested MVC spring apps this way.
Sep 1st, 2006, 01:17 PM
applicationContext for echo and changes in the nightly build
I don't know if there is an updated applicationContext for the echo sample for the changes voer version 1.0-M2, but here is the changes I made recently to make it work if anyone is interested (renamed applicationContext.xml.txt for upload)