HDIV Integration with RESTful webservice - hdiv

I'm creating a web application containing RESTful webservices and I was wondering how I can properly integrate HDIV with this part of my webapp.
For now, I'm defining each webservice URL as startPage:
<hdiv:startPages>/ws/ws1,/ws/ws2,...</hdiv:startPages>
Is there a way to change that? does <hdiv:startPages>/ws/*</hdiv:startPages> or something like that exists?

You can use Java patterns to define start pages:
<hdiv:startPages>/ws/.*</hdiv:startPages>
Anyway, you can try Spring HATEOAS and Hdiv's experimental integration to securize the REST services.

Related

How to configure and call the RSDL or WADL for REST web service?

I want to implement the RSDL or WADL for REST webservice. I got the syntax for it from wiki, but not able to configure it in project. Can anyone tell me how the configuration is done and how to call. Basically how it works as far as workflow is concerned?
Finally I used Jersey for REST webservice implementation. And Jersey auto generates the WADL for the web service. In order to access the WADL, you need to just append the '/application.wadl' to your REST base URL.
For example: "http://www.companyname.com/rest/application.wadl"

Play framework + GWT + Restful

We're developing an app using play framework for the backend (with Restful services), and GWT in the client . We want to call Restful services from GWT. Can we use RestyGWT just to build the request and get JSON?
I have read the RestyGWT documentation (http://restygwt.fusesource.org/documentation/restygwt-user-guide.html) but I don't have all clear, because we don't need build Restful service, just call them from client.
Thanks in advance.
I think in your case you can use two feature of RestyGWT:
Calling Restful web services which developed using Play Framework, see this part of documentations.
Manipulating JSON objects in your GWT application using RestyGWT API for encoding and decoding Java Object to JSON, see this part of documentations.

Blackberry and RESTful services

I'm looking to develop a blackberry application to consume a RESTful service. At the moment we plan to develop a REST layer which we will use to perform searches on a back end database and return the results as JSON.
I have used the Jersey framework ( http://jersey.java.net/ ) for consuming (and developing) REST layers in the past.
This is the first time we plan to develop such an app for a blackberry. From looking around I'm not sure if jersey is supported on the blackberry for consuming RESTful services.
So I'm wondering could someone offer some advice (on jersey or any other purpose built JARs) for using RESTful services on Blackberry? Otherwise we will have to build from scratch the code for consuming the RESTFul service. Or even use SOAP which I prefer not to have to do if possible.
Thanks,
John
Take a look at the JSON.org website, they have lib in Java to parse JSON data(I'v manage to make it work for BlackBerry without to much modifications.
The only thing left to do is a connection to the web service by passing the parameter you need to it. And then parse the response with the JSON lib to rebuild your data model in your native client.
And please don't use SOAP for mobile application.
Please read RIM doc for socket
You can use a httpConnection too

How to Create WSDL for Restful WS

I have developed a small RESTful web service example using MyEclipse. I want to create a client for those WS using WSDL. How do I create a WSDL for the above web service using MyEclipse? Please help.
Take a look at this resource. It describes using WSDL 2.0 to describe a REST interface:
http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/#describerestservice
WSDL ? for a REST web service ? i'd suggest you read this book for a better understanding of REST http://oreilly.com/catalog/9780596529260
You don't need WSDL (nor WADL AFAIC) documentation in rest could be plain text for developers, schemas (xsd, rdfs...etc depending on the content types you use) sitemaps for example, a lot of links and post/put templates for example ( to mimic forms in html)

Access web service from GWT

Is there any way how I can access a web service from GWT using its WSDL? Previously I was trying to use the generated classes from ws-import.... but then someone pointed out to me that GWT cannot handle all Java, just a subset of it, hence it won't understand the ws-import classes.
Thanks and regards,
Krt_Malta
GWT can access web services using a RequestBuilder, which makes HTTP calls to a service and then gets access to its response.
Since your web service is using SOAP, the response you get in your RequestBuilder's callback will be XML. Parse that XML to find the information you're interested in, and you're good to go.
In our project we were using Axis Client to make SOAP Web Service Call(WSDL Driven). We had use the inbuild plug tool provided by the WTP/ AXIS Webservice in Spring Source Tool to create the client using provided WSDL. We had use the same client code to incorporate with GWT and everything works fine.