4

How can I create a Vaadin application who consumes a Restful web Services ?

My architecture is:

.parent project
  .core-subProject (devlopped with spring )
  .ws-subProject (restful web service with jaxb annotation)
  .client-project (using vaadin)

thx for help.

Tomasz
  • 5,269
  • 8
  • 56
  • 65
Riadh_O
  • 53
  • 1
  • 5
  • Can you explain better what you've tried and what you want to achieve? – Caesar Ralf Apr 10 '13 at 14:06
  • 1
    first of all thank you for replying. then, I created a core project which contains my entities and services and i test it with Junit. then i created a webservice project (restful WS) which contains the core-project dependancy and i test it with th RestClient plugin in the browser. now i want to consume the webServices in my client project – Riadh_O Apr 11 '13 at 10:15

1 Answers1

2

Vaadin is a server-side framework, so there is nothing special here, you would do it as in any other Java application.

See for example this question How to consume REST in Java or this Vaadin forum post.

Basically, you need to create a RESTful URI, open a stream to it and parse it. If the output is XML possibly with something like XStream.

Community
  • 1
  • 1
Tomasz
  • 5,269
  • 8
  • 56
  • 65