Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

What we tried to accomplished was the challenge to model and implement an Amazon-like application running as a Tuscany Application (from now on Shopping Store). Of course, we wanted this application to be fully compatible to the Amazon's WSDL (http://ecs.amazonaws.com/AWSECommerceService/2007-05-14/AWSECommerceService.wsdlImage Removed). This way, any given (Web) application written to interact with Amazon through its WS interface (e.g. http://www.openlaszlo.org/node/198Image Removed) would be seamlessly communicating with the application entirely coded as a Tuscany application.

...

In the particular case of the application which gave birth to this document, the WSDL file was taken from Amazon. It is important to make clear that in its first phase of development the Shopping Store application was intended to provide only a Shopping Cart service, and this document only covers this initial phase. Therefore, since Amazon's WSDL is composed of a lot of different methods/operations it had to be reduced and only the operations related to the Shopping Cart remained. Here you can see the final version of the WSDL file called shoppingstore.wsdl: https://issues.apache.org/jira/secure/attachment/12368949/ShoppingStore.wsdlImage Removed. It is worth mentioning that the soap address was modified in order for it to point to the location where the Shopping Cart service will be running.

...

First, let us create the following directory structure (this will be a new "project", thus create it in a new location):

  1. build -> this directory will contain everything needed to generate the jar containing the Shopping Store app.
    1. wsdl
      1. shoppingstore.wsdl -> the reduced Amazon WSDL
    2. shoppingstore.composite -> the content of this file will be explained later
  2. dist -> this directory will contain everything needed to run the Shopping Store application
  3. lib -> lib required to compile and run the Shopping Store application
    1. AWS2007_05_14.jar -> the jar file we have just created
  4. src -> directory containing the source code of the Shopping Store application (we will be explain it later)
    1. shoppingstore
      1. server
        1. ShoppingStoreServer.java
      2. services
        1. cart
          1. CartService.java
          2. CartServiceImpl.java

Now, let us specify its interface (which, in this case, will be identical to the skeleton shown before) in a java file named CartService.java:

...

1 - Install Tuscany: Download it (http://cwiki.apache.org/TUSCANY/sca-java-releases.htmlImage Removed) and uncompress it on the directory where you want it to be located (e.g. /opt/tuscany-sca-1.0-incubating).

...

3.2 - Now, copy the lib directory (along with the contained AWS2007_05_14.jar file) into the "dist" directory. It must look like this:

-dist

  • lib

AWS2007_05_14.jar

shoppingstore.jar

...