JAX-WS Tutorial: Precise WSDL
I know this is very simple web service. But I would like to highlight the importance of the use of JAX-WS annotations to get rid of the meaningless WSDL which is the main document for the web service consumer. I think, precise WSDL is advantage to maximum use of the web service. Here the simple class package com.ojitha.ws.second; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; @WebService(name = "Warehouse", serviceName = "WarehouseService", targetNamespace = "http://www.ojitha.com/stock") @SOAPBinding(style = Style.RPC) public class WarehouseImpl { @WebResult(name = "totalStock") public int getInventory(@WebParam(name = "firstNumber") int stockOnHand, @WebParam(name = "secondNumber") int stockToDeliver) { return stockOnHand + stockToDeliver; } } Here the generated WSDL <wsdl:definitions name=...