• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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
Water proof donuts! Eat them while reading this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic