You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tim Fletcher <zi...@gmail.com> on 2011/11/08 15:36:11 UTC

Web services using Tapestry

Hi All,

I have spent the last day trying to find a simple method for adding web
services via Tapestry5, but have only found slightly old
tutorials referring to Tapestry4.

Do you guys have any specific recommendations?

Ideally, i would like to use JAX-WS style annotations.

Thanks in advance,
Tim

Re: Web services using Tapestry

Posted by Tim Fletcher <zi...@gmail.com>.
Thanks for all the input! I think I'm starting to understand where Tapestry
sits on the software stack.

I have gone with Derkoe's JAX-WS integration.

Regards,
Tim

On 8 November 2011 15:24, derkoe <ta...@gmail.com>wrote:

>
> Tim Fletcher wrote:
> >
> > Hi All,
> >
> > I have spent the last day trying to find a simple method for adding web
> > services via Tapestry5, but have only found slightly old
> > tutorials referring to Tapestry4.
> >
> > Do you guys have any specific recommendations?
> >
> > Ideally, i would like to use JAX-WS style annotations.
> >
> > Thanks in advance,
> > Tim
> >
>
> Here's a simple integration for Metro (JAX-WS RI):
> https://github.com/derkoe/tapestry-jaxws
>
> You can also use the libraries (Metro, CXF) directly by then you cannot
> inject Tapestry services.
>
> --
> Chris
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Web-services-using-Tapestry-tp4974432p4974549.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Web services using Tapestry

Posted by Michael Gentry <mg...@masslight.net>.
If you have access to the HttpSession, though, you can grab the
service.  I had something that listened for session timeouts:

import org.apache.tapestry5.TapestryFilter;
import org.apache.tapestry5.ioc.Registry;
...
public class SessionTimeoutNotifier implements
HttpSessionBindingListener, Serializable
{
  ...
  public void valueUnbound(HttpSessionBindingEvent event)
  {
    Registry registry = (Registry)
event.getSession().getServletContext().getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME);
    MyService myService = registry.getService(MyService.class);
    myService.doSomething();
    ...
  }
}

mrg


On Tue, Nov 8, 2011 at 10:24 AM, derkoe
<ta...@gmail.com> wrote:
>
> Tim Fletcher wrote:
>>
>> Hi All,
>>
>> I have spent the last day trying to find a simple method for adding web
>> services via Tapestry5, but have only found slightly old
>> tutorials referring to Tapestry4.
>>
>> Do you guys have any specific recommendations?
>>
>> Ideally, i would like to use JAX-WS style annotations.
>>
>> Thanks in advance,
>> Tim
>>
>
> Here's a simple integration for Metro (JAX-WS RI):
> https://github.com/derkoe/tapestry-jaxws
>
> You can also use the libraries (Metro, CXF) directly by then you cannot
> inject Tapestry services.
>
> --
> Chris
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Web-services-using-Tapestry-tp4974432p4974549.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Web services using Tapestry

Posted by derkoe <ta...@gmail.com>.
Tim Fletcher wrote:
> 
> Hi All,
> 
> I have spent the last day trying to find a simple method for adding web
> services via Tapestry5, but have only found slightly old
> tutorials referring to Tapestry4.
> 
> Do you guys have any specific recommendations?
> 
> Ideally, i would like to use JAX-WS style annotations.
> 
> Thanks in advance,
> Tim
> 

Here's a simple integration for Metro (JAX-WS RI):
https://github.com/derkoe/tapestry-jaxws

You can also use the libraries (Metro, CXF) directly by then you cannot
inject Tapestry services.

-- 
Chris

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Web-services-using-Tapestry-tp4974432p4974549.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Web services using Tapestry

Posted by trsvax <tr...@gmail.com>.
I just make a page and return XML from onActivate. Here is an example

https://github.com/trsvax/Blog/blob/master/src/main/java/com/trsvax/pages/Index.java

The xml.streamWithStyle method takes a JAXB annotated object and does the
rest. In this
example there is a stylesheet to convert the JAXB xml format to rss.

If you need to authenticate just create a filter. I use a filter that looks
in the header for Authorization so I don't have that part in the url. It's
similar to the way Amazon S3 works. This way the pages don't need to worry
about how the authentication happens. 

It's about as easy as it gets and I've implemented quite a few web services
this way.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Web-services-using-Tapestry-tp4974432p4974799.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Web services using Tapestry

Posted by Peter Stavrinides <P....@albourne.com>.
Search this mailing lists and you will find some recent threads and some coded examples.

regards,
Peter

----- Original Message -----
From: "Lenny Primak" <lp...@hope.nyc.ny.us>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 8 November, 2011 16:48:14 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Web services using Tapestry

I use web services with tapestry 5. There is nothing special about them and I just use them without regard if it's tapestry or not. I use glassfish. 



On Nov 8, 2011, at 9:36 AM, Tim Fletcher <zi...@gmail.com> wrote:

> Hi All,
> 
> I have spent the last day trying to find a simple method for adding web
> services via Tapestry5, but have only found slightly old
> tutorials referring to Tapestry4.
> 
> Do you guys have any specific recommendations?
> 
> Ideally, i would like to use JAX-WS style annotations.
> 
> Thanks in advance,
> Tim

---------------------------------------------------------------------
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: Web services using Tapestry

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I use web services with tapestry 5. There is nothing special about them and I just use them without regard if it's tapestry or not. I use glassfish. 



On Nov 8, 2011, at 9:36 AM, Tim Fletcher <zi...@gmail.com> wrote:

> Hi All,
> 
> I have spent the last day trying to find a simple method for adding web
> services via Tapestry5, but have only found slightly old
> tutorials referring to Tapestry4.
> 
> Do you guys have any specific recommendations?
> 
> Ideally, i would like to use JAX-WS style annotations.
> 
> Thanks in advance,
> Tim

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