How to automate Java6 wsgen and wsimport with ant?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siegfried_Heintze
Posted On:   Wednesday, April 11, 2007 11:32 AM

Does someone have a simple ant script that demonstrates how to run wsgen and wsimport? I'm running wsgen, running my little web service in the background and running wsimport from the command line. I see wsimport creating some class files but I'm not sure what to do next. I want to use eclipse to create a client for this soap service. How do I do that using ant and eclipse? Thanks, Siegfried Here is my java6 web service: package xml.soapDemo; import javax.jws.WebService; import javax.jws.WebMethod; import javax.xml.ws.Endpoint; @WebService public class HelloService { @WebMethod    More>>

Does someone have a simple ant script that demonstrates how to run wsgen and wsimport?


I'm running wsgen, running my little web service in the background and running wsimport from the command line.


I see wsimport creating some class files but I'm not sure what to do next. I want to use eclipse to create a client for this soap service. How do I do that using ant and eclipse?


Thanks,

Siegfried


Here is my java6 web service:

			
				package xml.soapDemo;
				
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.xml.ws.Endpoint;

@WebService
public class HelloService {
@WebMethod
public String HelloWorld() {
return "Hello, World";
}
@WebMethod
public double F2C(double f){
return 5 * (f - 32) / 9;
}
@WebMethod
public double C2F(double C){
return 9*C/5-32;
}
@WebMethod
public double add(double x, double y){ return x + y; }
public static void main(String[] args) {
HelloService hello = new HelloService();
Endpoint endpoint = Endpoint.publish("http://localhost:8123/hello", hello);
}
}
   <<Less
About | Sitemap | Contact