Hi Everyone
I'm using XFire for a project and it's working fine. My question is about
dynamic clients. I'm using xfire with spring, to dynamically create proxy
clients to my web services, using a customized XFireClientFactoryBean, just
to add dynamically a base wsdl for each client.
Now I have requirements that need to pass to this clients in execution time
the authentication token. But when I try to get this clients to add the
proper customized OutHandler that provides the username and password token
based on the application parameters, I always get a Proxy, that don't have
the addOutHandler() or setOutHandlers() methods.
How can I set my custom OutHandler to my client if my client is a Proxy?

Here is the configuration:

<beans xmlns="http://www.springframework.org/schema/beans " xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
xmlns:lang="http://www.springframework.org/schema/lang
" xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                           http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
" default-autowire="byName" default-lazy-init="false">
   <bean id="webServiceClientFactoryBean" abstract="true" class="
my.package.MyWebServiceClientFactoryBean ">
       <property name="baseWSDLDocumentURL" value="
http://localhost:8080/webservices/"; />
       <property name="outHandlers">
           <list>
               <bean class="my.package.MySoapClientAuthHandler"/><!-- this
guy here handles the token to include the proper SOAP header -->
           </list>
       </property>
   </bean>
   <bean id="myWebServiceClient" parent="webServiceClientFactoryBean">
       <property name="serviceClass" value="
my.package.MyWebServiceInterface " />
   </bean>
</beans>

Thanks in advance

Rafael Mauricio Nami

Reply via email to