Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-634

Support for fake path parameters in RESTeasy client

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Obsolete
    • Major
    • None
    • 2.3-RC1
    • None

    Description

      I use RESTeasy for server and client. Client shares this service interface with server:

      public interface Service {
          @Path("/start")
          @GET
          void start();
      }
      

      Implementation of this service is bound to path /api, so method start() is accessible on full path /api/start. On client side is code pretty straightforward:

      RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
      Service service = ProxyFactory.create(Service.class, "http://server/api");
      service.start();
      

      I want to have path case insensitive, so I use fake path parameter with regular expression in it:

      public interface Service {
          @Path("/{start:[Ss]tart}")
          @GET
          void start();
      }
      

      Now ProxyFactory on client doesn't know value for substitution path parameter

      {start}

      and client ends with exception "You did not supply enough values to fill path parameters". But when i try to use path parameter as method argument, it works.

      public interface Service {
          @Path("/{start:[Ss]tart}")
          @GET
          void start(@PathParam("start") String param);
      }
      

      There is no simple solution for handling those fake path parameters in RESTeasy client, or I missed something? Thanks.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            mschayna_jira Martin Schayna (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: