If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Saturday, October 9, 2010

Building webservices with Spring-WS (part 9)

Part 9 (final part) will explain how we can create the client for our movie webservice.

The interface acts as a facade and hides any webservice related details from the end user.




The implementation uses Springs webservicetemplate to (un)marshall the request and response objects and do a bidirectional send and receive.



The application-context.xml below will show you how easy it is to configure your client. For demo purpose I hardcoded the defaultUri.


And finally a little unit test which can be executed succesfully if you start the movieService application.



I left out the pom.xml but the dependencies are mostly the same as for the movieService project itself.

All source files for this demo webservice can be downloaded:


One remark:
You will need to install the default-value plugin in your local maven repository which is used by the movieDomain project and you should use following groupId 'org.jvnet.jaxb2-commons' and artifactId 'defaultvalueplugin' since I configured the plugin like that.

Kind regards,
Robby

No comments:

Post a Comment