PDA

View Full Version : FYI: Trick To Lining Up Sample Projects In Eclipse


benethridge
Jun 30th, 2006, 01:48 PM
Hi, everyone.

Some of you may not know the trick (or a trick) to lining up the Airline and Echo projects in Eclipse. One of my co-workers discovered it. If you use it, it may cut down much of the "tinker-time" for you, i.e. the time you might otherwise have to spend moving directories around, and fixing up properties and config files. It did for me, at least:

( ) Copy the spring web service downloaded dir from, say, here:

C:\Downloads\Spring\spring-ws-1.0-m1

...to a new workspace dir, say, here:

C:\workspace_Spring\spring-ws-1.0-m1

( ) Start Eclipse and browse to the new workspace dir, but ending down here:

C:\workspace_Spring\spring-ws-1.0-m1\projects\spring-ws\spring-ws-samples

(Alternatively, you can point Eclipse straight at the download dir.)

( ) Create a new "airline" project, taking the option "Create new project in workspace"

Note that if you type in the "airline" name exactly, Eclipse will now auto-detect the sources and classes for the airline project.

( ) Click Finish, taking the default output folder as airline/target/test-classes. (Looked a bit non-standard to me, but it works.)

( ) Follow instructions in Airline project's readme.txt (basically just "ant war" if you already have MySql).

( ) Start Tomcat in debug mode (beyond the scope of this thread, but I learned it from Kent Tong's "Developing Web Services With Apache Axis" book).

( ) Deploy the new airline.war to tomcat using "Tomcat Manager" shown under http://localhost:8080/ page (Log should show no significant errors.)

( ) Back in Eclipse, create a new default Remote Java Application and Debug it.

( ) Set what ever breakpoints you wish on the server side. Then, using the client build.xml, run the client...or debug the client as you normally would in Eclipse.

Doing the above, I did not have to change ANY files from the download. Just ran the build targets, and it worked right out of the box.

Ben

Jonathan Maguire
Jul 1st, 2006, 07:03 AM
Hi Ben,

Thanks for the post. When I try to complete the above steps I get the following build errors:

import org.springframework.ws.samples.airline.schema.Airp ort cannot be resolved
import org.springframework.ws.samples.airline.schema.Flig ht cannot be resolved
import org.springframework.ws.samples.airline.schema.GetF lightsRequest cannot be resolved
import org.springframework.ws.samples.airline.schema.GetF lightsResponse cannot be resolved
import org.springframework.ws.samples.airline.schema.Serv iceClass cannot be resolved
import org.springframework.ws.samples.airline.schema.impl .AirportImpl cannot be resolved
import org.springframework.ws.samples.airline.schema.impl .FlightImpl cannot be resolved
import org.springframework.ws.samples.airline.schema.impl .GetFlightsResponseImpl cannot be resolved


I cant find any of the above classes in the 'spring-ws-1.0-m1' directory.

Anyone else have this problem?

Thanks,

Jonathan

Arjen Poutsma
Jul 2nd, 2006, 02:18 PM
You need to generate the JAXB code by doing an "ant dist".

Jonathan Maguire
Jul 4th, 2006, 05:17 AM
That worked. Thanks Ben.