Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto generation code

 
Yann Emeraud
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yann!.. Welcome to Javaranch.
How abt getting some idea from the projects likes WSIF,WSDLJ etc.,.
 
Yann Emeraud
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the anwser, i m going to look in
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic