We will Use “wsconsume” utility supplied by JBoss WS (available under
- Type-in following command on the command prompt. Make sure that you have working WSDL URL before executing following command: 
 [JBOSS Path]\bin>wsconsume -k -p packageName -o targetBinDir -s TaregtSrcDir http://127.0.0.1:8080/ejbs/HelloWorld?wsdl
- Once you have the interfaces, you can write the client like this (you should get the classes names (service, proxy) from the generated code in targetBinDir ):
public class HelloWorldClient {
    public static void main(String[] args) {
        //Create Service
        HelloWorldService service = new HelloWorldService();
        //create proxy
        HelloWorld proxy = service.getHelloWorldPort();
        //invoke
        System.out.println(proxy.hello("hello"));
    }
   }
- Related links:
http://www.mastertheboss.com/en/web-interfaces/101-jboss-web-services-part-1.html
 
 
No comments:
Post a Comment