[jboss-dev-forums] [JBoss Web Services Development] - RESTEasy ResourceQuery (Class Written vs Components.xml)

Wilson Lima do-not-reply at jboss.com
Mon Apr 23 10:35:13 EDT 2012


Wilson Lima [https://community.jboss.org/people/wilsondesenv] created the discussion

"RESTEasy ResourceQuery (Class Written vs Components.xml)"

To view the discussion, visit: https://community.jboss.org/message/731691#731691

--------------------------------------------------------------
Hi I have been strugling to set up a webservice using Seam 2.1.1, and so far what I have accomplished was to set up a service responding on a ResourceQuery registred inside components.xml:


<resteasy:resource-query name="contaResourceQuery"
        entity-query="#{contaList}" path="/conta"
        entity-class="com.mydomain.estoque.Conta"
        media-types="application/xml application/json application/fastinfoset"/>



But I could not manage writting a class for it. I cannot find the resource.


@Name("contaResourceQuery2")
@Path("/conta2")
public class ContaResourceQuery extends ResourceQuery<Conta> {
 
 
 
}


*Someone could give me a clue how to make the service be reached?*

Also here is the web.xml (just what has to do with resteasy stuff)


<!-- Auto scan REST service -->
    <context-param>
        <param-name>resteasy.scan</param-name>
        <param-value>true</param-value>
    </context-param>
    
    

    <context-param>
        <param-name>resteasy.servlet.mapping.prefix</param-name>
        <param-value>/rest</param-value>
    </context-param>

    <listener>
        <listener-class>
            org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
        </listener-class>
    </listener>

    <servlet>
        <servlet-name>resteasy-servlet</servlet-name>
        <servlet-class>
            org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>resteasy-servlet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/731691#731691]

Start a new discussion in JBoss Web Services Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120423/53463006/attachment.html 


More information about the jboss-dev-forums mailing list