Hi,
Can Anyone help me to explain how to pass addtional data to the SoapHandler, for every webservice invocation made in ProxyFactoryBean.
FWWSProxyFactoryBean extends JaxRpcPortProxyFactoryBean & registers the FWSoapHandler. I want to pass a HashMap object called "callInfo" (attribute of the FWWSProxyFactoryBean), to the FWSoapHandler for every invocation made.
Basically the handler needs this hashmap to construct the SoapHeader before invoking the webservice.
I have passed some values via the config object to the Handler, but the config should contain only the application scoped objects, as I can set the config object only when the Handler is registered for the first time. But I could not figure out how to pass data to the handler, for every webservice invocations.
public class FWWSProxyFactoryBean extends JaxRpcPortProxyFactoryBean
{
..........
protected void postProcessJaxRpcService(Service service) {
HashMap config = getSoapHeaderProperties();
logger.info("Soap Header Details:" + config);
QName port = new QName(this.getNamespaceUri(), this.getPortName());
List list = service.getHandlerRegistry().getHandlerChain(port) ;
list.add(new HandlerInfo(FWSoapHandler.class, config , null));
logger.info("Registered JAX-RPC Handler ["
+ FWSoapHandler.class.getName() + "] on port " + port);
}
.......
}
<bean id="WSProxy"
class="com.bntaw.avl.fw.wsclient.FWWSProxyFactoryB ean" >
<property name="serviceInterface">
<value>${serviceInterface}</value>
</property>
<property name="wsdlDocumentUrl">
<value> ${wsdlDocumentUrl}</value>
</property>
<property name="namespaceUri">
<value>${namespaceUri}</value>
</property>
<property name="serviceName">
<value>${serviceName}</value>
</property>
<property name="portName">
<value>${portName}</value>
</property>
<property name="callInfo">
<map></map>
</property>
</bean>
<bean id="FWWSClient" class="com.bntaw.avl.fw.wsclient.FWWSClient" >
<property name="service">
<ref bean="WSProxy"></ref>
</property>
</bean>
Regards
Agilan


Reply With Quote