Entradas

Mostrando las entradas etiquetadas como WebServices

JAX-WS with JBoss

JBoss supports JAX-WS out of the box. There is not much configuration files needed, only a servlet-mapping in the web.xml . This is how the web-service java file looks like: package com.swayam.demo.webservice ; import javax.jws.WebMethod ; import javax.jws.WebParam ; import javax.jws.WebService ; /** * * @author paawak */ @WebService ( ) public class UserService {     /** * Web service operation */     @WebMethod ( operationName = "addUser" )     public Boolean addUser ( @WebParam ( name = "userName" )     String userName ) {         System . out . println ( "add user" ) ;         return Boolean . TRUE ;     } } Its a POJO with a @WebService annotation. All you have to do is map this as a servlet in the desired context. Though this is not a servlet per-se, the JBoss web container does the rest...