[JBossWS] - Re: New to WS... Need help...
by PeterJ
Try something simpler. The web service (class only, no interface):
import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| @Stateless
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class ProfileMgmtBean {
| @WebMethod
| public int summ(int a, int b){
| return a+b;
| }
| }
Compile that, place in jar, and deploy it. Then use wsconsume to generate the client stubs. The client:
public class WSClient {
| public static void main(String[] args) {
| ProfileMgmtBeanService svc = new ProfileMgmtBeanService();
| ProfileMgmtBean inst = svc.getProfileMgmtBeanPort();
| System.out.println("And summ = " + inst.summ(1, 1));
| }
| }
Compile the client along with the stubs generated by wsconsume. Then use wsrunclient to run it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153688#4153688
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153688
16 years, 7 months