File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes wsdl to html form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl to html form" Watch "wsdl to html form" New topic
Author

wsdl to html form

Giuseppe Fiameni
Greenhorn

Joined: Jan 21, 2008
Posts: 2
Dear all,
I need to create an html form starting from wsdl to sumbit web service requests. Since it does not seem to be a simple task to achieve I am looking for a library (Java) that might help me to write the code.

Do you have any suggestions ?

Thanks in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41020
    
  43
Welcome to JavaRanch.

Does the WS use SOAP, or is it more of a REST-style service? If the former, you'll need to integrate a JavaScript library that generates SOAP and then submits it using XMLHttpRequest. See here and here for introductions on how to do this.

If the latter, submitting the form using GET might be sufficient (although it's rare for REST-style WS to be described using WSDL, so this is likely not feasible).
[ January 21, 2008: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Giuseppe Fiameni
Greenhorn

Joined: Jan 21, 2008
Posts: 2
Originally posted by Ulf Dittmer:


Does the WS use SOAP, or is it more of a REST-style service? If the former, you'll need to integrate a JavaScript library that generates SOAP and then submits it using XMLHttpRequest. See here and here for introductions on how to do this.




Ulf Dittmer, thanks for you replay.

My problem is quite different, maybe I did not explain it well enough to be understandable.

Actually, I need a way to generate HTML interface that matches web services request based on XML schema. The request submission is made by server side code. The user fills out the form and posts data, no actions happen on client side.

thanks,
Giuseppe
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41020
    
  43
I see. Most web service toolkits (like Axis or JAX-WS) include a tool that generates Java client code from a WSDL. It might be called wsdl2java or some such; check the documentation of the toolkit you're using.

Once you have the code to access the WS, you can examine which parameters it needs, and construct an HTML form that submits those to a servlet. That in turn can use the previously generated client code to access the WS.

I'm not aware of a tool that generates HTML forms directly from a WSDL.
[ January 21, 2008: Message edited by: Ulf Dittmer ]
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2919
    
    5
If you are simply accessing the one SOAP web service then Ulf's suggestion is the way to go

However as you haven't elaborated what problem you are trying to solve, it should be pointed out that SoapUI, Stylus Studio's: Web Service Call Composer and Altova XMLSpy offer a graphical user interface with "that" functionality as a web service testing tool.

Visual Studio with ASP.NET web services is the only tool that I know of that offers browser pages for web services tests - which doesn't help in your particular case.

It is also possible (if necessary) to call SOAP web services directly from JavaScript.
Grant Morgan
Greenhorn

Joined: Feb 07, 2008
Posts: 1
Try Googling WSDL form. First two hits are good.
http://www.extreme.indiana.edu/xgws/xydra/
does rest.
www.soapclient.com/soaptest.html
does soap. it is a web service but I think if you look around you can source.
 
 
subject: wsdl to html form
 
Similar Threads
Webservices exposed on web
Import WSDL
First JAX-WS webservice results in UnsupportedMediaException
creating stubs using the wsdl that is provided using ant script
Jini As a WebService