Announcement Announcement Module
Collapse
No announcement yet.
JaxWsPortProxyFactoryBean - add additional advice - After Throwing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JaxWsPortProxyFactoryBean - add additional advice - After Throwing

    I wondering if it's possible to add additional advice to the JaxWsPortProxyFactoryBean.

    I want to execute "After Throwing" advice on my JaxWsPortProxyFactoryBean in order to capture certain exceptions being thrown from the web service interface.

    Is this the way to handle this??

    I looked through the source code and it seems like the best way to do this would be to add more advice on the proxyfactory which is actually being created by the JaxWsPortFactoryBean.

    IE:
    Code:
    ProxyFactory pf = new ProxyFactory();
    		pf.addInterface(getServiceInterface());
    		pf.addInterface(BindingProvider.class);
    		pf.addAdvice(this);
    		this.serviceProxy = pf.getProxy(this.beanClassLoader);
    I was under the assumption I could just add another pf.addAdvice(myAfterThrowingAdviceObject). From the javadocs that call should add the Advice and make it available to all method calls within the proxy. I created something similar and the advice I'm adding to the proxy factory is a spring managed after throwing advice pojo.

    The only problem is this advice never gets called...ever.

    The proxy being created is a JDK proxy.
Working...
X