Hi, I have a problem- I want to know how i could run a jsp in a similar fashion as a java class is run in the command line. (eg:After compiling a java class you run the class in the command line passing necessary arguments. How can do the same thing in a jsp and also appending a WSDL URL location) My Problem lies here........ I run the java program like this, java samples.client.DynamicInvoker http://localhost:8080/axis/services/calculator?wsdl add 2 6 The name of the java class is- DyanamicInvoker.java(the location where this class resides is - samples/client.) The location of the wsdl file is - http://localhost:8080/axis/services/CK?wsdl The method name in the web service is - add the parameters that pass are - 2 and 6
how do i do the samething using a jsp? Please if anyone could help me with some guidance i'll be very grateful!
thanx in advance, rgds Kishani.
author and deputy
Joined: Jul 13, 2001
Hi, Its seems u r using axis, then please read the documentation on how to use WSDL2Java, this will generate you stub classes(client code) to access the methods (say add), later you can use the code from jsp or servlets. check the axis documentation for furter steps.
Kishani, JSP files eventually get compiled into servlets which are, surprise surprise, Java classes. Whatever code you use in a standalone Java program, you can embed into a JSP or servlet. In the case of DynamicInvoker, which is meant to be run with the main() method and prints to System.out, you need to simply grab that class and change these two aspects so that you have a method like