Article Source:
Http://radio.weblogs.com/0132036/2003/12/11.html
Web Service Tip: JSPs Calling Web Services How do I call a Web service from a JSP Seems like a simple question but it turns out there are many ways - some quick and dirty and others more correct Let's not debate correctness (do you really?. Want to do this ?! and first solve the problem . more details on generating the stub) If I add a main method to that stub, I can easily test that stub against my Web service: public static void main (String [] args) {try {GreetingServiceStub stub = new GreetingServiceStub (); System.out.println (STUB.SAYHELLO ("Mike"));} catch (Exception EX) {EX.PrintStackTrace ();}} That Bit of Code, Will Become The Foundation of How To Do My First Cut of Calling Of A Web Service from a JSP. The JSP Page I Want To Hook It Into Looks Like This: First I Would Like To Make A Direct Call from My Jsp. All I Have to Do Is Add A Scriplet Based On That Above Code: <% @ Page ContentType = "Text / HTML; Charset = Windows-1252" Import = "com.rpc.greetingServicestub"%>%>