You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by abangkis <ab...@gmail.com> on 2010/01/22 12:10:58 UTC

Tapestry 5 and external web service

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 and external web service

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Fri, Jan 22, 2010 at 4:25 AM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Fri, 22 Jan 2010 09:10:58 -0200, abangkis <ab...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 and external web service

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 22 Jan 2010 14:05:55 -0200, Peter Stavrinides  
<P....@albourne.com> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 and external web service

Posted by Peter Stavrinides <P....@albourne.com>.

> 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" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
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 <ab...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 and external web service

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 22 Jan 2010 09:10:58 -0200, abangkis <ab...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org