====== Spring-RCP using AppFuse webservices ======
To build a classical 3-tier architecture, you can use AppFuse as a back end. This full-featured web-framework provides many time-saving features, additionally it's very easy to export the managers as webservice and use them as a backend to your Spring-RCP application.
===== Webservice configuration =====
The first thing to do is to configure an existing AppFuse application to export the managers as a webservice. A detailed description can be found in this wiki: [[..appfuse:webservices|Webservices with HttpInvoker]].
===== RCP configuration =====
In your Spring-RCP project some configuration files have to be modified, to make use of the new webservices.
==== src/main/resources/ctx/security-context-client.xml ====
The following beans have to be configured:
==== src/main/resources/ctx/richclient-remoting-context.xml ====
This file has to be created, all the managers will get defined here to make them accessible.
==== src/main/resources/remoting.properties ====
The server address is kept in this configuration file, so it's easier to change in the future at a central location. The configuration file has to be created as well and the following data is added.
# Properties file with server URL settings for remote access.
# Applied by PropertyPlaceholderConfigurer from "client-context.xml".
# local test server data
serverName=localhost
httpPort=8080
contextPath=
# live server data
#serverName=192.168.2.50
#httpPort=8180
#contextPath=/yourapp
==== src/main/resources/ctx/richclient-application-context.xml ====
To load the server properties on context creation, the following bean definition gets added to the file.
classpath:remoting.properties
==== pom.xml ====
Three additional dependencies have to be added to the pom.xml to use Spring-remoting:
com.caucho
hessian
3.0.13
com.caucho
burlap
2.0.12
javax.xml
jaxrpc
1.1