cancel
Showing results for 
Search instead for 
Did you mean: 

How can we customize/override DateAdapter of de.hybris.platform.webservicescommons.jaxb.adapters?

SumitM01
Explorer
0 Kudos
231

Hi All,

OOTB DateAdapter class from webservicescommons has UTC time zone hardcoded. We need to make it system default time, but tried multiple ways to override the Adapter but nothing. 

de.hybris.platform.webservicescommons.jaxb.adapters.DateAdapter 

Can some suggest if there is any way we can override DateAdapter? There is one custom TimeZoneDateAdapter, we followed that process also to define our customer Date Adapter, but it didn't work.

SumitM01_0-1739385484048.png

Updated screenshots :

SumitM01_1-1739446247030.pngSumitM01_2-1739446269600.png

Solution for 2211.29:

SumitM01_0-1739523508881.png

 

 

Thanks.

View Entire Topic
cieslo
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I can see that you tried to follow the steps described on Help page: Custom Configuration of the HTTP Message Converters. However from the screenshot I can see that you still used the OOTB DateAdapter. Have you tried implementing your own adapter and adding it to the list instead of the OOTB one? Keep in mind that this change will affect only the webservice available in your custom extension. If you wish to implement this change globally you would need to use a mechanism to change OOTB files. A simple way to achieve that is to use buildcallbacks in your custom extension and use ant to replace the OOTB list of adapters with the custom one. You can check an example how to do it in this answer. Hope this helps.

SumitM01
Explorer
0 Kudos
That screenshot is for reference only. But yes we tried to modify the list by adding our custom adapter (Updated screenshot in Post). But it didn't work, Can you please check once if anything missing? Else will try buildcallbacks.