JAX WS using Eclipse and Tomcat

Posted 1 CommentPosted in Java, SOAP, WebServices

In this post, we will create a JAX WS service using Eclipse IDE and deploy it on Tomcat server. Let’s create a Dynamic web project named SOAPWS in Eclipse. Create a package com.techkatak and a create class Hello.java file in it.

@WebService annotation marks this class as a webservice. To deploy this webservice in Tomcat […]

wsimport tool example to create JAX WS artifacts

Posted Posted in Java, WebServices

WSIMPORT The wsimport tool helps in writing a Java client against a service that provides a WSDL as contract. This utility has a client-side focus, although the utility can be helpful on the server side as well; The wsimport tool generates JAX-WS portable artifacts used in JAX-WS clients and services. It reads a WSDL and […]

JAX WS Hello World using Eclipse

Posted 1 CommentPosted in Java, SOAP, WebServices

In Eclipse, create a new Java Project using: File -> New -> Java Project and provide a name of your project. Create a package com.techkatak for adding service files. Now lets add a simple service file Hello.java

The @WebService annotation marks this class as a WebService and the @WebMethod annotation specifies the method that […]

RESTful Service with Jersey

Posted 1 CommentPosted in Java, REST, WebServices

This tutorial would help you to create a Restful service with Jersey. We will develop the Restful service with Jersey and for doing that we will use Maven to setup the environment and download the dependencies. We will deploy it in Tomcat server or J2EE Preview. If you need help downloading maven, you can refer to this […]

RESTful webservice with Jersey and Grizzly

Posted 1 CommentPosted in Java, REST, WebServices

This tutorial would help you to create a simple Jersey service without the need of deploying to a container. We will develop the Restful service with Jersey and Grizzly and for doing that we will use Maven to setup the environment and download the dependencies. If you need help downloading maven, you can refer to this post […]

Java webservice interview questions

Posted 4 CommentsPosted in Interview questions, Java, WebServices

When to use REST and when to use SOAP ? Use SOAP, when 1) The service provider and client/consumer need to follow a formal contract. The format is provided in the form of a WSDL file. 2) SOAP provides additional features for stateful operations. 3) Security : SOAP provides additional security by using WS-Security. Use […]

Create Rest Client using HttpClient 4.3.5 api

Posted Posted in Java, REST, WebServices

The below tutorial will assist in creating a Client for invoking a Rest service.. we are using HttpClient 4.3.5 jar for this. We need to download the following jars for this: httpclient 4.3.5.jar commons-httpcore 4.3.2.jar httpclient-cache 4.3.5.jar commons-logging 1.1.3.jar You can directly download these jars from apache site or use maven to download the dependcies for […]