Skip to main content

Posts

Showing posts from July, 2012

Customizing WSO2 API Store/Publisher App-Part2

From the Part 1 of this tutorial[1], we discussed on overview of API-Store and its directory structure.This tutorial will be focus on the flow of how a user request is handle by API Store web-application front-end and a example to try out. Browser Request Flow of the API-Store Front-end Below image will explain the flow of browser request processing happened inside the API-Store jaggery application.Similarily API-Publisher jaggery application will also handle browser requests. When a user access the API Store/Publisher application through the web-browser,that request will first hit on the relevant page located at 'site/pages' directory in API-Store/Publisher.Then inside that page,to handle the rendering of the web page,it'll call the render() function defined in jagg.jag file resides on location 'jagg/jagg.jag' inside the both applications. To invoke that render() method,we are passing a json string which contains the base page name,page body layout na

Customizing WSO2 API Store/Publisher App-Part1

Up to now,hope most of the audience is familiarized with writing java web applications. Now it's time to write a complete javascript based web application with the help of Jaggery. Jaggery Jaggery is a Server Side Javascript Framework to write web-applications and HTTP-focused web services for all aspects of the application:front-end, communication, server-side logic and persistence in pure javascript. It offers a completely javascript way to write all parts of Web applications and services as a way to reduce/eliminate mismatches across different layers of the Web application and API development experience. Such that it provides closing the gap between web apps from web services by allowing one to create both application and APIs at the same time.For more information visit the site [1] ,which contains more information,API documentation and samples of it. This article will focus on how to write a web application with Jaggery. For that as a real use-case,it'll focus on t

Validating WSDLs

WSDL : It stands for Web Services Description Language.It's a document written in XML.The document describes a web service.It specifies the location of the service and the operations(or methods) the service expose. There are two versions of WSDLs as WSDL1.0 and WSDL2.0.This blog post will explain how you can validate those two types of WSDLs To validate WSDL 1.0 you can get support of WSDL4J library support and it can be done as follow java code snippet.Relevant  wsdl4j API can be found at here .      javax.wsdl.xml.WSDLReader wsdlReader10 =                                             javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();     wsdlReader10.readWSDL(wsdlUrl); To validate WSDL2.0 ,you can get support of apache Wooden library and it can be done as following java code snippet.Relevant wooden API can be found  at  here .          org.apache.woden. WSDLReader wsdlReader20                                    = org.apache.woden. WSDLFactory

Applying a WSDL from a local entry to a proxy service in WSO2 ESB

Local Entry (Local Registry Entry) The local registry acts as a memory registry where an user can store text strings, XML strings, and URLs.  Local entries can be used to hold various configuration elements required by sequences and proxy services. Usually they are used to hold WSDLs, XSDs, XSLT files etc. A local entry can contain XML content as well as plain text content. A local entry can be configured to load content from a  remote file too. WSO2 ESB allows to add new local entries easily using user interface configuration From this blog,I'll explain  how to attach a WSDL to a proxy service from local registry. Note that you can keep a WSDL as a local entry. But it is recommended to keep wsdls in the registry instead, for easier and better management. Below steps will explainhow to add a WSDL from a local entry to a proxy service. Extract WSO2 ESB downloaded pack and start it. Log-in to ESB admin-console. Create the local entry for WSDL. Navigate to ESB_

How Facebook Orders Your Search Results

When I logged in to Facebook [when I'm free ;)] and tries to search about a friend ,I always notice some names will listed down with a order very fastly. Have you ever wondered how Facebook orders your search results? Clearly they have some ordering about who they think you are looking for, and they seem to guess pretty well.Facebook order it based on who you interact with, whose profile you look at and who you have recently become friends with.To verify this with a book-marklet ,refer this interesting blog .