Details
Description
I am trying to add OutHandlers or just modify the Client when calling a web service and I found that there is no way to do it. Evenmore the authentication scheme actually in place I think it can be more powerfull, since the username and password are now stored in the Spring configuration file, and it is more likely that we want to send the currently logged user.
So I am proposing to modify the XFireClientFactoryBean to allow for configuring fault, input and output handlers.
The Spring configuration would look like:
<bean id="networkViewServiceTarget" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean" lazy-init="true"> <property name="serviceClass"> <value>com.my.company.NetworkViewService</value> </property> <property name="wsdlDocumentUrl"> <!-- WARNING: DO NOT LEAVE any white spaces / enters for the wsdlDocumentUrl !!!! --> <value>http://${echo.server}:${echo.port}/web-services/NetworkViewService?WSDL</value> </property> <property name="namespaceUri"> <value>com.my.company</value> </property> <property name="serviceName"> <value>NetworkViewService</value> </property> <property name="outHandlers"> <list> <bean id="testOutHandler" class="my.company.ClientSecurityHandler" /> </list> </property> </bean>
Committed a fix for this to SVN. Thanks.