Posts

Showing posts from 2009

Invoking WebServices using Axis2 SMS Transport

In a previous blog I have explained the overview design of the Axis2 SMS Transport. Since Last week Axis2 Transport team announced Axis2 Transport 1.0 release in which SMS transport got released. I think its time to give some examples on how to use the SMS transport. SMS Transport currently have two SMS implementations SMPP protocol implementation GSM implementation where SMPP protocol implementation allow you to connect the axis2 to a SMSC and get messages form it. And GSM implementation allow you to connect a simple GSM modem to the computer that Axis2 is running and use that to send receive SMS form Axis2( its recommended not to use GSM implementation when your message traffic is higher than 6msgs per min). SMS Transport allow Axis2 users to do following Invoke a in only Web Service operation using a SMS Invoke a in out Web service operation and receive a reply Use Axis2 client and send messages out as a SMS In this blog I 'll discuss how to use SMS T

Semaphores explained -- A Java approch

Image
Semaphore can be considered as a variable or Data Structure that can be used to archive mutual exclusion in a Parallel Programming environment. One good real life example to explain this is the tablet mechanism that is used in old railway system. Where when a train enters a Train Station it need to get a tablet from the Station master to proceed to the next station. When the train get the tablet that means there will be no other train in the railway track till it reaches the next station. When The train arrived to the next station it must give back the tablet to the station master so that he can signal the station that train has come from that line is cleared now (line is clear ) So getting a tablet is like acquiring a lock in the train line so that other trains that are in need of acquiring the line need to wait till the train reaches the next station and release the lock ( give the tablet back). This signal system still in use in Sri Lanken Railway line in some parts where the

Executing maven test with the ant run plugin--A Real experiance.

Few days back i got a unexpected result with using the maven ant run task with a patch i submitted for the unit tests for the SMS Transport(which is my GSoC project).So i thought it would be useful if i blog my experiance and how i solved that issue. So i'll start with my xml segment in the pom. <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-antrun-plugin</artifactid> <executions> <execution> <id>build-repo</id> <phase>test-compile</phase> <configuration> <tasks> <mkdir dir="target/test-resources/samples/conf"> <mkdir dir="target/test-resources/samples/repository/modules"> <mkdir dir="target/test-resources/samples/repository/services"> <mkdir dir="targ

Chandi jaisa rang hai tera- My favorite Gazal

Gazal is a beautiful Hindustan music style which have lot of great songs.the most important thing about gazal style is most of the songs can be enjoyed even without having a classical music background.Most of the gazals are written about romance.It carries "Srungara Rasa" with it. The Gazal song Chandi jaisa rang hai thera is a gazal that admire the beauty the girl that he loves. Chandi jaisa rang hai tera, sone jaise baal Ek tuhi dhanvaan hai gori, baaki sub kangaal Chandi jaisa rang hai tera, sone jaise baal Ek tuhi dhanvaan hai gori, baaki sub kangaal Ek tuhi dhanvaan hai gori, baaki sub kangaal Jis reste se tu gujre, voh phoolon se bhar jaye Jis reste se tu gujre, voh phoolon se bhar jaye Tere pair ki komal aahat sote bhaag jagaye Jo patthar choo le gori tu voh heera ban jaye Tu jisko mil jaye voh, tu jisko mil jaye Vo ho jaye malamal Ek tuhi dhanvaan hai gori, baaki sub kangaal Chandi jaisa rang hai tera, sone jaise baal Ek tuhi dhanvaan hai gori, baaki sub kangaal Jo be

Axis2 SMS Transport

Image
Apache Axis2 is an opensource framework for webservices which is widely used today ,and its implementation is available in both java and c. Axis2 is independent of the underlying transports which takes the Messages to it.Axis2 Engine is concentrating on the SOAP processing. Users can select transports to suite their requirement and that transports are responsible for injecting Axis2Messages to the Axis2Engine.So Axis2 Engine is dealing only with this Axis2MessageContex build from the underlying transport framework. I' m writing SMS Transport as my Google Summer of Code 2009 project for Apache Axis2 which is a project focusing on implementing a SMPP support for Axis2java (And also it will able be used in Apache Synapse too Since Synapse uses the same axis2Transports ) by which Axis2 will be able to communicate with SMSCs (Short message service centers) or Any other Message centers that support SMPP . And also in this project it will make enable axis2 to communicate with Simple GSM

Spot Light to Service Component Architecture

Image
If we take a Normal Software application it will be consist of Many components.Where they may be developed using a same technology or different technologies.And also they may be deployed in a Same runtime ,machine or different ones and communicating with each other using a same technology or different technologies. SCA (Service component Architecture) defines how these components are created and how they are assembled together to build composites.It is a programing model build based on the SOA. According to the SCA specification SCA applications can be implemented using many technologies like Java ,Spring ,C++ etc ... SCA defines how these components built using any technology can be Assembled to built a application. A Simple example of a Component assembled to build a Application would be a Simple Java Application with few classes communicating with each other in a Single JVM.Or in a More Complex case it will be set of Web Services working together to build up a Custom Service . SCA C

Configuring Apache Synapse - Spring With IDE support

Image
Apache Synapse uses its own XML based DSL for Configuration.At the Synapse Initialising phase Synapse reads the XML file and Build the Synapse Configuration Object Structure. It takes time to new users to be familiar with the Synapse Configuration language.Some times they may have to look in to the synapse configuration factories to know the all the configuration parameters. Spring-DSL for synapse project enable users who are familiar with Spring syntax to configure synapse in Spring (both underlying Axis2 instence and Synapse) One of the main advantages here is users being able to configure synapse using IDE support . Following are few Screen shots taken from the comming tutorial on Spring DSL for Synapse

Apache Synapse Spring Mediator -(Feel the power of Apache Synapse)

Image
Apache Synapse is a Ligh t weight ESB from Apache which supports XML webservies. And also it is a very extendible project[1]. Massage mediation is a core mode in Synapse. When in massage mediation mode Synapse act as a transparent proxy for clients. And also if Synapse receives a massage that does not belongs to any of the proxy services it will go through massage mediation[2] defined. Synapse has Components named as Mediators witch can perform mediation action on the Message(MessageContext).Mediators get the full control over the message that is passing through it. Mediator can modify and inspect message or do something by looking at the message body. Since Synapse supports writing custom mediators the possibilities of usage of Mediators become unlimited. Synapse Spring Mediator is a Mediator which enables Spring users to expose their Spring Beans as Mediators in Synapse. Following is a example of how to use Spring Mediator First thing we have to do is write a simple Bean