WSO2 Mashup Server

Last updated
WSO2 Mashup Server
Mashup logo.gif
Developer(s) WSO2 and Community
Initial releaseJanuary 28, 2008;14 years ago (2008-01-28)
Final release
2.3.2 / November 1, 2011;10 years ago (2011-11-01) [1]
Written in Java
Operating system Cross-platform
Available inEnglish
Type Application server
License Apache License 2.0
Website wso2.com/products/mashup-server OOjs UI icon edit-ltr-progressive.svg

The WSO2 Mashup Server is an open-source mashup platform that hosts JavaScript based mashups. It is based on Apache Axis2 and other open source projects, and provides JavaScript authors the ability to consume, compose and emit web services, feeds, scraped web pages, email, and instant messages. The source code is freely available under the open source Apache License. It provides a runtime platform for developing and deploying mashups. It can be downloaded and deployed locally or within an organization.

Contents

The WSO2 Mashup Server is web services centric in that each mashup exposes a new web service, which can be consumed by other mashups, web service clients, or Ajax style web pages. The securability of web services make them an attractive technology within organizations deploying a service-oriented architecture (SOA) and for business mashups.

On December 8, 2012, the WSO2 Mashup Server was retired since its remaining functionality, JavaScript web service hosting, was folded into the WSO2 Application Server. [2] WSO2 Application Server went on to eventually become a set of extensions to Apache Tomcat [3] and JavaScript hosting was provided by Jaggery based upon Rhino. [4] [5]

JavaScript as a mashup composition language

Mashups are composed using server side JavaScript in the WSO2 Mashup Server. A set of language extensions along with E4X provides domain specific features such as;

A Hello World

functionhello(){return"Hello World";}

Calling a SOAP web service

functioninvokeGetVersionService(){varversion=newWSRequest();varoptions=newArray();options.useSOAP=1.2;options.useWSA=1.0;options.action="http://services.mashup.wso2.org/version/ServiceInterface/getVersionRequest";varpayload=null;varresult;try{version.open(options,"http://localhost:7762/services/system/version",false);version.send(payload);result=version.responseE4X;}catch(e){system.log(e.toString(),"error");returne.toString();}returnresult;}

Working with feeds

// Creating an RSS 2.0 feed and writing it to file.functioncreateRssFeed(){// Creating the Feedvarfeed=newFeed();feed.feedType="rss_2.0";feed.title="This is a test Feed";feed.description="This feed demonstrates the use of Feed host object to create an RSS 2.0 feed.";feed.link="http://mooshup.com/rss20.xml";// Creating Entries in the Feedvarentry=newEntry();entry.title="This is a test entry.";entry.description="This is a sample entry demonstrating the use of the Entry host object.";feed.insertEntry(entry);varentry2=newEntry();entry2.title="This is another test entry.";entry2.description="This is a sample entry demonstrating the use of the Entry host object.";// Adding a Media Module to the entryvarmediaModule=newMediaModule("http://www.earthshots.org/photos/387.jpg");mediaModule.copyright="2007 Tad Bowman";mediaModule.type="image/jpeg";mediaModule.thumbnail="http://www.earthshots.org/photos/387.thumb.jpg";entry2.addMediaModule(mediaModule);feed.insertEntry(entry2);// Writing the newly created Feed to a Filevarresult=feed.writeTo("test-created-rss-feed.xml");returnresult;}

Web scraping

functionwebScrape(){varconfig=<config><var-defname='response'><html-to-xml><httpmethod='get'url='http://ww2.wso2.org/~builder/'/></html-to-xml></var-def></config>;varscraper=newScraper(config);result=scraper.response;returnresult;}

The syntax is identical to another open source web scraping tool called web harvest.

Working with APP

