tag:blogger.com,1999:blog-30242032294979513322024-03-29T08:59:44.258+05:30Manan PanchalLoves for being alive...Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3024203229497951332.post-20352158991945542552014-04-29T15:11:00.001+05:302014-12-12T17:54:50.570+05:30Ze Framework - A powerful but lightweight java framework for web applications<div dir="ltr" style="text-align: left;" trbidi="on">
Hi...<br/>
<br/>
I have developed a java web application framework. Name of the framework is "Ze Framework". <br/>
The framework is developed by considering two basic request from browser.<br/>
<br/>
[1] Requesting to view a web page. (e.g. Clicking on a page link).<br/>
[2] Submitting form data to server to be processed. (e.g. Hitting submit button).<br/>
<br/>
When a user requesting to view a web page, we called it here as "View" event. And when user submitting some data, we called it as "Action" event.<br/>
<br/>
We know that "View" event can be occurred independently, but "Action" event always followed by "View" event.<br/>
<br/>
Here, I have separated the "View" event and "Action" event. <br/>
<br/>
<br/>
"View" event:<br/>
<br/>
What do we need to implement "View" event? We need a loader class which loads that data what are going to be displayed later. The loader class loads the data and sets it into models classes. Now, JSP fetches the models' data to display on browser.<br/>
So, we need three component to fulfill the event: (1) A loader class (2) Some model classes (3) A JSP page.<br/>
<br/>
So, now we need a configuration xml file in which we can map all this to a "View" event. The config file is based on an xsd. The framework parses the config file using JAXB, so we need that xsd along with the config xml.<br/>
<br/>
"Action" event:<br/>
<br/>
What do we need to implement "Action" event?. We need a handler class which processes the submitted data. But, how would we get that submitted data into handler? The framework populates that submitted data into model classes. The handler gets data from the models and processes it. After processing, user need to view some page, so it is actually a "View" event. The handler needs to return a "View" event name, by which the framework kick starts that "View" event and the whole above described stuff for "View" event would going on and user would see a web page.
So, we need two components to fulfill the event: (1) Some model classes (2) A handler class.<br/>
<br/>
We can configure with the framework that a "View" event succeeded by an "Action" event are to be dispatched or to be sent redirect.<br/>
<br/>
What if an exception occurs while executing an application developed using the framework? To solve this, the framework has a mechanism. There is an exception handler class and a JSP page we can configure with an exception. When the configured exception or its base exception would be thrown the handler class would be called by the framework and after finishing execution of the handler class the JSP page would be dispatched. The exception information can be displayed on the JSP by custom tags of the framework.<br/>
<br/>
We can configure validator chain for an "Action" event. The validator validate form data populated in models and if there are some validation errors it populates the errors in error list and returns true or false to the framework. If it returns true the framework calls next validator in the validator chain other otherwise not. The validation errors will be displayed by the custom tags on web page later.<br/>
<br/>
We can configure validator chain for a "View" event. The validator validates that the view is eligible to be displayed or not. If not than the validator returns other view name instead of current and the other "View" event occurs. But, if the validator returns null then next validator would be called in the validator chain.<br/>
<br/>
We can configure application initializer and application destroyer classes. The classes would be called when application context initialized and destroyed respectively. There are an other configuration too. We can configure a processing tube class which would be called on each "View" or "Action" event.<br/>
<br/>
The framework would generate conversation errors if form data are not the type of mapped model properties. It will be displayed by the custom tags on web page later.<br/>
<br/>
User can generate application messages in any place of application. It will be displayed by the custom tags on web page later.<br/>
<br/>
Other features of the framework:<br/>
<br/>
[1] Model classes for an event ("View" or "Action") can be more than one.<br/>
[2] Model class can have below type of properties:<br/>
(1) int, long, short, boolean, char, double, float<br/>
(2) java.lang.Integer, java.lang.Long, java.lang.Short, java.lang.Boolean, java.lang.Character, java.lang.Double, java.lang.Float<br/>
(3) java.lang.String, java.util.Date<br/>
(4) Any user defined object<br/>
(5) Array of above all type (1) to (4)<br/>
[3] User defined object property of a model can have any of above type (1) to (5)<br/>
[4] The framework provides expressions by which JSP page can fetch data from any depth of model's properties.<br/>
[5] A JSP can read data of type (1), (2), (3) and (5) from model using the expressions. The last property should not be (4)th type.<br/>
[6] When user inputs some data into form, the data is in string format. But, the framework can convert that data into above types except (4). To convert data we just need to map that property with the input filed of the form.<br/>
[7] An enough set of custom tags which are used:<br/>
- to fetch model data to be displayed, to set model data to be processed later<br/>
- to create html forms, input fields, links, buttons etc<br/>
- to display application messages, conversation errors, validation errors<br/>
- to loop for some integer variable<br/>
- to define variable and assign some value to it<br/>
- to display exception info<br/>
<br/>
Please, find the code, binary, example apps, tutorial and control flow diagram of the framework here <a href="http://sourceforge.net/projects/zeframework/">http://sourceforge.net/projects/zeframework/</a>.<br/>
Please, mail me on zeframework@gmail.com for your suggestions and bugs.<br/><br/>
For, detailed tutorial about the framework, please go to: <a href="http://zeframework.blogspot.in/">http://zeframework.blogspot.in/</a>
<br/><br/>
Thanks
<br/><br/>
<iframe width='180' height='260' src='https://wizpert.com/wizapi/widget?beta_key=3ba42&ep=38867&size=standard&topic_slug=java-programming' frameborder='0' scrolling='no' allowfullscreen></iframe>
</div>Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com79tag:blogger.com,1999:blog-3024203229497951332.post-15022407329044417532011-09-14T18:40:00.018+05:302011-09-15T00:00:19.292+05:30Simple JNI ExampleHello,<br />
This is a simple JNI example on Windows.<br />
Tested with: MingW, Windows XP, Java 6<br />
<br />
Create a java file Hello.java<br />
<br />
<pre>public class Hello {
static {
System.loadLibrary("hello");
}
public native void sayHello();
public static void main(String args[]) {
Hello hello=new Hello();
hello.sayHello();
}
}
</pre><br />
Compile the file and get Hello.class file<br />
<br />
Execute the command. This will find native methods in the class and create appropriate declaration in C language in Header file. This will generate Hello.h file<br />
<br />
<pre>javah -jni Hello
</pre><br />
Hello.h file looks like this<br />
<br />
<pre>/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class Hello */
#ifndef _Included_Hello
#define _Included_Hello
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: Hello
* Method: sayHello
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_Hello_sayHello(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
</pre><br />
Now implement the header file's declared method. For that we have to create a C file.<br />
<br />
Hello.c<br />
<br />
<pre>#include <jni.h>
#include <stdio.h>
#include <conio.h>
#include "Hello.h"
JNIEXPORT void JNICALL Java_Hello_sayHello(JNIEnv * env, jobject jobj)
{
printf("Hello World");
}
</pre><br />
We have implemented method in C which is declared as native in Java.<br />
We will compile the C file and generate dll which will be used by Hello.class, see the line System.loadLibrary("hello");<br />
<br />
Running the command will generate hello.dll file<br />
<br />
<pre>gcc -Wl,--add-stdcall-alias -I <JAVA_HOME>/include -I <JAVA_HOME>/include/win32 Hello.c -shared -o hello.dll
</pre><br />
"-Wl" is an option with which we can pass linker options to gcc separating by commas.<br />
"--add-stdcall-alias" is a linker option. <br />
The option prevents linker error like: "java.lang.UnsatisfiedLinkError: Hello.sayHello()V".<br />
"-I" will search for included files in specified directories.<br />
"-shared" will generate shared library.<br />
"-o" specifies name of output file.<br />
<br />
Now simply run the class file.<br />
<br />
<pre>java Hello
</pre><br />
You might get "Hello World" as output.Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com9tag:blogger.com,1999:blog-3024203229497951332.post-53959480653656556022010-06-23T16:18:00.056+05:302014-12-12T17:49:27.308+05:30JAX-WS Client to call Webservice secured with XWS-Security (plain text password)<div dir="ltr" style="text-align: left;" trbidi="on">
Hello,<br />
<br />
We will learn webservice client with security by a example, which can fetch data and save data using usernametoken security. For this we have some requirements, but you can use other build tool, it may require little more efforts.<br />
<br />
This JAX-WS Client is to call the Webservice defined in <a href="http://mananvpanchal.blogspot.com/2010/06/jax-ws-webservice-with-plaintext.html">previous post</a>.<br />
<br />
Requirements:<br />
<br />
• jdk1.6, maven 2<br />
<br />
• This is tested on jdk1.6.0_18, apache-maven-2.0.9.<br />
<br />
Here, some steps to follow...<br />
<br />
• Create "Webservice Client" folder.<br />
<br />
• Create "work" under "Webservice Client".<br />
<br />
• Create below files under "work".<br />
<br />
This file contains information of handler like soap handler and logical handler to intercept request and response of webservice.<br />
We will use only one soap handler to secure webservice.<br />
<br />
• handlers.xml<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
<jws:handler-chain>
<jws:handler>
<jws:handler-class>com.samplews.person.handler.SecuritySOAPHandler</jws:handler-class>
</jws:handler>
</jws:handler-chain>
</jws:handler-chains></pre>
<br />
This file specifies which type of security we requires like username token, signed message, encrypted message, etc.<br />
We will use username token with plain text password security.<br />
<br />
• security-config.xml<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config" dumpMessages="true">
<xwss:UsernameToken digestPassword="false" useNonce="false"/>
</xwss:SecurityConfiguration></pre>
<br />
The xjb file specifies in which package the generated java classes resides for given targetnamespace of xsd specified in schema location.<br />
<br />
• person.xjb<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
<jaxb:bindings schemaLocation="http://localhost:8080/personwsapp-1.0/PersonWSService?xsd=1" node="/xsd:schema">
<jaxb:schemaBindings>
<jaxb:package name="com.samplews.person.beans"/>
</jaxb:schemaBindings>
</jaxb:bindings>
</jaxb:bindings></pre>
<br />
• Change that schema location in xjb file appropriate to your configuration.<br />
<br />
• Navigate to "Webservice Client" on command prompt.<br />
<br />
• Execute the command. This will create a maven project under "Webservice Client".<br />
<br />
<pre>mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.samplews.person -DartifactId=personwsclientapp</pre>
<br />
• Replace generated pom.xml with this.<br />
<br />
• pom.xml<br />
<br />
<pre><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.samplews.person</groupId>
<artifactId>personwsclientapp</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>personwsclientapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.wss</groupId>
<artifactId>xws-security</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
<mainClass>com.samplews.person.service.CallPersonWS</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>xws-security</groupId>
<artifactId>xws-security</artifactId>
<version>1.0</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.3.2</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>javax.xml.soap</groupId>
<artifactId>saaj-api</artifactId>
<version>1.3</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>com/samplews/person/service</targetPath>
<directory>../work</directory>
<includes>
<include>handlers.xml</include>
</includes>
</resource>
<resource>
<targetPath>com/samplews/person/handler</targetPath>
<directory>../work</directory>
<includes>
<include>security-config.xml</include>
</includes>
</resource>
</resources>
</build>
</project></pre>
<br />
• Create "generated" under "Webservice Client".<br />
<br />
• Nevigate to "Webservice Client" on command prompt.<br />
<br />
• Execute the cammand. This will generates client stuff for the webservices. <br />
Change that url according to your configuration.<br />
<br />
<pre>wsimport http://localhost:8080/personwsapp-1.0/PersonWSService?wsdl -b work/person.xjb -d generated -s personwsclientapp/src/main/java</pre>
<br />
• Add @HandlerChain(file = "handlers.xml") to com/samplews/person/service/PersonWSService.java.<br />
<br />
• Put this source files under appropriate package.<br />
<br />
This is client to call webservice.<br />
<br />
• CallPersonWS.java<br />
<br />
<pre>package com.samplews.person.service;
import com.samplews.person.beans.*;
public class CallPersonWS {
public static void main(String args[]) {
PersonWSService service = new PersonWSService();
PersonWS port=service.getPersonWSPort();
PersonFetchRequest request=new PersonFetchRequest();
request.setId(1);
PersonDetail response=port.fetch(request);
System.out.println(response.getId());
System.out.println(response.getName());
System.out.println(response.getPhoneNo());
System.out.println(response.getEmail());
}
}</pre>
<br />
This is soap handler which we have defined in handlers.xml file. The handler intercept request and response as SOAPMessage.<br />
<br />
• SecuritySOAPHandler.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.ProcessingContext;
import com.sun.xml.wss.XWSSProcessor;
import com.sun.xml.wss.XWSSecurityException;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.WebServiceException;
import java.util.HashSet;
import java.util.Set;
public class SecuritySOAPHandler implements SOAPHandler<SOAPMessageContext> {
public Set<QName> getHeaders() {
return new HashSet<QName>();
}
public boolean handleMessage(SOAPMessageContext soapMessageContext) {
try {
boolean outMessageIndicator = (Boolean) soapMessageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (outMessageIndicator) {
XWSSProcessor xwssProcessor = SecurityConfigProcessorFactory.getXWSSProcessor();
SOAPMessage message = soapMessageContext.getMessage();
ProcessingContext context = xwssProcessor.createProcessingContext(message);
context.setSOAPMessage(message);
SOAPMessage securedMsg = xwssProcessor.secureOutboundMessage(context);
soapMessageContext.setMessage(securedMsg);
}
} catch (XWSSecurityException ex) {
throw new WebServiceException(ex);
}
return true;
}
public boolean handleFault(SOAPMessageContext soapMessageContext) {
return true;
}
public void close(MessageContext messageContext) {
}
}</pre>
<br />
• SecurityConfigProcessorFactory.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.XWSSProcessor;
import com.sun.xml.wss.XWSSProcessorFactory;
import com.sun.xml.wss.XWSSecurityException;
import java.io.InputStream;
public class SecurityConfigProcessorFactory {
protected static XWSSProcessor xwssProcessor;
public static XWSSProcessor getXWSSProcessor() throws XWSSecurityException {
if (xwssProcessor == null) {
InputStream serverConfig = SecurityConfigProcessorFactory.class.getResourceAsStream("/com/samplews/person/handler/security-config.xml");
XWSSProcessorFactory factory = XWSSProcessorFactory.newInstance();
xwssProcessor = factory.createProcessorForSecurityConfiguration(serverConfig, new SecurityCallbackHandler());
}
return xwssProcessor;
}
}</pre>
<br />
<br />
The framework passes callbacks according to "security-config.xml".<br />
<br />
• SecurityCallbackHandler.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.impl.callback.PasswordCallback;
import com.sun.xml.wss.impl.callback.UsernameCallback;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.IOException;
public class SecurityCallbackHandler implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (Callback callback : callbacks) {
if (callback instanceof UsernameCallback) {
((UsernameCallback)callback).setUsername("manan");
} else if (callback instanceof PasswordCallback) {
((PasswordCallback)callback).setPassword("panchal");
} else {
throw new UnsupportedCallbackException(callback);
}
}
}
}</pre>
<br />
• Navigate to "personwsclientapp" on command prompt.<br />
<br />
• Execute the command. This will package the classes into jar under "target".<br />
<br />
<pre>mvn package</pre>
<br />
• You may have to download and install activation.jar into repository, follow instruction of maven. <br />
After installing the jar try "mvn clean package" which clears all previous stuff.<br />
<br />
• Navigate to "target" on command prompt.<br />
<br />
• Execute the command. This will run the "CallPersonWS".<br />
<br />
<pre>java -jar personwsclientapp-1.0.jar</pre>
<br />
• Note: The jar is dependent of lib directory.<br />
<br />
I think this would help. Please put suggestions if this not helping you, so I can improve this. <br />
Thanks...
<br />
<iframe allowfullscreen="" frameborder="0" height="260" scrolling="no" src="https://wizpert.com/wizapi/widget?beta_key=3ba42&ep=38867&size=standard&topic_slug=java-programming" width="180"></iframe></div>Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com0tag:blogger.com,1999:blog-3024203229497951332.post-30368304197129492152010-06-02T15:30:00.069+05:302014-12-12T17:50:12.229+05:30JAX-WS Webservice secured With XWS-Security (plain text password)<div dir="ltr" style="text-align: left;" trbidi="on">
Hello,<br />
We will learn webservice with security by a example, which fetch data and save data using usernametoken security. For this we have some requirements, but you can use other server or other build tool, it may require little more efforts.<br />
<br />
Requirements:<br />
<br />
• jdk1.6, glassfish, maven 2<br />
<br />
• This is tested on jdk1.6.0_18, glassfish v2-ur1, apache-maven-2.0.9.<br />
<br />
Here, some steps to follow...<br />
<br />
• Create "Webservice" folder.<br />
<br />
• Create "work" under "Webservice".<br />
<br />
• Create below files under "work".<br />
<br />
• person.xsd<br />
<br />
First we have to determine what we want to send and what we want back from webservice so for that purpose we have to define a xsd file.<br />
The fetch request contains only id and we will get detail information.<br />
The save request carries detail of person and we will get response message of success or failure.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.samplews.com/person/beans"
elementFormDefault="qualified" xmlns:tns="http://www.samplews.com/person/beans">
<xsd:complexType name="PersonDetail">
<xsd:sequence>
<xsd:element name="Id" type="xsd:int"/>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Address" type="tns:Address"/>
<xsd:element name="PhoneNo" type="xsd:decimal"/>
<xsd:element name="Email" type="xsd:string"/>
<xsd:element name="BirthDate" type="xsd:date"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PersonSaveResponse">
<xsd:sequence>
<xsd:element name="Status" type="xsd:boolean"/>
<xsd:element name="Message" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PersonFetchRequest">
<xsd:sequence>
<xsd:element name="Id" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Address">
<xsd:sequence>
<xsd:element name="Line1" type="xsd:string"/>
<xsd:element name="Line2" type="xsd:string"/>
<xsd:element name="Line3" type="xsd:string"/>
<xsd:element name="City" type="xsd:string"/>
<xsd:element name="Pincode" type="xsd:decimal"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema></pre>
<br />
• person.xjb<br />
<br />
The xjb file specifies in which package the generated java classes resides for given targetnamespace of xsd specified in schema location.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
<jaxb:bindings schemaLocation="person.xsd" node="/xsd:schema">
<jaxb:schemaBindings>
<jaxb:package name="com.samplews.person.beans"/>
</jaxb:schemaBindings>
</jaxb:bindings>
</jaxb:bindings></pre>
<br />
• web.xml<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app></pre>
<br />
• handlers.xml<br />
<br />
This file contains information of handler like soap handler and logical handler to intercept request and response of webservice.<br />
We will use only one soap handler to secure webservice.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
<jws:handler-chain>
<jws:handler>
<jws:handler-class>com.samplews.person.handler.SecuritySOAPHandler</jws:handler-class>
</jws:handler>
</jws:handler-chain>
</jws:handler-chains></pre>
<br />
• security-config.xml<br />
<br />
This file specifies which type of security we requires like username token, signed message, encrypted message, etc.<br />
We will use username token with plain text password security.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config" dumpMessages="true">
<xwss:RequireUsernameToken passwordDigestRequired="false" nonceRequired="false"/>
</xwss:SecurityConfiguration></pre>
<br />
• Navigate to "Webservice" on command prompt.<br />
<br />
• Execute the command. This will create a maven project under "Webservice".<br />
<br />
<pre>mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.samplews.person -DartifactId=personwsapp</pre>
<br />
• Replace generated pom.xml with this.<br />
<br />
• pom.xml<br />
<br />
<pre><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.samplews.person</groupId>
<artifactId>personwsapp</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>personwsapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.wss</groupId>
<artifactId>xws-security</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<webXml>../work/web.xml</webXml>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>com/samplews/person/service</targetPath>
<directory>../work</directory>
<includes>
<include>handlers.xml</include>
</includes>
</resource>
<resource>
<targetPath>com/samplews/person/handler</targetPath>
<directory>../work</directory>
<includes>
<include>security-config.xml</include>
</includes>
</resource>
</resources>
</build>
</project></pre>
<br />
• Navigate to "work" on command prompt.<br />
<br />
• Execute the command.<br />
<br />
This command generates java classes according to xsd and configuration of xjb which we will use to pass into and to return from webservice. This will generates beans classes packaged in "com.samplews.person".<br />
<br />
<pre>xjc person.xsd -b person.xjb -d ..\personwsapp\src\main\java</pre>
<br />
• Put this source files under appropriate packages under "personwsapp\src\main\java".<br />
<br />
This is the webservice class.<br />
<br />
• PersonWS.java<br />
<br />
<pre>package com.samplews.person.service;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.HandlerChain;
import java.math.BigDecimal;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.DatatypeConfigurationException;
import com.samplews.person.beans.*;
@WebService(name = "PersonWS", serviceName = "PersonWSService", portName = "PersonWSPort", targetNamespace = "http://www.samplews.com/person/service")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
@HandlerChain(file = "handlers.xml")
public class PersonWS {
public PersonWS() {
}
@WebMethod(operationName = "Fetch")
@WebResult(name = "PersonFetchResponse", targetNamespace = "http://www.samplews.com/person/beans", partName = "PersonFetchResponse")
public PersonDetail fetch(@WebParam(name = "PersonFetchRequest", targetNamespace = "http://www.samplews.com/person/beans", partName = "PersonFetchRequest")PersonFetchRequest request) {
PersonDetail response=new PersonDetail();
response.setId(request.getId());
response.setName("testperson");
Address address=new Address();
address.setLine1("Line1");
address.setLine2("Line2");
address.setLine3("Line3");
address.setCity("Mahemdabad");
address.setPincode(new BigDecimal("387130"));
response.setAddress(address);
response.setEmail("testperson@testemail.com");
response.setPhoneNo(new BigDecimal("9999999999"));
try {
response.setBirthDate(DatatypeFactory.newInstance().newXMLGregorianCalendar("1985-01-11"));
} catch(DatatypeConfigurationException ex) {
ex.printStackTrace();
}
return response;
}
@WebMethod(operationName = "Save")
@WebResult(name = "PersonSaveResponse", targetNamespace = "http://www.samplews.com/person/beans", partName = "PersonSaveResponse")
public PersonSaveResponse save(@WebParam(name = "PersonSaveRequest", targetNamespace = "http://www.samplews.com/person/beans", partName = "PersonSaveRequest")PersonDetail request) {
PersonSaveResponse response=new PersonSaveResponse();
response.setStatus(true);
response.setMessage("Person with Id:"+request.getId()+" saved.");
return response;
}
}</pre>
<br />
This is soap handler which we have defined in handlers.xml file. The handler intercept request and response as SOAPMessage.<br />
<br />
• SecuritySOAPHandler.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.ProcessingContext;
import com.sun.xml.wss.XWSSProcessor;
import com.sun.xml.wss.XWSSecurityException;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.WebServiceException;
import java.util.HashSet;
import java.util.Set;
public class SecuritySOAPHandler implements SOAPHandler<SOAPMessageContext> {
public Set<QName> getHeaders() {
QName securityHeader = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security", "wsse");
HashSet<QName> headers = new HashSet<QName>();
headers.add(securityHeader);
return headers;
}
public boolean handleMessage(SOAPMessageContext soapMessageContext) {
try {
boolean outMessageIndicator = (Boolean) soapMessageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (!outMessageIndicator) {
XWSSProcessor xwssProcessor = SecurityConfigProcessorFactory.getXWSSProcessor();
SOAPMessage message = soapMessageContext.getMessage();
ProcessingContext context = xwssProcessor.createProcessingContext(message);
context.setSOAPMessage(message);
SOAPMessage verifiedMsg = xwssProcessor.verifyInboundMessage(context);
soapMessageContext.setMessage(verifiedMsg);
}
} catch (XWSSecurityException ex) {
throw new WebServiceException(ex);
}
return true;
}
public boolean handleFault(SOAPMessageContext soapMessageContext) {
return true;
}
public void close(MessageContext messageContext) {
}
}</pre>
<br />
• SecurityConfigProcessorFactory.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.XWSSProcessor;
import com.sun.xml.wss.XWSSProcessorFactory;
import com.sun.xml.wss.XWSSecurityException;
import java.io.InputStream;
public class SecurityConfigProcessorFactory {
protected static XWSSProcessor xwssProcessor;
public static XWSSProcessor getXWSSProcessor() throws XWSSecurityException {
if (xwssProcessor == null) {
InputStream serverConfig = SecurityConfigProcessorFactory.class.getResourceAsStream("/com/samplews/person/handler/security-config.xml");
XWSSProcessorFactory factory = XWSSProcessorFactory.newInstance();
xwssProcessor = factory.createProcessorForSecurityConfiguration(serverConfig, new SecurityCallbackHandler());
}
return xwssProcessor;
}
}</pre>
<br />
The framework passes callbacks according to "security-config.xml".<br />
<br />
• SecurityCallbackHandler.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.impl.callback.PasswordValidationCallback;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.IOException;
public class SecurityCallbackHandler implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (Callback callback : callbacks) {
if (callback instanceof PasswordValidationCallback) {
PasswordValidationCallback passwordValidationCallback = (PasswordValidationCallback) callback;
passwordValidationCallback.setValidator(new PlainTextPasswordValidator());
} else {
throw new UnsupportedCallbackException(callback);
}
}
}
}</pre>
<br />
• PlainTextPasswordValidator.java<br />
<br />
<pre>package com.samplews.person.handler;
import com.sun.xml.wss.impl.callback.PasswordValidationCallback;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.HashMap;
public class PlainTextPasswordValidator implements PasswordValidationCallback.PasswordValidator {
public boolean validate(PasswordValidationCallback.Request request) throws PasswordValidationCallback.PasswordValidationException {
PasswordValidationCallback.PlainTextPasswordRequest passwordRequest = (PasswordValidationCallback.PlainTextPasswordRequest) request;
String username = passwordRequest.getUsername();
String password = passwordRequest.getPassword();
if (username != null && password != null) {
if (username.equals("manan") && password.equals("panchal")) {
return true;
}
} else {
return false;
//throw new PasswordValidationCallback.PasswordValidationException("Username or/and Password in request is null.");
}
return false;
}
}</pre>
<br />
• Navigate to "personwsapp" on command prompt.<br />
<br />
• Execute the command. This will compile, and package the project into war file under "target".<br />
<br />
<pre>mvn package</pre>
<br />
• Deploy the generated war file into glassfish.<br />
<br />
When you deploy the war the glassfish internally uses wsgen to create server artifact like wsdl file, java file of request, java file of response, etc.<br />
<br />
• Check webservice is deployed well by writing this url in address bar of browser. <br />
Change the url if your configuration is different.<br />
<br />
<pre>http://localhost:8080/personwsapp-1.0/PersonWSService</pre>
<br />
• Create "client" directory under "Webservice".<br />
<br />
• Put this files under "client" directory.<br />
<br />
• CallPersonFetchWS.java<br />
<br />
<pre>import java.io.*;
import java.net.*;
public class CallPersonFetchWS {
public static void main(String args[]) throws Exception {
//Change the url if your configuration is different
URL url = new URL("http://localhost:8080/personwsapp-1.0/PersonWSService");
URLConnection con = url.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setDefaultUseCaches(false);
con.setRequestProperty("content-type", "text/xml");
/*
Run alternatively save and fetch request.
*/
FileInputStream requestIn = new FileInputStream("FetchRequest.xml");
//FileInputStream requestIn = new FileInputStream("SaveRequest.xml");
byte[] requestBytes=new byte[requestIn.available()];
requestIn.read(requestBytes);
requestIn.close();
String request=new String(requestBytes);
byte[] filebytes = request.getBytes();
con.connect();
OutputStream out = con.getOutputStream();
try {
out.write(filebytes);
out.flush();
} finally {
out.close();
}
InputStream in = con.getInputStream();
byte[] inbytes = new byte[in.available()];
try {
in.read(inbytes);
} finally {
in.close();
}
String resStr = new String(inbytes);
System.out.println(resStr);
}
}</pre>
<br />
• FetchRequest.xml<br />
<br />
<pre><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.samplews.com/person/beans" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soap:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>manan</wsse:Username>
<wsse:Password>panchal</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<ns1:PersonFetchRequest>
<ns1:Id>1</ns1:Id>
</ns1:PersonFetchRequest>
</soap:Body>
</soap:Envelope></pre>
<br />
• SaveRequest.xml<br />
<br />
<pre><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.samplews.com/person/beans" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soap:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>manan</wsse:Username>
<wsse:Password>panchal</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<ns1:PersonSaveRequest>
<ns1:Id>1</ns1:Id>
<ns1:Name>testperson</ns1:Name>
<ns1:Address>
<ns1:Line1>Line1</ns1:Line1>
<ns1:Line2>Line2</ns1:Line2>
<ns1:Line3>Line3</ns1:Line3>
<ns1:City>Mahemdabad</ns1:City>
<ns1:Pincode>387130</ns1:Pincode>
</ns1:Address>
<ns1:PhoneNo>9999999999</ns1:PhoneNo>
<ns1:Email>testperson@testmail.com</ns1:Email>
<ns1:BirthDate>1985-01-11</ns1:BirthDate>
</ns1:PersonSaveRequest>
</soap:Body>
</soap:Envelope></pre>
<br />
• By running "CallPersonFetchWS", you can call the webservice.<br />
<br />
I think this would help. Please put suggestions if this not helping you, so I can improve this. <br />
Thanks...<br />
<br />
<a href="http://mananvpanchal.blogspot.com/2010/06/jax-ws-client-to-call-webservice.html">JAX-WS client to call this service</a><br/>
<iframe width='180' height='260' src='https://wizpert.com/wizapi/widget?beta_key=3ba42&ep=38867&size=standard&topic_slug=java-programming' frameborder='0' scrolling='no' allowfullscreen></iframe>
</div>Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com5tag:blogger.com,1999:blog-3024203229497951332.post-3696601570926127232010-05-15T22:11:00.014+05:302011-02-01T11:46:00.285+05:30Webservices using JAX-WSHello All,<br />
<br />
We are going to create a simple webservice using JAX-WS.<br />
This requires jdk 1.6, glassfish sever.<br />
This is tested on Windows XP SP2, jdk1.6.0_18, Glassfish-v2ur1<br />
<br />
This Webservices fetches information of a person by id.<br />
<br />
Please follow the instructions...<br />
<br />
• Create a directory structure like this.<br />
<br />
<pre>Webservice
 |
 |
 -----> PersonFetchService
             |
             |
             -----> work
             |            |
             |            |
             |            -----> personfetch.xsd
             |            |
             |            |
             |            -----> personfetch.xjb
             |            |
             |            |
             |            -----> compile.bat
             |
             |
             -----> PersonFetchApp
                         |
                         |
                         -----> WEB-INF
                                     |
                                     |
                                     -----> web.xml
                                     |
                                     |
                                     -----> classes</pre><br />
• personfetch.xsd<br />
<br />
We have to determine the structure of request and response. What we want to send and what we want back, so we now define a xsd for that purpose.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.samplews.com/schema/personfetch" elementFormDefault="qualified" xmlns:tns="http://www.samplews.com/schema/personfetch">
    <xsd:complexType name="PersonFetchRequest">
        <xsd:sequence>
            <xsd:element name="Id" type="xsd:int"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="PersonFetchResponse">
        <xsd:sequence>
            <xsd:element name="Id" type="xsd:int"/>
            <xsd:element name="Name" type="xsd:string"/>
            <xsd:element name="Address" type="tns:Address"/>
            <xsd:element name="PhoneNo" type="xsd:decimal"/>
            <xsd:element name="Email" type="xsd:string"/>
            <xsd:element name="BirthDate" type="xsd:date"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Address">
        <xsd:sequence>
            <xsd:element name="Line1" type="xsd:string"/>
            <xsd:element name="Line2" type="xsd:string"/>
            <xsd:element name="Line3" type="xsd:string"/>
            <xsd:element name="City" type="xsd:string"/>
            <xsd:element name="Pincode" type="xsd:decimal"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema></pre><br />
• personfetch.xjb<br />
<br />
The xjb file specifies in which package the generated java classes resides for given targetnamespace of xsd specified in schema location.<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
    <jaxb:bindings schemaLocation="personfetch.xsd" node="/xsd:schema">
        <jaxb:schemaBindings>
            <jaxb:package name="com.samplews.personfetch"/>
        </jaxb:schemaBindings>
    </jaxb:bindings>
</jaxb:bindings></pre><br />
• compile.bat<br />
<br />
This batch is to compile all java file under specified package.<br />
<br />
<pre>javac com/samplews/personfetch/*.java
pause</pre><br />
• web.xml<br />
<br />
<pre><?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app></pre><br />
• Navigate to "work" folder on command prompt.<br />
<br />
• Execute this command.<br />
<br />
This command generates java classes according to xsd and configuration of xjb which we will use to pass into and to return from webservice.<br />
<br />
<pre>xjc personfetch.xsd -b personfetch.xjb -d .</pre><br />
You would get source files generated under "work".<br />
<br />
• Create a java file under com --> samplews --> personfetch named "PersonFetchWS.java".<br />
<br />
This is the webservice class. You can see the parameter and return type of the the fetchInfo method.<br />
<br />
• PersonFetchWS.java<br />
<br />
<pre>package com.samplews.personfetch;
import javax.jws.*;
import javax.jws.soap.SOAPBinding;
import java.math.BigDecimal;
@WebService(name = "PersonFetchWS", serviceName = "PersonFetchWSService", portName = "PersonFetchWSPort", targetNamespace = "http://www.samplews.com/webservice/personfetch")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class PersonFetchWS {
    public PersonFetchWS() {
    }
    @WebMethod(operationName = "FetchInfo")
    public
    @WebResult(name = "PersonFetchResponse", targetNamespace = "http://www.samplews.com/schema/personfetch")
    PersonFetchResponse fetchInfo(@WebParam(name = "PersonFetchRequest", targetNamespace = "http://www.samplews.com/schema/personfetch")PersonFetchRequest request) {
        PersonFetchResponse response=new PersonFetchResponse();
        response.setId(request.getId());
        response.setName("TestPerson");
        Address address=new Address();
        address.setLine1("Line1");
        address.setLine2("Line2");
        address.setLine3("Line3");
        address.setCity("Mahemdabad");
        address.setPincode(new BigDecimal("387130"));
        response.setAddress(address);
        response.setPhoneNo(new BigDecimal("9999999999"));
        response.setEmail("testperson@testdomain.com");
        return response;
    }
}</pre><br />
• Execute the "compile.bat" to compile all source files.<br />
<br />
• Copy the "com" folder and paste it to Webservices --> PersonFetchService --> PersonFetchApp --> WEB-INF --> classes<br />
<br />
• Navidate to "PersonFetchService" on command prompt.<br />
<br />
• Execute this command.<br />
<br />
The command will package all stuff under "PersonFetchService" derectory and create a jar file.<br />
<br />
<pre>jar cvf PersonFetchApp.war -C PersonFetchApp .</pre><br />
You would get "PersonFetchApp.war" under "PersonFetchService".<br />
<br />
• Deploy this war file in glassfish.<br />
<br />
When you deploy the war the glassfish internally uses wsgen to create server artifact like wsdl file, java file of request, java file of response, etc.<br />
<br />
• Enter this url in browser's address bar.<br />
<br />
<pre>http://[hostname]:[port]/PersonFetchApp/PersonFetchWSService</pre><br />
• You would see Webservice information.<br />
<br />
• To call the webservices use the class.<br />
<br />
• CallPersonFetchWS.java<br />
<br />
<pre>import java.io.*;
import java.net.*;
public class CallPersonFetchWS {
    public static void main(String args[]) throws Exception {
        URL url = new URL("http://[host]:[port]/PersonFetchApp/PersonFetchWSService");
        URLConnection con = url.openConnection();
        con.setDoInput(true);
        con.setDoOutput(true);
        con.setUseCaches(false);
        con.setDefaultUseCaches(false);
        con.setRequestProperty("content-type", "text/xml");
        String request="<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:ns1=\"http://www.samplews.com/schema/personfetch\">"+
        "<soap:Header/>"+
        "<soap:Body>"+
        "<ns1:PersonFetchRequest>"+
        "<ns1:Id>1</ns1:Id>"+
        "</ns1:PersonFetchRequest>"+
        "</soap:Body>"+
        "</soap:Envelope>";
        byte[] filebytes = request.getBytes();
        con.connect();
        OutputStream out = con.getOutputStream();
        try {
            out.write(filebytes);
            out.flush();
        } finally {
            out.close();
        }
        InputStream in = con.getInputStream();
        byte[] inbytes = new byte[in.available()];
        try {
            in.read(inbytes);
        } finally {
            in.close();
        }
        String resStr = new String(inbytes);
        System.out.println(resStr);
    }
}</pre><br />
I think this would help. Please put suggestions if this not helping you, so I can improve this. <br />
Thanks...Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com2tag:blogger.com,1999:blog-3024203229497951332.post-30855718908250634822010-04-27T14:44:00.000+05:302010-04-27T14:46:25.715+05:30Hello...Hello... I am starting... I will try to publish some important information...Manan V. Panchalhttp://www.blogger.com/profile/01216810983965551768noreply@blogger.com1