fbpx
Wikipedia

WSO2 Mashup Server

El WSO2 Mashup Server (Servidor de Mashups de WSO2) es una plataforma de mashup de código abierto que aloja mashups basados en JavaScript. Está basado en Axis2 Apache y otros proyectos de código abierto y proporciona a los autores de JavaScript la capacidad de consumir, componer y emitir servicios web, feeds RSS, páginas web scraped, correo electrónico y mensajes instantáneos. El código fuente está disponible bajo la licencia abierta licencia Apache. Proporciona una plataforma de tiempo de ejecución para el desarrollo e implementación de mashups. Puede descargarse e instalarse localmente o dentro de una organización.

WSO2 Mashup Server
Información general
Tipo de programa Servidor de aplicaciones
Desarrollador WSO2 y la comunidad
Lanzamiento inicial 28 de enero de 2008
Licencia licencia Apache 2.0
Idiomas inglés
Información técnica
Programado en Java
Plataformas admitidas Java
Versiones
Última versión estable 2.0.2 13 de mayo de 2010 (11 años, 2 meses y 29 días)
Enlaces
Sitio web oficial

El servidor de Mashup WSO2 es centrado en servicios web en tanto que cada mashup expone un nuevo servicio web, que puede ser consumido por otros mashups, clientes de servicios web o páginas web de estilo AJAX. La creación de aplicaciones seguras de servicios web las convierte en una tecnología atractiva dentro de las organizaciones que implementan una arquitectura orientada a servicios (service-oriented architecture, SOA) y de mashup de negocios.

Hasta la fecha, es la única plataforma de composición de código abierto disponible para los desarrolladores de mashups.

JavaScript como un lenguaje de composición de mashup

Los Mashups se componen utilizando JavaScript del lado del servidor en el servidor de Mashup WSO2. Un conjunto de extensiones del lenguaje que junto con E4X proporciona funciones específicas de dominio, como;

  • Llamar a otros servicios web SOAP/REST,
  • Feeds RSS/Atom feed de lectura y escritura,
  • Web scraping,
  • Publicación basada en APP,
  • Programación de tareas periódicas,
  • Correo electrónico y
  • IM

Un Hola mundo

 function hello() { return "Hello World"; } 

Llamada a un servidor web SOAP

 function invokeGetVersionService(){ var version = new WSRequest(); var options = new Array(); options.useSOAP = 1.2; options.useWSA = 1.0; options.action = "http://services.mashup.wso2.org/version/ServiceInterface/getVersionRequest"; var payload = null; var result; try { version.open(options,"http://localhost:7762/services/system/version", false); version.send(payload); result = version.responseE4X; } catch (e) { system.log(e.toString(),"error"); return e.toString(); } return result; } 

Trabajar con feeds

 // Creating an RSS 2.0 feed and writing it to file. function createRssFeed(){ // Creating the Feed var feed = new Feed(); 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 Feed var entry = new Entry(); 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); var entry2 = new Entry(); 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 entry var mediaModule = new MediaModule("http://www.earthshots.org/photos/387.jpg"); mediaModule.copyright = "2007 Tad Bowman"; mediaModule.type = "image/jpeg"; mediaModule.thumbnail = "http://web.archive.org/web/http://www.earthshots.org/photos/387.thumb.jpg"; entry2.addMediaModule(mediaModule); feed.insertEntry(entry2); // Writing the newly created Feed to a File var result = feed.writeTo("test-created-rss-feed.xml"); return result; } 

Raspado Web (Web scraping)

 function webScrape(){ var config = <config>  <var-def name='response'>  <html-to-xml>   <http method='get' url='http://ww2.wso2.org/~builder/'/>  </html-to-xml>  </var-def>  </config>; var scraper = new Scraper(config); result = scraper.response; return result; } 

La sintaxis es idéntica a otra herramienta de raspado web (web scraping) de código abierto llamada web harvest.

Trabajando con APP

 function persistAuthenticatedAppFeed(){ // Creating an instance of APPClient var client = new APPClient(); // Creating an instance of AtomFeed var feed = new AtomFeed(); // Setting login credentials for the client client.credentials={username:"you@email.com",password:"xxx",service:"blogger",authtype:"google"}; // Retrieving and online feed feed = client.getFeed("http://web.archive.org/web/http://blog.mooshup.com/feeds/posts/default"); // Getting an array of individual entries from the feed var entries = new Array(); entries = feed.getEntries(); // Writing the retrieved feed to a file feed.writeTo("my-file-name.xml"); } 

Programación de tareas periódicas

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

Envío de e-mail (mensaje de correo-e)

 function sendEmail(){ var email = new Email("host", "port", "username", "password"); var file = new File("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 bcc email.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(); } 

Referencias

Véase también

  • Mashup
  • ECMAScript for XML
  • Web scraping
  • Web-Harvest
  • Yahoo! Pipes
  • Yahoo! Query Language (YQL)

Enlaces externos

  • (en inglés) Página de inicio de Proyecto WSO2
  • (en inglés) Computerworld:
  • (en inglés) ZDNet:
  • (en inglés) SDTimes:
  • (en inglés) SOA Magazine:
  • (en inglés) Web-Harvest en SourceForge

Nota


  •   Datos: Q7955818

wso2, mashup, server, servidor, mashups, wso2, plataforma, mashup, código, abierto, aloja, mashups, basados, javascript, está, basado, axis2, apache, otros, proyectos, código, abierto, proporciona, autores, javascript, capacidad, consumir, componer, emitir, se. El WSO2 Mashup Server Servidor de Mashups de WSO2 es una plataforma de mashup de codigo abierto que aloja mashups basados en JavaScript Esta basado en Axis2 Apache y otros proyectos de codigo abierto y proporciona a los autores de JavaScript la capacidad de consumir componer y emitir servicios web feeds RSS paginas web scraped correo electronico y mensajes instantaneos El codigo fuente esta disponible bajo la licencia abierta licencia Apache Proporciona una plataforma de tiempo de ejecucion para el desarrollo e implementacion de mashups Puede descargarse e instalarse localmente o dentro de una organizacion WSO2 Mashup ServerInformacion generalTipo de programaServidor de aplicacionesDesarrolladorWSO2 y la comunidadLanzamiento inicial28 de enero de 2008Licencialicencia Apache 2 0IdiomasinglesInformacion tecnicaProgramado enJavaPlataformas admitidasJavaVersionesUltima version estable2 0 2 13 de mayo de 2010 11 anos 2 meses y 29 dias EnlacesSitio web oficial editar datos en Wikidata El servidor de Mashup WSO2 es centrado en servicios web en tanto que cada mashup expone un nuevo servicio web que puede ser consumido por otros mashups clientes de servicios web o paginas web de estilo AJAX La creacion de aplicaciones seguras de servicios web las convierte en una tecnologia atractiva dentro de las organizaciones que implementan una arquitectura orientada a servicios service oriented architecture SOA y de mashup de negocios Hasta la fecha es la unica plataforma de composicion de codigo abierto disponible para los desarrolladores de mashups Indice 1 JavaScript como un lenguaje de composicion de mashup 1 1 Un Hola mundo 1 2 Llamada a un servidor web SOAP 1 3 Trabajar con feeds 1 4 Raspado Web Web scraping 1 5 Trabajando con APP 2 Programacion de tareas periodicas 3 Envio de e mail mensaje de correo e 4 Referencias 5 Vease tambien 6 Enlaces externos 6 1 NotaJavaScript como un lenguaje de composicion de mashup EditarLos Mashups se componen utilizando JavaScript del lado del servidor en el servidor de Mashup WSO2 Un conjunto de extensiones del lenguaje que junto con E4X proporciona funciones especificas de dominio como Llamar a otros servicios web SOAP REST Feeds RSS Atom feed de lectura y escritura Web scraping Publicacion basada en APP Programacion de tareas periodicas Correo electronico y IMUn Hola mundo Editar function hello return Hello World Llamada a un servidor web SOAP Editar function invokeGetVersionService var version new WSRequest var options new Array options useSOAP 1 2 options useWSA 1 0 options action http services mashup wso2 org version ServiceInterface getVersionRequest var payload null var result try version open options http localhost 7762 services system version false version send payload result version responseE4X catch e system log e toString error return e toString return result Trabajar con feeds Editar Creating an RSS 2 0 feed and writing it to file function createRssFeed Creating the Feed var feed new Feed 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 Feed var entry new Entry 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 var entry2 new Entry 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 entry var mediaModule new MediaModule http www earthshots org photos 387 jpg mediaModule copyright 2007 Tad Bowman mediaModule type image jpeg mediaModule thumbnail http web archive org web http www earthshots org photos 387 thumb jpg entry2 addMediaModule mediaModule feed insertEntry entry2 Writing the newly created Feed to a File var result feed writeTo test created rss feed xml return result Raspado Web Web scraping Editar function webScrape var config lt config gt lt var def name response gt lt html to xml gt lt http method get url http ww2 wso2 org builder gt lt html to xml gt lt var def gt lt config gt var scraper new Scraper config result scraper response return result La sintaxis es identica a otra herramienta de raspado web web scraping de codigo abierto llamada web harvest Trabajando con APP Editar function persistAuthenticatedAppFeed Creating an instance of APPClient var client new APPClient Creating an instance of AtomFeed var feed new AtomFeed Setting login credentials for the client client credentials username you email com password xxx service blogger authtype google Retrieving and online feed feed client getFeed http web archive org web http blog mooshup com feeds posts default Getting an array of individual entries from the feed var entries new Array entries feed getEntries Writing the retrieved feed to a file feed writeTo my file name xml Programacion de tareas periodicas Editar Scheduling a function to be executed every 2 seconds var uuid system setInterval myJavaScriptFunction parameterValue 2000 Stopping the above scheduled task system clearInterval uuid Envio de e mail mensaje de correo e Editarfunction sendEmail var email new Email host port username password var file new File 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 bcc email 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 Referencias EditarVease tambien EditarMashup ECMAScript for XML Web scraping Web Harvest Yahoo Pipes Yahoo Query Language YQL Enlaces externos Editar en ingles Pagina de inicio de Proyecto WSO2 en ingles Computerworld Opinion WSO2 Mashup Server takes first steps en ingles ZDNet A Bumper Crop of New Mashup Platforms en ingles SDTimes Mashups are Poised for a Business Outbreak en ingles SOA Magazine Mashups Bringing SOA to the People en ingles Web Harvest en SourceForgeNota Editar Esta obra contiene una traduccion derivada de WSO2 Mashup Server de la Wikipedia en ingles publicada por sus editores bajo la Licencia de documentacion libre de GNU y la Licencia Creative Commons Atribucion CompartirIgual 3 0 Unported Datos Q7955818Obtenido de https es wikipedia org w index php title WSO2 Mashup Server amp oldid 129041307, wikipedia, wiki, leyendo, leer, libro, biblioteca,

español

, española, descargar, gratis, descargar gratis, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, imagen, música, canción, película, libro, juego, juegos