- This topic has 5 replies, 2 voices, and was last updated 14 years, 3 months ago by avishaic.
-
AuthorPosts
-
avishaicMemberI 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?
Brian FernandesModeratoravishaic,
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.
avishaicMemberBrian 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 versionA.
Brian FernandesModeratorAvishaic,
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.
avishaicMemberThanks – That WADL solved the problem.
A.
avishaicMemberAnother 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. -
AuthorPosts