functionpersistAuthenticatedAppFeed(){// Creating an instance of APPClientvarclient=newAPPClient();// Creating an instance of AtomFeedvarfeed=newAtomFeed();// Setting login credentials for the clientclient.credentials={username:"you@email.com",password:"xxx",service:"blogger",authtype:"google"};// Retrieving and online feedfeed=client.getFeed("http://blog.mooshup.com/feeds/posts/default");// Getting an array of individual entries from the feedvarentries=newArray();entries=feed.getEntries();// Writing the retrieved feed to a filefeed.writeTo("my-file-name.xml");}

Periodic task scheduling

// Scheduling a function to be executed every 2 secondsvaruuid=system.setInterval('myJavaScriptFunction("parameterValue")',2000);// Stopping the above scheduled tasksystem.clearInterval(uuid);

Sending an e-mail

functionsendEmail(){varemail=newEmail("host","port","username","password");varfile=newFile("temp.txt");email.from="test@wso2.com";email.to="test@wso2.com";// alternatively message.to can be an array of strings. Same goes for cc and bccemail.cc="test@wso2.com";email.bcc="test@wso2.com";email.subject="WSO2 Mashup server 1.0 Released";email.addAttachement(file,"temp.txt");// Optionally can add attachments, it has a variable number of arguments. each argument can be a File hostObject or a string representing a file.// In this case we are sending two attachments (this demonstrates sending attachments using either a File Host Object or a path to the file).email.text="WSO2 Mashup server 1.0 was Released on 28th January 2008";email.send();}

See also

Related Research Articles

In computing, Common Gateway Interface (CGI) is an interface specification that enables web servers to execute an external program, typically to process user requests.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers with error handling, subroutines, and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

A web service (WS) is either:

RSS Family of web feed formats

RSS is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many different websites in a single news aggregator, which constantly monitor sites for new content, removing the need for the user to manually check them. News aggregators can be built into a browser, installed on a desktop computer, or installed on a mobile device.

Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. ColdFusion was originally designed to make it easier to connect simple HTML pages to a database. By version 2 (1996), it became a full platform that included an IDE in addition to a full scripting language.

Atom (Web standard) Web standards

The name Atom applies to a pair of related Web standards. The Atom Syndication Format is an XML language used for web feeds, while the Atom Publishing Protocol is a simple HTTP-based protocol for creating and updating web resources.

A mashup, in web development, is a web page or web application that uses content from more than one source to create a single new service displayed in a single graphical interface. For example, a user could combine the addresses and photographs of their library branches with a Google map to create a map mashup. The term implies easy, fast integration, frequently using open application programming interfaces and data sources to produce enriched results that were not necessarily the original reason for producing the raw source data. The term mashup originally comes from creating something by combining elements from two or more sources.

A proxy auto-config (PAC) file defines how web browsers and other user agents can automatically choose the appropriate proxy server for fetching a given URL.

Laminas Project is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packages. The framework uses various packages by the use of Composer as part of its package dependency managers; some of them are PHPUnit for testing all packages, Travis CI for continuous Integration Services. Laminas provides to users a support of the model–view–controller (MVC) in combination with Front Controller solution. MVC implementation in Laminas has five main areas. The router and dispatcher functions to decide which controller to run based on data from URL, and controller functions in combination with the model and view to develop and create the final web page.

Yahoo! Pipes Web application

Yahoo! Pipes was a web application from Yahoo! that provided a graphical user interface for building data mashups that aggregate web feeds, web pages, and other services; creating Web-based apps from various sources; and publishing those apps. The application worked by enabling users to "pipe" information from different sources and then set up rules for how that content should be modified. In addition to the pipe editing page, the website had a documentation page and a discussion page. The documentation page contained information about pipes including guides for the pipe editor and troubleshooting. The discussion page enabled users to discuss the pipes with other users.

NewGenLib

NewGenLib is an integrated library management system developed by Verus Solutions Pvt Ltd. Domain expertise is provided by Kesavan Institute of Information and Knowledge Management in Hyderabad, India. NewGenLib version 1.0 was released in March 2005. On 9 January 2008, NewGenLib was declared free and open-source under GNU GPL. The latest version of NewGenLib is 3.1.1 released on 16 April 2015. Many libraries across the globe are using NewGenLib as their Primary integrated library management system as seen form the NewGenlib discussion forum.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

Yahoo! Query Language (YQL) is an SQL-like query language created by Yahoo! as part of their Developer Network. YQL is designed to retrieve and manipulate data from APIs through a single Web interface, thus allowing mashups that enable developers to create their own applications.

EMML, or Enterprise Mashup Markup Language, is an XML markup language for creating enterprise mashups, which are software applications that consume and mash data from variety of sources, often performing logical or mathematical operations as well as presenting data. Mashed data produced by enterprise mashups are presented in graphical user interfaces as mashlets, widgets, or gadgets. EMML can also be considered a declarative mashup domain-specific language (DSL). A mashup DSL eliminates the need for complex, time-consuming, and repeatable procedural programming logic to create enterprise mashups. EMML also provides a declarative language for creating visual tools for enterprise mashups.

Google Apps Script Scripting platform developed by Google

Google Apps Script is a scripting platform developed by Google for light-weight application development in the Google Workspace platform. Google Apps Script was initially developed by Mike Harm as a side project while working as a developer on Google Sheets. Google Apps Script was first publicly announced in May 2009 when a beta testing program was announced by Jonathan Rochelle, then Product Manager for Google Docs. In August 2009 Google Apps Script was subsequently made available to all Google Apps Premier and Education Edition customers. It is based on JavaScript 1.6, but also includes some portions of 1.7 and 1.8 and a subset of the ECMAScript 5 API. Apps Script projects run server-side on Google's infrastructure. According to Google, Apps Script "provides easy ways to automate tasks across Google products and third party services." Apps Script is also the tool that powers the add-ons for Google Docs, Sheets and Slides.

Mojito is an environment agnostic, Model-View-Controller (MVC) web application framework. It was designed by Ric Allinson.

Yesod is a free and open-source web framework based on Haskell for productive development of type-safe, REST model based, high performance web applications, developed by Michael Snoyman et al.

webpack Open-source JavaScript module bundler

Webpack is a free and open-source module bundler for JavaScript. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included. Webpack takes modules with dependencies and generates static assets representing those modules.

References

  1. Siriwardena, Ranga (November 1, 2011). "WSO2 Mashup Server 2.3.2 Released !". WSO2 Announcements (Mailing list). Retrieved 2022-04-18.
  2. Marsh, Jonathan (December 8, 2012). "WSO2 Mashup Server–where to now?". The Source. wso2.com. Archived from the original on 2012-12-16.
  3. "Welcome to WSO2 Application Server". wso2/product-as. product-as/README.md at master. Retrieved 2022-04-18 via GitHub.
  4. "{jaggery.js} - The delicious Javascript framework". wso2/jaggery. jaggery/README.md at master. Retrieved 2022-04-18 via GitHub.
  5. "Jaggery". Archived from the original on 2021-05-16.