4 Replies Latest reply on Oct 7, 2014 3:12 PM by steeveb

    How can i access to subresources using ErraiJaxRS?

    steeveb

      Hi all,

       

      I'm trying to access subresources (as defined here: https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2176)on client side through Errai JaxRS, but i don't managed to do it right yet, could somebody provide help?

       

      Thanks and regards,

       

      Steeve

        • 1. Re: How can i access to subresources using ErraiJaxRS?
          csa

          Hi Steeve,

           

          Can you provide some details? What's the structure of your JAX-RS interface? Where does the actual request go/where should it go? You can check the network tab of Firebug or the Chrome Dev tools to get that information.

           

          Cheers,

          Christian

          • 2. Re: How can i access to subresources using ErraiJaxRS?
            steeveb

            Hi Christian,

             

            Here is an example of what i would like to do:

            ---- EventService.java

            @Path("events")

            public interface EventService {

             

            @Path("locations")

              LocationService getLocationService();

             

            }

            -------- LocationService.java

            public interface LocationService {

             

            @POST

            @Consumes(MediaType.APPLICATION_JSON)

              long createLocation(Location location);

             

            }

             

            My idea is to access to LocationService through EventService, though it is compliant with Jersey API, i cannot use this with Errai JaxRS. For the time being the request is not even sent because the Location Service is not found in proxy providers on client side.

             

            Thanks for your help!

             

            Steeve

            • 3. Re: How can i access to subresources using ErraiJaxRS?
              csa

              Hi Steeve,

               

              OK I understand. We don't currently generate proxies for types that don't themselves carry a @Path annotation. Can you create a JIRA (feature request) for us? If you're interested you can also take a stab at implementing it and send us a pull request!

               

              Cheers,

              Christian

              • 4. Re: How can i access to subresources using ErraiJaxRS?
                steeveb

                Hi Christian,

                 

                Ok i will create a Jira and i will give it a try

                 

                Regards,

                 

                Steeve