• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

calling wsdl in a jsp

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic