+----------------------------------------------------------------------+
| Implementing Messaging Patterns Using Web Services with Mule Example |
+----------------------------------------------------------------------+
This example accompanies the "Implementing Messaging Patterns Using Web Services with Mule" 
webinar and demonstrates the patterns and best practices described in the webinar.

1) Canonical Data Model
-----------------------
"src/main/resources/model"

A simple example of what a canonical data model might look like can be seen in the schemas within this directory.

2) Contract-first Document/Literal WSDL 
---------------------------------------
"src/main/resources/onlinestore/NileOnlineStore.wsdl"

An example of a WSDL that uses document/literal and references an externally defined types/message.  Note: the messages 
that are used are defined in "messages.xsd" which in turn uses out "canonical data model" in this case. 

3) CXF WSDL-first proxy inbound endpoint
-----------------------------------------
This can be seen by looking at the 'inbound' section of the first service in "conf/nile-mule-config.xml".  You will notice 
that the following are required for this functionality:
- proxy='true'
- The service name which matches the services defined in the WSDL
- The location of the WSDL to be used.

4) WS payload forwarding and content based routing
--------------------------------------------------
This can be seen looking at the 'outbound' section of the first service in "conf/nile-mule-config.xml".  You will notice 
that the WS request is being forwarded over different transports to different endpoints depending on the content of the 
WS request.

5) CatchAllStrategy for requests that can't be routed
-----------------------------------------------------
This can be seen looking at at the 'outbound' section of the first service in "conf/nile-mule-config.xml".

6) Lazy transformation of WS payload
------------------------------------
This can be seen looking at the "NileStore" and "AmazonBookStore" which use JAXB and XSLT respectively to transform the 
original WS payload to the required format/type for the final destination service implementation.

7) Use of CXF proxy outbound endpoint
-------------------------------------
The "AmazonBookStore" provides another example of using CXF proxy endpoints to call out to amazon.

+---------------------+
| Running the example |
+---------------------+
This example uses maven.

The test cases that demonstrate the functionality can be run either:

1) Using Maven

or 

2) Within your IDE

You will need to:
- Use the "generate" goal in Maven to generate the JAXB objects. 
- Generate project files using Maven (e.g. using the eclipse:eclipse goal for Eclipse)
- Import project into your IDE 

** NOTES: **
- In order to test the invocation of the Amazon WS you will need to insert an Amazon AWSAccessKeyId in the following 
stylesheet: 'src/main/resources/amazon-request.xsl'
- Due to a current issue with Mule snapshot deployment you will need to build Mule locally to generate all the jar's/pom's
that are required. 