Skip to main content

Posts

Showing posts from October, 2014

Java standalone webservice : Multithreading the Endpoint Publisher

While going through a very good book on web services by Martin Kalin ( Java Web services : Up and Running) I came across the section that is dealing with how to multithread the endpoint publisher so that the web service request wont wait for another one to finish. Given below is the enhancement to the example mentioned in the above book where I am using multithreaded endpoint publisher. STEP 1 : Web service Server 1. Create a new Java project. 2. Create a class TimeServer which is Service Endpoint Interface (SEI) as below. package ch01.ts; import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; /** * The annotation @WebService signals that this is the * SEI (Service Endpoint Interface). @WebMethod signals * that each method is a service operation. * * The @SOAPBinding annotation impacts the under-the-hood * construction of the service contract, the WSDL * (Web Serv