| 1 | This project is the Poker web-service example from Chapter 9 of Spring |
|---|
| 2 | in Action, 2nd Edition. However... |
|---|
| 3 | |
|---|
| 4 | I very stupidly used a SNAPSHOT version of Spring-WS when building the |
|---|
| 5 | original application contained in the book. The problem with SNAPSHOT |
|---|
| 6 | version is that they're volatile and likely to change. Guess what? |
|---|
| 7 | Spring-WS changed. |
|---|
| 8 | |
|---|
| 9 | Consequently, the original Poker-WS application in the book and |
|---|
| 10 | distributed with the main SiA source code distribution won't work and |
|---|
| 11 | won't build. That's the risk of working with a pre-1.0 release. |
|---|
| 12 | |
|---|
| 13 | This version of the Poker-WS project builds against Spring-WS |
|---|
| 14 | 1.0.2. The good news is that what you're looking at is the latest and |
|---|
| 15 | greatest and works against a post-1.0 version of Spring-WS. The bad |
|---|
| 16 | news, however, is that some of the code contained herein (especially |
|---|
| 17 | the client code) will be different than what's in the book. |
|---|
| 18 | |
|---|
| 19 | There's also another good news side to this story: I've reworked the |
|---|
| 20 | client examples to run as an integration test (see the code in |
|---|
| 21 | src/test/java/com/springinaction/poker/itest). And, I've tweaked |
|---|
| 22 | pom.xml so that you can run the web service and the integration test |
|---|
| 23 | from Maven. |
|---|
| 24 | |
|---|
| 25 | For example, to start a Jetty server with the poker web service |
|---|
| 26 | deployed, run this at the command line: |
|---|
| 27 | |
|---|
| 28 | % mvn package cargo:start |
|---|
| 29 | |
|---|
| 30 | To prove this works, point your browser at |
|---|
| 31 | http://localhost:8080/Poker-WS/poker.wsdl. You should see the |
|---|
| 32 | WSDL for the poker web service. |
|---|
| 33 | |
|---|
| 34 | Optionally, you can start the web service in Jetty *and* execute the |
|---|
| 35 | integration tests against it with the following command line: |
|---|
| 36 | |
|---|
| 37 | % mvn integration-test |
|---|
| 38 | |
|---|
| 39 | This will compile the code, run the unit tests, start the Jetty |
|---|
| 40 | server, deploy the service, execute the integration test, then stop |
|---|
| 41 | the Jetty server. |
|---|
| 42 | |
|---|
| 43 | Again, sorry for the confusion that may have been caused by my poor |
|---|
| 44 | decision to use a SNAPSHOT release of Spring-WS. Hopefully the |
|---|
| 45 | improvements I've made in the example will in some way make amends. |
|---|
| 46 | |
|---|
| 47 | Enjoy, |
|---|
| 48 | Craig |
|---|