You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Avenante <d....@gmail.com> on 2007/05/29 21:28:27 UTC

T5 IoC for WebServices (jax-ws)

Hi ;)

I need to expose some services with webservices (beurkkk).
The probleme is the that the servlet for the web services is not processed
by my tapestry filter.


<context-param>
        <param-name>tapestry.app-package</param-name>
        <param-value>com.me.indexer</param-value>
    </context-param>

    <filter>
        <filter-name>app</filter-name>
        <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>app</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
    </listener>
    <servlet>
        <servlet-name>SearchWS</servlet-name>
        <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>SearchWS</servlet-name>
        <url-pattern>/SearchWS</url-pattern>
    </servlet-mapping>

So i can't write something like this :


@WebService
public class Searcher {

    private static final String START_DOC = "<result>\n";
    private static final String END_DOC = "\n<result>";

    @Inject
    @Service("Indexer")
    private Indexer indexer;

    ....
}

How can I do to use tapestry 5 IoC in this contexte ?

Thank's

Re: T5 IoC for WebServices (jax-ws)

Posted by Blackwings <lo...@gmail.com>.
Does it means that today, the best should be to learn Axis if we need
WebServices?


2007/5/29, Howard Lewis Ship <hl...@gmail.com>:
> Further, the "magic" injection right into private variables is a function of
> Tapestry's class transformation system; it's limited to Tapestry pages and
> components, which exist within specific packages.  A more seamless solution
> for exposing Tapestry IoC services as web services is possible, but not in
> scope.  I'm so busy now that breathing is barely in scope.
>
> On 5/29/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> > The Tapestry filter puts the Registry into the ServletContext.  You should
> > be able to write a small wrapper implementation of your web service that
> > obtains the real implementation from the Registry and delegates all methods
> > to it.  Your Tapestry IoC implementation can use all the standard means of
> > injection.
> >
> > On 5/29/07, David Avenante <d....@gmail.com> wrote:
> > >
> > > Hi ;)
> > >
> > > I need to expose some services with webservices (beurkkk).
> > > The probleme is the that the servlet for the web services is not
> > > processed
> > > by my tapestry filter.
> > >
> > >
> > > <context-param>
> > >         <param-name> tapestry.app-package</param-name>
> > >         <param-value>com.me.indexer</param-value>
> > >     </context-param>
> > >
> > >     <filter>
> > >         <filter-name>app</filter-name>
> > >         <filter-class> org.apache.tapestry.TapestryFilter</filter-class>
> > >     </filter>
> > >
> > >     <filter-mapping>
> > >         <filter-name>app</filter-name>
> > >         <url-pattern>/*</url-pattern>
> > >     </filter-mapping>
> > >
> > >     <listener>
> > >         <listener-class>
> > > com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> > > </listener-class>
> > >     </listener>
> > >     <servlet>
> > >         <servlet-name>SearchWS</servlet-name>
> > >         <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet
> > > </servlet-class>
> > >         <load-on-startup>1</load-on-startup>
> > >     </servlet>
> > >
> > >     <servlet-mapping>
> > >         <servlet-name>SearchWS</servlet-name>
> > >         <url-pattern>/SearchWS</url-pattern>
> > >     </servlet-mapping>
> > >
> > > So i can't write something like this :
> > >
> > >
> > > @WebService
> > > public class Searcher {
> > >
> > >     private static final String START_DOC = "<result>\n";
> > >     private static final String END_DOC = "\n<result>";
> > >
> > >     @Inject
> > >     @Service("Indexer")
> > >     private Indexer indexer;
> > >
> > >     ....
> > > }
> > >
> > > How can I do to use tapestry 5 IoC in this contexte ?
> > >
> > > Thank's
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
>
>
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>

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


Re: T5 IoC for WebServices (jax-ws)

Posted by Howard Lewis Ship <hl...@gmail.com>.
Further, the "magic" injection right into private variables is a function of
Tapestry's class transformation system; it's limited to Tapestry pages and
components, which exist within specific packages.  A more seamless solution
for exposing Tapestry IoC services as web services is possible, but not in
scope.  I'm so busy now that breathing is barely in scope.

On 5/29/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> The Tapestry filter puts the Registry into the ServletContext.  You should
> be able to write a small wrapper implementation of your web service that
> obtains the real implementation from the Registry and delegates all methods
> to it.  Your Tapestry IoC implementation can use all the standard means of
> injection.
>
> On 5/29/07, David Avenante <d....@gmail.com> wrote:
> >
> > Hi ;)
> >
> > I need to expose some services with webservices (beurkkk).
> > The probleme is the that the servlet for the web services is not
> > processed
> > by my tapestry filter.
> >
> >
> > <context-param>
> >         <param-name> tapestry.app-package</param-name>
> >         <param-value>com.me.indexer</param-value>
> >     </context-param>
> >
> >     <filter>
> >         <filter-name>app</filter-name>
> >         <filter-class> org.apache.tapestry.TapestryFilter</filter-class>
> >     </filter>
> >
> >     <filter-mapping>
> >         <filter-name>app</filter-name>
> >         <url-pattern>/*</url-pattern>
> >     </filter-mapping>
> >
> >     <listener>
> >         <listener-class>
> > com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> > </listener-class>
> >     </listener>
> >     <servlet>
> >         <servlet-name>SearchWS</servlet-name>
> >         <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet
> > </servlet-class>
> >         <load-on-startup>1</load-on-startup>
> >     </servlet>
> >
> >     <servlet-mapping>
> >         <servlet-name>SearchWS</servlet-name>
> >         <url-pattern>/SearchWS</url-pattern>
> >     </servlet-mapping>
> >
> > So i can't write something like this :
> >
> >
> > @WebService
> > public class Searcher {
> >
> >     private static final String START_DOC = "<result>\n";
> >     private static final String END_DOC = "\n<result>";
> >
> >     @Inject
> >     @Service("Indexer")
> >     private Indexer indexer;
> >
> >     ....
> > }
> >
> > How can I do to use tapestry 5 IoC in this contexte ?
> >
> > Thank's
> >
>
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com




-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: T5 IoC for WebServices (jax-ws)

Posted by Howard Lewis Ship <hl...@gmail.com>.
The Tapestry filter puts the Registry into the ServletContext.  You should
be able to write a small wrapper implementation of your web service that
obtains the real implementation from the Registry and delegates all methods
to it.  Your Tapestry IoC implementation can use all the standard means of
injection.

On 5/29/07, David Avenante <d....@gmail.com> wrote:
>
> Hi ;)
>
> I need to expose some services with webservices (beurkkk).
> The probleme is the that the servlet for the web services is not processed
> by my tapestry filter.
>
>
> <context-param>
>         <param-name>tapestry.app-package</param-name>
>         <param-value>com.me.indexer</param-value>
>     </context-param>
>
>     <filter>
>         <filter-name>app</filter-name>
>         <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
>     </filter>
>
>     <filter-mapping>
>         <filter-name>app</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>
>     <listener>
>         <listener-class>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> </listener-class>
>     </listener>
>     <servlet>
>         <servlet-name>SearchWS</servlet-name>
>         <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet
> </servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>SearchWS</servlet-name>
>         <url-pattern>/SearchWS</url-pattern>
>     </servlet-mapping>
>
> So i can't write something like this :
>
>
> @WebService
> public class Searcher {
>
>     private static final String START_DOC = "<result>\n";
>     private static final String END_DOC = "\n<result>";
>
>     @Inject
>     @Service("Indexer")
>     private Indexer indexer;
>
>     ....
> }
>
> How can I do to use tapestry 5 IoC in this contexte ?
>
> Thank's
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com