Showing posts with label WSO2 Gadget Server. Show all posts
Showing posts with label WSO2 Gadget Server. Show all posts

Sunday, November 20, 2011

SOAP Request Gadget with WSO2 Gadget Server

The duty of this gadget is to invoke a SOAP Web Service.

The installation guide of the WSO2 Gadget Server can be found here. The guide to write and deploy a gadget in the WSO2 Gadget Server can be found here

First the soap web service should be startup

i have used the helloService of axis2. (Start the axis2 server in order to use it)

Use the following and deploy it in WSO2 Gadget Server.

<?xml version="1.0" encoding="UTF-8" ?> 
    <Module> 
    <ModulePrefs title="hello world example"> 
    <Require feature="wso2.soap"/> 
    </ModulePrefs> 
    <Content type="html"> 
    <![CDATA[
    <div id=response-disp></div>
 
<script>
function doSOAPCall(){
    var endpoint = "http://localhost:8081/axis2/services/SimpleService.SimpleServiceHttpSoap12Endpoint/";
    var payload = ' <p:helloService xmlns:p="http://sample"> <p:msg>SOAP Request </p:msg> </p:helloService>';
    var operation = "urn:helloService";
    document.getElementById("response-disp").innerHTML = wso2.io.makeSOAPRequest(endpoint, operation, payload);
}
gadgets.util.registerOnLoadHandler(doSOAPCall);
    </script> 
    ]]> 
    </Content> 
    </Module> 



Tuesday, September 27, 2011

OpenSocial 2.0 - The web is better when it is Social

The OpenSocial 2.0 spec has been announced, and it s the time to identify the major improvements and changes.

Activity streams support -  social activities are defined in a simple actor / object / target format.

Embedded experiences - Embedded experiences allow application developers to embed content from their applications inside OpenSocial 2.0 containers.  Containers and gadgets which support embedded experiences will recognize this data model and can choose to render the embedded experience. (data model is the way to represent an embedded experience in JSON or XML).

Deprecated support for ATOM - the community has decided to deprecate support for ATOM.

Simplified gadget format

New incubating API
OAuth 2 Support (Support for OAuth 1.0a is still included in the OpenSocial 2.0 specification and has not been deprecated.)

Read more about OpenSocial 2.0

Embedded experience tutorial can be found here

Friday, September 23, 2011

Writing and Deploying the Hello World Gadget with WSO2 Gadget Server

This post is about writing the first gadget (Hello World gadget ) with WSO2 gadget server. WSO2 Gadget Server allows Google Gadgets to be developed and deployed in a simple, decentralized manner.

Installing on Linux
  1. Download the WSO2 Gadget Server binary distribution.
  2. Extract the zip archive. e.g., unzip wso2gs-1.4.0.zip
  3. Execute the WSO2 Gadget Server starting script. e.g., wso2gs-1.4.0/bin;  ./wso2server.sh
  4. Check your WSO2 Gadget Server instance using the URL https://localhost:8443/carbon/ 
 https://192.168.1.2:8443/carbon/

Here is the complete guide for the installation of WSO2 Gadget Server


Type the following credentials
Username : admin
Password : admin

Use a text editor and write the following code

The HelloWorld Gadget
The hello world gadget is the simplest of its kind and contains only XML and HTML.
 
<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="hello world example" /> 
  <Content type="html">
     <![CDATA[ 
       Hello, world!
     ]]>
  </Content> 
</Module>
 
Save the file as "HelloWorld.xml"
 
 
Select Gadget repository from the "WSO2 Gadget Server Home" page
 

  
 
Click "Add New Gadget"
 
 
  
There are four options to add a gadget 
  1. Gadget Url
  2. File Path 
  3. Registry path
  4. Zip File Path 
     
     Select File Path option in order to deploy the HelloWorld gadget (HelloWorld.xml)
    Click Add Gadget . Select View Portal from the left side menu of WSO2 Gadget Server
     
    Congratulations !!!  the HelloWorld Gadget is ready now !!!!
    
    





























































































Using Zotero for academic writing