It's not a secret anymore!
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "Auto generation code" Watch "Auto generation code" New topic

Auto generation code

Yann Emeraud

Joined: May 03, 2004
Posts: 15
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:
As in the Dynamic invocation interface (DII) HelloClient example:
new QName(BODY_NAMESPACE_VALUE,"sayHello"));
call.addParameter("String_1", QNAME_TYPE_STRING,
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

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

Joined: May 03, 2004
Posts: 15
Thank you for the anwser, i m going to look in
I agree. Here's the link:
subject: Auto generation code
It's not a secret anymore!