Open qligier opened 5 months ago
We are aware of problems with the convenience api and therefore switched to the service api. I'm sorry but I can help on issues with the service api, but not with the convenience api, which should be deleted from my point of view.
@msmock Sorry, the HuskyWebServiceClient is the new service API, not the old convenience API
Dear Quentin, if you know all the solutions to the problems, I suggest you to do the changes, at least if the changes are as simple as it sounds. Ok, for you?
OWT has encountered performance issues with the service API. I had a look and found a few areas of improvement (for performance and code simplification).
In
HuskyWebServiceClient
, a newProducerTemplate
is created for each transaction, that is extremely expensive and inefficient. Per Camel's documentation, a single instance should be (lazily) created, kept and shared for the entire life of the application (or at least the entire life of theHuskyWebServiceClient
instance).In
HuskyWebServiceClient
, there's no need to manually set theAccept
andContent-Type
headers, Camel will take care of it.In
HuskyWebServiceClient
, some transactions are needlessly marshalled/unmarshalled (e.g. ITI-44), Camel will also take care of it.In
HuskyWebServiceClient
, we should not set the interceptor if we are not in debug mode.In
HuskyWebServiceClient
, theAuditContext
is required in the constructor but isn't used; a differentAuditContext
may be used by IPF (depending on it thatCamelContext
is the same that was registered as a bean or not).I'm not sure why we need to manually create an instance of
HuskyWebServiceClient
,HuskyService
could do it by itself.