Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Log soap Request and Response to database in Apache CXF  RSS feed

 
Rakesh Kayaprathodi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In my project, I need to log the soap Request and Response in database in Apache CXF. In each web service request, we generate a unique ID and this ID will be the primary key in database for logging the soap request & response.

I have tried the LoggingInInterceptor. We prefer to put the interceptor configuration in XML or in static block so that it will be instantiated only once. But in this scenarios we are not able to pass the  unique ID to the interceptor .

So we tried to create a custom interceptor and instantiate this interceptor in each request by passing the unique ID in the constructor.Log the details in database using this ID in handleMessage() method.

Is there any better way to do this?


Thanks in advance.....

Rakesh.
 
Vijitha Kumara
Bartender
Posts: 3992
27
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rakesh Kayaprathodi wrote:... But in this scenarios we are not able to pass the  unique ID to the interceptor ...


One suggestion is that you could have id generation within the interceptor itself or from a DB or some data source?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!