• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

ParamConverterProvider for client side i.e. <jaxrs:client… providers

 
Ranch Hand
Posts: 44
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to convert Java 8 LocalDate in client side received from REST Service in JSON form. I read about  ParamConverterProvider, but looks like it works only for REST resource methods i.e. server side.
Is there any thing to convertt LocalDate on client side.

I tried implementing ParameterHandler<LocalDate> and registered it in jaxrs:client providers. I can see constructor is called , but not the method 'fromString'. Am I missing anything ?
Below is my implementation:

 
Client stub file:



Please note that I am able to fetch JSON string If I invoke resource directly from browser. SO only issue is my JavaLocalDateParamHandler "fromString" method is not called during conversion.

Does it work only on server side where REST resources(i.e. methods with diff annotations) are present
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic