Posts

Showing posts from July, 2015

HTTP request vs web service

The Hypertext Transfer Protocol (HTTP) used to communications between clients and servers.HTTP works as a request-response protocol between a client and server.A web browser may be the client, and an application on a computer that hosts a web site may be the server.There are happen HTTP communication.A normal web page returns HTML, PDF, or image data that's intended to be displayed to the user in a browser. Web Service-A web service returns data that's intended to be used by another program.A client (browser etc.) submits an HTTP request to the server; then the server returns a response to the client.  The requst and response hapen in web service.Web Service returns data that's structured to be easy for computers to extract the values. Common formats are XML and JSON. The web service might also use a structured format for requests. There are two commonly used methods for a request-response between a client and server are: GET and POST. GET - Requests data from a specifi

WSIL part 01

Introduction to WSDL WSDL stands for Web Services Description Language. WSDL is a language for describing web services and how to access them.WSDL is written in XML. The WSDL Document's main elements Element Description <types> A container for data type definitions used by the web service <message> A typed definition of the data being communicated <portType> A set of operations supported by one or more endpoints <binding> A protocol and data format specification for a particular port type structure of a WSDL document <definitions> <types> definition of types........ </types> <message> definition of a message.... </message> <portType> <operation> definition of a operation....... </operation> </portType> <binding> definition of a binding.... </binding> <service> definition of a serv

Setup slf4j to maven project

The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks   Add dependency to your Maven POM you need “slf4j-api.jar” and your preferred binding, like log4j “slf4j-log4j12.jar“. Just declares the dependency in your pom.xml. <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4jVersion}</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> <scope>runtime</scope> </dependency>   log4.properties the properties code put in java/resources # Direct log messages to a log file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=C: