[jboss-user] [JBossWS] - Re: Call a web service
PeterJ
do-not-reply at jboss.com
Fri Mar 14 12:07:24 EDT 2008
Yes, you use the files generated by wsconsume in your client. As an example, say you have a hello web service (I am not sowing all the code):
class Hello {
| public String sayHello(String name) {...}
| }
wsconsume will create an interface named Hello and a class named HelloService (and possibly other classes). The code for the client is:
public class Client {
| public static void main(String[] args) {
| HelloService svc = new HelloService();
| Hello hello = svc.getHelloPort();
| System.out.println(hello.sayHello(args[0]));
| }
| }
Compile the client with the classes generated by wsconsume, and package the client and the wsconsume classes info a jar file. Then use wsrunclient to run it:
wsrunclient -classpath client.jar Hello me
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136757#4136757
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136757
More information about the jboss-user
mailing list