Blog Archives

Create Web service using wsgen in command line


Generally bottom up approach, where the service implementation is done first and wsdl will be generated next, is not a suggested way of implementing a web service. In some cases where the service implementation class is already exists in the

Tagged with: , , ,
Posted in JAVA

Differences between wsimport and wsgen


wsimport: The wsimport tool reads a WSDL and generates all the required artifacts for web service development, deployment, and invocation. The wsimport tool supports the top-down approach to developing JAX-WS Web services, where you are starting from a wsdl. The

Tagged with: , , , , , , ,
Posted in JAVA, Web Services

Create web service in Bottom Up approach using command line


Create Service Interface MyJaxWSSEI.java package in.malliktalksjava.ws; import in.malliktalksjava.ws.pojo.*; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.WebParam.Mode; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; import javax.jws.soap.SOAPBinding.Use; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; @WebService(name = “MyJaxWSHello”, targetNamespace = “http://malliktalksjava.in”, wsdlLocation = “http://malliktalksjava.in/MyJaxWS?wsdl”) @SOAPBinding(style=Style.RPC, use=Use.LITERAL) public interface

Tagged with: , , ,
Posted in JAVA, Web Services

Difference between ClassNotFoundException and NoClassDefFoundError


1. java.lang.ClassNotFoundException :  This exception indicates that the class was not found on the classpath. This indicates that we were trying to load the class definition, and the class did not exist on the classpath. 2. java.lang.NoClassDefFoundError :  This exception

Tagged with: , ,
Posted in JAVA

Difference between HttpSession’s getSession(), getSession(true) and getSession(false) methods


getSession() : Returns the current session associated with this request, or if the request does not have a session, creates one. getSession(true) : Returns the current HttpSession associated with this request, if there is no current session, returns a new

Tagged with: , , , ,
Posted in JAVA, Servlet, Servlets

How to read a URL using JAVA


package in.malliktalksjava; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; /** * @author malliktalksjava * */ public class URLConnectionReader { public static void main(String[] args) throws Exception { URL oracle = new URL(“http://malliktalksjava.in/”); URLConnection yc = oracle.openConnection(); BufferedReader in =

Tagged with: , , , , , , , ,
Posted in JAVA

Example Program: Search Word in Folder files and print output


To Search a word in in list of files available in Folder, you need to find the list of files first and then scan each and every for required word. Below is the sample program to find the a given

Tagged with: , , , , , , , , , , , ,
Posted in JAVA

Example Java Program to Search Files in a Folder


Below Java Program lists the file names and directory names available in given folder. To do this implementation , we can get the files list in a folder using File class available in Java API. Iterate the files one by one

Tagged with: , , , , , , , , , , ,
Posted in JAVA

Merge Sort Example in Java


package in.malliktalksjava; /** * @author malliktalksjava * * Sorts the given array using merge sort algorithm */ public class MergeSortExample { private int[] array; private int[] tempMergArr; private int length; /** * @param args * * main method. * Pass

Tagged with: , , , , , , , ,
Posted in JAVA

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
July 2018
M T W T F S S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 266,118 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100