Mashup Examples
The EMML sample mashup scripts listed in this topic illustrate EMML statement syntax and many common mashup techniques.
Note: these samples are not shipped with the EMML Reference Runtime Engine.
If you have not already done so, download and install these samples. See Getting Started with EMML and the EMML Reference Runtime Engine for instructions.
| Sample Mashup | Description |
|---|---|
amazonrest.emml |
Invokes Amazon REST Service to get a user’s wishlist, identified by input parameter. |
annotate.emml |
Examples of <annotate>. |
assignments.emml |
Examples of <assign>. |
blogpot.emml |
Creates a blog entry using Google Blogger API. Logs in using Google Authentication API. Example of <directinvoke> with POST method. Example of <script> and <constructor>. |
concurrent1.emml |
Example of <foreach> used with concurrent loops. The results are returned by value in a single 'fused' variable. |
concurrent2.emml |
Example of <foreach> used with concurrent loops. The results are returned by reference. |
csvmacro.emml |
Example of outputing a service result in CSV format. Example using FormatAsCSV macro. |
dynamicemml.emml |
Example of how to create a mashup script dynamically and invoke it within another mashup. Examples of <script> and executeDynamicEMML macro. |
dynamicfilter.emml |
Example of invoking a web service and performing a filter based on dynamic filtering criteria. Example of mashup expressions and <filter>. |
dynamicinvoke.emml |
Invokes the Twitter search service to find tweets for a term specified as input parameter. Outputs all tweets found. Example of <foreach> and <appendresult>. |
faulthandling.emml |
Example of using error variables from service invocation to control processing. Example of <if>, <elseif> and <else>. |
filters.emml |
Examples of <filter>. |
geoannoation.emml |
Uses the built-in GeoAnnotator macro to add geographic data for a location. Example of using a macro. |
googleauth.emml |
Performs login for Google Authentication and returns the Goole token. |
googlefinancenews.emml |
Uses web clipping from Google Finance News site to clip and output only specific content. Examples of <template> to have dynamic XPath expressions, <assign>, <foreach> and <appendresult>. |
groovy.emml |
Example of experimental integration with Groovy. |
groupby2.emml |
Example of grouping using <foreach> and <appendresult>. |
groupby.emml |
Example of single and nested grouping with <group>. |
iGoogle.emml |
Logs into iGoogle. Example of receiving cookies and response headers and of handling redirects. Example of <if>. |
javascript.emml |
Example using inline JavaScript in a mashup. |
join.emml |
Joins Xignite and Yahoo data for stocks. Example of a simple <join>. |
joinfunctions.emml |
Example of <join> using XPath functions in the join criteria. Also uses <select> to build the joined output. |
joinmatches.emml |
Example of <join> using the "match" operator ~ for text fields. |
joinselect.emml |
Example of <join> using <select> to build the joined output. |
jruby.emml |
Example mashup using JRuby. |
macros.emml |
Examples of simple macro definitions (custom EMML statements) and how to use them in a mashup. |
merge.emml |
Example of <merge> and <parallel>. |
mergeNodeLists.emml |
Examples of <merge> when the results are node sets rather than well-formed documents. |
multiparallel.emml |
Example of multiple <parallel> blocks, executed in sequence. Each parallel flow contains multiple threads of execution using <sequence> children. Example of <select>, <join> and <assign>. |
onerror.emml |
Example of the onerror attribute to control mashup processing when service errors occur. Example of <if> with <elseif> and <else> subclauses. |
outerjoin.emml |
Example of an outer join using XQuery. |
parallel.emml |
Example of <parallel> invoking two services. |
rssfilter.emml |
Example of filtering results from a Syndication service. |
rssSort.emml |
Example of filtering and sorting results from a Syndication service. |
rubyXmlRpc.emml |
Example of using JRuby scripts in a mashup. |
scope.emml |
Example of global and local scopes for <variable>. |
select.emml |
Example of <select> statement to filter selected nodes from the result. |
soapservice.emml |
Example of a generic mashup to invoke a SOAP web service. |
sort.emml |
Examples of <sort>. |
sortdate.emml |
Example of <sort> for date fields that are not in the standard XML dateTime format. This uses a custom XPath function to transform a Java date to the appropriate format for sorting. This also uses the XPath constructor functions to cast values to the correct datatype. |
soundex.emml |
Example of using a custom XPath function. |
sparql.emml |
Example of constructing a SPARQL query and executing it. Example of <script>, constructing HTTP headers and <directinvoke>. |
sql.emml |
Examples of <sql> statement for database queries or stored procedures. Example of <sqlUpdate> and SQL transaction statements. |
sqlreset.emml |
Example to resetting a datasource connection pool using <script>. |
twitter.emml |
Example of mashup to perform simple Twitter query. |
unique.emml |
Example of <filter> to ensure unique results. |
webclipping.emml |
Example of web clipping from a web site. |
while.emml |
Examples of <while>. |
xquery.emml |
Example using XQuery. |
xslt.emml |
Example of the experimental integration with XSLT. |
ysearch.emml |
Performs a Yahoo and Twitter search and combines the results. |
Enterprise Mashup Markup Language (EMML) Documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
