summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-13 20:02:36 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-13 20:02:36 +0000
commit4ed0ed906e82c9484b384419fa4ef4c980768731 (patch)
treee0250b6d10349e29522a2b1667d2e1db4d9dab84 /branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README
parentba73f8abcef884936f965c3085b80485bf2b5e1a (diff)
Creating Java SCA 1.x branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@713805 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README')
-rw-r--r--branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README116
1 files changed, 116 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README b/branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README
new file mode 100644
index 0000000000..d0d3307b3a
--- /dev/null
+++ b/branches/sca-java-1.x/samples/calculator-ws-secure-webapp/README
@@ -0,0 +1,116 @@
+Calculator Sample Exposing Secure Web Services In A WebApp
+==========================================================
+This sample uses the same code as the calculator sample, it deploys the
+sample wrapped in a web app and exposes the AddService as a web service.
+The autentication intent is applied to communications with the add
+component. The integrity intent is applied to communication with the
+subtract component.
+
+The README in the samples directory (the directory above this) provides
+general instructions about building and running samples. Take a look there
+first.
+
+As this sample provides a web app there is a manual step where the WAR file
+that contains the sample is copied to your web app container. If you just want
+to give this sample a go deploy the WAR file (target/sample-calculator-ws-secure-webapp.war)
+to you web application server.
+
+Once the web app is deployed use your browser to visit the following URL;
+
+http://localhost:8080/sample-calculator-ws-secure-webapp
+
+The sample is configured to use a service on port 8080. If your servlet container
+is using a port other than 8080 then you will need to edit the Calculator.composite
+and change the uri attribute of the <binding.ws> used by the CalculatorServiceComponent
+to use the correct port.
+
+Sample Overview
+---------------
+The sample provides a single calculator service with a default SCA (java)
+binding. The CalculatorClient exercises this interface by calling add,
+subtract, multiply and divide operations. This results in messages passing to
+the appropriate components in the composite.
+
+calculator-webapp/
+ src/
+ main/
+ java/
+ calculator/
+ AddService.java - As calculator sample
+ AddServiceImpl.java
+ CalculatorClient.java - As calculator sample
+ CalculatorService.java - As calculator sample
+ CalculatorServiceImpl.java
+ DivideService.java - As calculator sample
+ DivideServiceImpl.java
+ MultiplyService.java - As calculator sample
+ MultiplyServiceImpl.java
+ SubtractService.java - As calculator sample
+ SubtractServiceImpl.java
+ resources/
+ Calculator.composite - As calculator sample except that the
+ connection between the CalculatorService
+ and the AddService is web services
+ definitions.xml - intent and polci set specification
+ security.properties - security configuration for the
+ rampart security engine that runs
+ inside of Axis
+ calculatorKeys.jks - keystore
+ webapp
+ META-INF/
+ sca-contribution.xml - specifies the composite to be deployed
+ WEB-INF/
+ web.xml - defines the listener that starts up the
+ Tuscany SCA runtime and maps service
+ calls to the TuscanyServlet
+ calc.jsp - the web application that makes use of the
+ SCA application
+
+ calculator.png - a pictorial representation of the sample .composite file
+ build.xml - the Ant build file
+ pom.xml - the Maven build file
+ README - this file
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built using Ant as
+follows
+
+cd calculator-ws-secure-webapp
+ant package
+
+This should result in a war file (sample-calculator-ws-secure-webapp.war) in the target
+directory. Copy this war file to your web app deployment directory in you
+web app container.
+
+The process for getting the web app running will depend on which web app container
+you are using. For example, if you are using Tomcat then it is simply a matter
+of copying the WAR file to the webapps directory.
+
+Once the web app is deployed use your browser to visit the following URL;
+
+http://localhost:8080/sample-calculator-ws-secure-webapp
+
+The port and hostname will of course vary depending on your local installation.
+
+You should see the following output.
+
+Expression Result
+2 + 3 5.0
+3 - 2 1.0
+3 * 2 6.0
+3 / 2 1.5
+
+Building And Running The Sample Using Maven
+-------------------------------------------
+With either the binary or source distributions the sample can be built and run
+using Maven as follows.
+
+cd calculator-ws-secure-webapp
+mvn
+
+Again this should result in a war file (sample-calculator-ws-webapp.war) in the target
+directory. Follow the steps described in the previous section for running the web
+app and for the expected results.
+
+