I have following java class and have published a wsdl for it, my question is that is there anyway to have different webservice classes and publish a single wsdl? I mean another seperate class to this one with number of methods or I have to have a webservice class as the main class of the application to keep all the webmethod methods and generate the wsdl from that?
package com.Services;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService(name = "Hellos", targetNamespace = "http://localhost:8081/Mywebservice2/services/Hellos")
public class Hellos {
@WebMethod
public Customer[] mycustomers() {
.....
}
@WebMethod
public String Receiver(String name){
....
}
}
Exactly, that should be the way you should design your application. you should have one consolidated java file and that should be exposed. Clients should be given multiple end-points.