wood burning stoves 2.0*
The moose likes Web Services and the fly likes Auto generation code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Auto generation code" Watch "Auto generation code" New topic
Author

Auto generation code

Yann Emeraud
Greenhorn

Joined: May 03, 2004
Posts: 15
Hi,
I would like to create a client that can parse a WSDL file and then call dynamically the remote methods.
Basically, the user click on a list where all the available methods are shown.
When he click on one, some input boxes appear depending of the number of arguments required by the selected method.
The user give the required values, press submit and the result is shown.
The important point is, the list is automatically refreshed during client code compilation.
When some methods are added to the WSDL file, the user don't have to manually add the method name and parameters to the list, he just compile the client again.
I read the Java Web Service Tutorial Chapter 12: Building Web Services With JAX-RPC
I thougth Dynamic proxy or Dynamic invocation interface (DII) could do this.
But i realized that when you write the client code you do have to manualy write the name of the method you want to call.
As in the Dynamic proxy HelloClient example:
System.out.println(myProxy.sayHello("Buzz"));
As in the Dynamic invocation interface (DII) HelloClient example:
call.setOperationName(
new QName(BODY_NAMESPACE_VALUE,"sayHello"));
call.addParameter("String_1", QNAME_TYPE_STRING,
ParameterMode.IN);
String[] params = { "Murph!" };
Is there any way to retrieve automatically a list containing all the methods names and arguments from the WSDL file?
Or do i have to parse myself the WSDL file?
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Yann!.. Welcome to Javaranch.
How abt getting some idea from the projects likes WSIF,WSDLJ etc.,.


Spritle Software Blogs
Yann Emeraud
Greenhorn

Joined: May 03, 2004
Posts: 15
Thank you for the anwser, i m going to look in
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto generation code