Hi, I'm trying to add a soap header to the soap message I'm sending to the server to include authentication information. I found the link below which suggested that I use BindingProvider's request context to include the header I created.
http://cxf.apache.org/faq.html#FAQ-HowcanIaddsoapheaderstotherequest%252Fresponse%253F And then I found this thread which talks about how I can get the BindingProvider using the Bean Factory I am using (ClientProxyFactoryBean) http://www.nabble.com/BindingProvider-from-JaxWsProxyFactoryBean-td18725385.html I wanted to check my implementation but the client throws the exception below. Any ideas? Exception occurred during event dispatching: java.lang.NoSuchMethodError: org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.setDocumentLoader(Lorg/springframework/beans/factory/xml/DocumentLoader;)V at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.<init>(ControlledValidationXmlBeanDefinitionReader.java:84) at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:218) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269) at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:86) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65) at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54) at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69) at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106) at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97) at org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointFactory.java:73) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:148) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:78) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51) at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:97) at org.vpac.grisu.client.control.ServiceInterfaceFactory.createInterface(ServiceInterfaceFactory.java:233) at org.vpac.grisu.client.control.login.LoginHelpers.login(LoginHelpers.java:57) at org.vpac.grisu.client.view.swing.login.MyProxyLoginPanel.login(MyProxyLoginPanel.java:152) at org.vpac.grisu.client.view.swing.login.MyProxyLoginPanel.access$0(MyProxyLoginPanel.java:142) at org.vpac.grisu.client.view.swing.login.MyProxyLoginPanel$3.actionPerformed(MyProxyLoginPanel.java:189) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3265) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177) at java.awt.Dialog$1.run(Dialog.java:1039) at java.awt.Dialog$3.run(Dialog.java:1091) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1089) at java.awt.Component.show(Component.java:1419) at java.awt.Component.setVisible(Component.java:1372) at java.awt.Window.setVisible(Window.java:801) at java.awt.Dialog.setVisible(Dialog.java:979) at org.vpac.grisu.client.view.swing.mainPanel.Grisu$5.run(Grisu.java:476) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) I'm using CXF 2.1. Here's my client source (line 229) https://projects.arcs.org.au/trac/grisu/browser/branches/grisu-client-cxf/src/main/java/org/vpac/grisu/client/control/ServiceInterfaceFactory.java Thanks, Gerson
