Tapestry 5 and external web service

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Tapestry 5 and external web service

abangkis
Hello,

I have 2 question concerning tapestry and web service.

1. I have a service that being exposed as a web service using open
esb. What is the easiest way to invoke the web service from tapestry ?
do i need another library or is there some kind of tapestry-webservice
plugin that tapestry already provide ?

2. If i want to show the data in a grid, is there any way i can do
this without turning the xml data to Pojo and insert it to a list to
be used by the grid ?

Thanks a lot for your help guys.

Cheers,

Abangkis

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry 5 and external web service

Thiago H de Paula Figueiredo
On Fri, 22 Jan 2010 09:10:58 -0200, abangkis <[hidden email]> wrote:

> Hello,

Hi!

> I have 2 question concerning tapestry and web service.
>
> 1. I have a service that being exposed as a web service using open
> esb. What is the easiest way to invoke the web service from tapestry ?
> do i need another library or is there some kind of tapestry-webservice
> plugin that tapestry already provide ?

There isn't anything I know that deals with webservices in Tapestry, but I  
guess any webservice package would be easily integrated with Tapestry-IoC  
(and thus Tapestry itself.

> 2. If i want to show the data in a grid, is there any way i can do
> this without turning the xml data to Pojo and insert it to a list to
> be used by the grid ?

Yes. Create a dummy BeanModel with BeanModelSource (or implement BeanModel  
yourself) and then add the columns using beanModel.add("columnId",  
propertyConduit). You'll need to implement PropertyConduit itself in this  
case. Regarding its set() method, you can give it a blank implementation,  
as you're just displaying data, not editing it.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry 5 and external web service

Howard Lewis Ship
On Fri, Jan 22, 2010 at 4:25 AM, Thiago H. de Paula Figueiredo
<[hidden email]> wrote:

> On Fri, 22 Jan 2010 09:10:58 -0200, abangkis <[hidden email]> wrote:
>
>> Hello,
>
> Hi!
>
>> I have 2 question concerning tapestry and web service.
>>
>> 1. I have a service that being exposed as a web service using open
>> esb. What is the easiest way to invoke the web service from tapestry ?
>> do i need another library or is there some kind of tapestry-webservice
>> plugin that tapestry already provide ?
>
> There isn't anything I know that deals with webservices in Tapestry, but I
> guess any webservice package would be easily integrated with Tapestry-IoC
> (and thus Tapestry itself.
>
>> 2. If i want to show the data in a grid, is there any way i can do
>> this without turning the xml data to Pojo and insert it to a list to
>> be used by the grid ?
>
> Yes. Create a dummy BeanModel with BeanModelSource (or implement BeanModel
> yourself) and then add the columns using beanModel.add("columnId",
> propertyConduit). You'll need to implement PropertyConduit itself in this
> case. Regarding its set() method, you can give it a blank implementation, as
> you're just displaying data, not editing it.
>

That is, the PropertConduit's get() method should be able to cast its
parameter to an XML Element class and figure out the right way (from
an attribute or element) to extract and return the value to be
displayed in that column of the Grid.

> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry 5 and external web service

Peter Stavrinides
In reply to this post by Thiago H de Paula Figueiredo


> There isn't anything I know that deals with webservices in Tapestry, but I  
> guess any webservice package would be easily integrated with Tapestry-IoC  
> (and thus Tapestry itself.
An example of this would be great Thiago, to me this seems harder than it should be, currently the best way I know of is to join the web service context with Tapestry's, which might not be  ideal but at least it works... is there a better way?

cheers,
Peter


----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <[hidden email]>
To: "Tapestry users" <[hidden email]>
Sent: Friday, 22 January, 2010 14:25:58 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Tapestry 5 and external web service

On Fri, 22 Jan 2010 09:10:58 -0200, abangkis <[hidden email]> wrote:

> Hello,

Hi!

> I have 2 question concerning tapestry and web service.
>
> 1. I have a service that being exposed as a web service using open
> esb. What is the easiest way to invoke the web service from tapestry ?
> do i need another library or is there some kind of tapestry-webservice
> plugin that tapestry already provide ?

There isn't anything I know that deals with webservices in Tapestry, but I  
guess any webservice package would be easily integrated with Tapestry-IoC  
(and thus Tapestry itself.

> 2. If i want to show the data in a grid, is there any way i can do
> this without turning the xml data to Pojo and insert it to a list to
> be used by the grid ?

Yes. Create a dummy BeanModel with BeanModelSource (or implement BeanModel  
yourself) and then add the columns using beanModel.add("columnId",  
propertyConduit). You'll need to implement PropertyConduit itself in this  
case. Regarding its set() method, you can give it a blank implementation,  
as you're just displaying data, not editing it.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tapestry 5 and external web service

Thiago H de Paula Figueiredo
On Fri, 22 Jan 2010 14:05:55 -0200, Peter Stavrinides  
<[hidden email]> wrote:

>> There isn't anything I know that deals with webservices in Tapestry,  
>> but I
>> guess any webservice package would be easily integrated with  
>> Tapestry-IoC
>> (and thus Tapestry itself.

> An example of this would be great Thiago, to me this seems harder than  
> it should be,

Why? Any concrete examples?

> currently the best way I know of is to join the web service context with  
> Tapestry's, which might not be  ideal but at least it works... is there  
> a better way?

I don't have any experience with modern webservice packages, so I won't be  
able to help here.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]