Hi,
Normally if you(client) want to access a web service, you should generate some client side stuffs (it takes care of communication,serialization,etc).
In this example they used the metadata annotation method for generating the clientside stuff.(during the build process - step no 7 - Use wsimport to generate and compile the web service artifacts needed to connect to the service.)
// wsdl location as argument, during the //build process, it well generate //the service class.)
@WebServiceRef(wsdlLocation="http://localhost:8080/
helloservice/hello?wsdl")
static HelloService service;
Then above service refers that hello wsdl file.
with in a single wsdl ,we can define classes and those methods (publish as service).
then set the corresponding end point by calling the getHelloPort() method.
(since with in a single wsdl file we can define more than one service).
Then it will point to the particular class (service class in the server side).
- Elil