Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 17th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to log service calls with Proxy created by JaxWsProxyFactoryBean
  2. @Override
  3. public synchronized Object create() {
  4.  
  5.     //do some stuff here
  6.     Object result = super.create();
  7.     //here too
  8.  
  9.     return result;
  10. }
  11.        
  12. public class LoggingHandler implements LogicalHandler<LogicalMessageContext>
  13.        
  14. public boolean handleMessage(LogicalMessageContext context) {
  15.     Boolean outboundProperty = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
  16.  
  17.     if (outboundProperty.booleanValue()) {
  18.         //log here
  19.     } else {
  20.         //or here
  21.     }
  22.     return true;
  23. }