| Author |
Message |
|
|
Post subject: Generating a WSDL for REST Web Service
Posted: Sep 02, 2010 - 08:39 PM
|
|
Joined: Sep 02, 2010
Posts: 10
|
|
I just went through the tutorial "Developing REST Web Services Tutorial" and it worked fine but now I'd like to create a WSDL for the service so I can share the REST web service with other developers. How do I do that? Is it done digfferently with REST services? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 03, 2010 - 07:29 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2512
|
|
avishaic,
WSDL files exist only for SOAP web services, not for REST based services. REST services have a WADL file which you can see referenced in section 5 of the tutorial.
When you say "share the web service" with developers, what do you mean - do you want them to be able to recreate the service or use the service?
For the former, we don't have a wizard that will create the service from a WADL file, for the latter, you can share the WADL file which they can use to test the service in the rest explorer (you will need to modify the addresses in the WADL file to point to the real location of the service).
There is no standard for the consumption of web services, you can choose whatever technique you wish to access the URLs and parse the returned data. Please see this page: http://www.myeclipseide.com/module-htmlpages-display-pid-379.html under the "Web Services and SOA: Beyond the Hype" section for a few example projects.
Hope this helps. |
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Finding the WADL file
Posted: Sep 03, 2010 - 08:57 AM
|
|
Joined: Sep 02, 2010
Posts: 10
|
|
Brian thanks for the quick response.
Where do I find the WADLfile for the customers example in the tutorial? Or how do I generate it?
In the tutorial the WADL is only referenced in context of the proffesional version I have the standard version
A. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 03, 2010 - 09:35 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2512
|
|
Avishaic,
The WADL file is automatically generated by the REST runtime (Jersey). You can access it at http://localhost:port/<appname>/services/application.wadl (where "services" is the default, unless you changed the servlet-mapping value in web.xml)
To clarify, the REST explorer testing application is a PRO only feature, but the wadl file is generated by the framework and available to all. |
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 03, 2010 - 10:09 AM
|
|
Joined: Sep 02, 2010
Posts: 10
|
|
Thanks - That WADL solved the problem.
A. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 04, 2010 - 06:36 PM
|
|
Joined: Sep 02, 2010
Posts: 10
|
|
Another quick question about the tutorial - the customer has 3 properties ID,Name, Address - how would I add another attribute like phone number where the customer may have 1 or few numbers? Do I add an array?
Secons question is how do I write a REST service that returns all the customer that their name is John Smith (or any other search function)?
Thanks
A. |
|
|
| |
|
|
|
 |
|
|