jersey
  1. jersey
  2. JERSEY-1653

@BeanParam with proxy client does not work

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-m11
    • Fix Version/s: backlog
    • Component/s: core
    • Labels:
      None
    • Environment:

      Glassfish 4.0 b72

      Description

      @BeanParam with proxy client does not work

      It does not send through the @HeaderParam's in the request... and the SmsResponse from the proxy method call is null.

      For example...

      @Path( "/" )
      public interface ZengMessagingService
      {
          @GET
          @Path( "/sms" )
          @BeanParam
          SmsResponse sendSms( @BeanParam SmsRequest request );
      
      }
      
      public class SmsRequest
      extends OneTimePasswordRequest
      {
          @HeaderParam( "delivery-mode" )
          private int deliveryMode;
      
          @HeaderParam( "categ" )
          private String subscriptionCategory;
      
      ...
      
      public class SmsResponse
      extends OneTimePasswordResponse
      {
          @HeaderParam( "provisioning-code" )
          private String provisioningCode;
      
      ...
      
      Client client = ClientFactory.newClient();
      WebTarget target = client.target( "http://localhost:" + port + "/" );
      ZengMessagingService zengMessagingService = WebResourceFactory.newResource( ZengMessagingService.class, target );
      SmsResponse smsResponse = zengMessagingService.sendSms( smsRequest );
      

        Activity

        Hide
        aaronjwhiteside added a comment -

        Probably related to JERSEY-1654

        Show
        aaronjwhiteside added a comment - Probably related to JERSEY-1654
        Hide
        aaronjwhiteside added a comment -

        Even if I change the sendSms() method from @GET to @POST in my example, it still does not pass through the @HeaderParam's in SmsRequest.

        Show
        aaronjwhiteside added a comment - Even if I change the sendSms() method from @GET to @POST in my example, it still does not pass through the @HeaderParam's in SmsRequest.
        Hide
        walec51 added a comment - - edited

        @BeanParam support is simply not implemented yet in Jersey Proxy Client
        https://github.com/jersey/jersey/blob/master/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java

        generally Jersey Proxy Client seams pretty week compared to RESTEasy's Client framework and adding @BeanParam will require a big refactoring of that WebResourceFactory

        Show
        walec51 added a comment - - edited @BeanParam support is simply not implemented yet in Jersey Proxy Client https://github.com/jersey/jersey/blob/master/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java generally Jersey Proxy Client seams pretty week compared to RESTEasy's Client framework and adding @BeanParam will require a big refactoring of that WebResourceFactory

          People

          • Assignee:
            Unassigned
            Reporter:
            aaronjwhiteside
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: