[jboss-user] [JBossWS] - Re: Create the simplest WebService possible

karypid do-not-reply at jboss.com
Thu Jul 31 11:05:04 EDT 2008


The first thing you need to do is to create a "client proxy" for accessing the web service. JBoss ships with a tool called "wsconsume" that can do this, but it doesn't work for me due to a bug in JBossWS 2.0.1 (this bug is already fixed by the way).

In any case, I suggest you use "wsimport" from the Sun Metro Web Services stack which works perfectly well for me. Get it here: http://java.sun.com/webservices/downloads/index.jsp

What you need to do is run:

wsimport -s /path/to/source/files -d /path/to/compiled/files http://hostname/webservice?wsdl

This will create the source code & compiled binaries for the "proxy client" of your web service.

Then, all you need to do is put the generated classes in your classpath and try something like:

public class TestCallingMyWebService {
  | 	public static void main(String[] args) throws MalformedURLException {
  | 		MyWSTestService rss = new MyWSTestService();
  | 		MyWSTest client = rss.getMyWSTestPort();
  | 		// call client.X() methods....
  | 	}
  | }


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167942#4167942

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167942



More information about the jboss-user mailing list