I have a couple web applications which expose same web service
(Xfire). Now I am writing an application which will utilize those web
services. I use Spring framework to build that application and here is
the problem.

If, within my controller I call my method getClientTest() - everything
works fine: I am able to invoke my service.
[code]
private void getClientTest() {
                logger.debug("Entering getClient()");
                XFireClientFactoryBean client = new XFireClientFactoryBean();
                try{
                    
client.setServiceClass(Class.forName("com.roh.oculus.ws.xfire.FederatedService"));
                    logger.debug("Instance of class loaded.");
                    
client.setWsdlDocumentUrl("http://192.168.0.174:8080/Oculus5/services/FederatedService?wsdl";);
                    logger.debug("WSDL document obtained");
                    client.afterPropertiesSet();
                    logger.debug("after properties are set");
                    client.getObject();
                    logger.debug("client obtained");
                    logger.debug("Authenticated
?"+((FederatedService)(client.getObject())).authenticateDMSUser("user4"));
                }catch(java.lang.ClassNotFoundException e){
                    logger.error("Class not found.\n"+e.getMessage());
                }catch(java.lang.Exception e){
                    logger.error("Some strange exception:\n"+e.getMessage());
                }
                logger.debug("Leaving getClient()");
        
        }
[code]


However, if I try to declare a bean of class
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean, my
application hangs after server restart (Tomcat 5.5.18). There are no
any other configuration files except web.xml applicationContext.xml
and xml config for my controller globalization-servlet.xml.


applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd";>
<beans>

        <bean id="fedsrv"
class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
                <property name="serviceClass">
                        <value>com.roh.oculus.ws.xfire.FederatedService</value>
                </property>
                <property name="wsdlDocumentUrl">
                        <value>
                                
http://66.11.8.174:8080/Oculus5/services/FederatedService?wsdl
                        </value>
                </property>
        </bean>

</beans>

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        /WEB-INF/applicationContext.xml
                        classpath:org/codehaus/xfire/spring/xfire.xml
                </param-value>
        </context-param>
        <context-param>
                <param-name>log4jConfigLocation</param-name>
                <param-value>/WEB-INF/log4j.properties</param-value>
        </context-param>
        <listener>
                <listener-class>
                        org.springframework.web.util.Log4jConfigListener
                </listener-class>
        </listener>
        <listener>
                <listener-class>
                        org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>
        <servlet>
                <servlet-name>globalization</servlet-name>
                <servlet-class>
                        org.springframework.web.servlet.DispatcherServlet
                </servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
                <servlet-name>xfire</servlet-name>
                <servlet-class>
                        org.springframework.web.servlet.DispatcherServlet
                </servlet-class>
        </servlet>
        <servlet-mapping>
                <servlet-name>xfire</servlet-name>
                <url-pattern>/xfire/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
                <servlet-name>globalization</servlet-name>
                <url-pattern>*.htm</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
</web-app>


log4j output
[19 11:32:24.765] INFO [DefaultListableBeanFactory] -
Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans 
[fedsrv,xfire.customEditorConfigurer,xfire.serviceRegistry,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageServiceFactory,xfire.messageBindingProvider];
root of BeanFactory hierarchy]
[19 11:32:24.781] DEBUG [DefaultListableBeanFactory] - Creating shared
instance of singleton bean 'fedsrv'
[19 11:32:24.781] DEBUG [DefaultListableBeanFactory] - Creating
instance of bean 'fedsrv' with merged definition [Root bean: class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean];
abstract=false; singleton=true; lazyInit=false; autowire=0;
dependencyCheck=0; initMethodName=null; destroyMethodName=null;
factoryMethodName=null; factoryBeanName=null; defined in
ServletContext resource [/WEB-INF/applicationContext.xml]]
[19 11:32:24.781] DEBUG [DefaultListableBeanFactory] - Invoking
BeanPostProcessors before instantiation of bean 'fedsrv'
[19 11:32:24.781] DEBUG [DefaultTransportManager] - Registered
transport [EMAIL PROTECTED]
[19 11:32:24.781] DEBUG [DefaultTransportManager] - Registered
transport [EMAIL PROTECTED]
[19 11:32:24.781] DEBUG [DefaultTransportManager] - Registered
transport [EMAIL PROTECTED]
[19 11:32:24.781] DEBUG [DefaultTransportManager] - Registered
transport [EMAIL PROTECTED]
[19 11:32:24.796] DEBUG [CachedIntrospectionResults] - Getting
BeanInfo for class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Caching
PropertyDescriptors for class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'class' of type [java.lang.Class]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'endpoint' of type [javax.xml.namespace.QName]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'faultHandlers' of type [java.util.List]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'inHandlers' of type [java.util.List]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'lookupServiceOnStartup' of type [boolean]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'namespaceUri' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'object' of type [java.lang.Object]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'objectType' of type [java.lang.Class]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'outHandlers' of type [java.util.List]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'password' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'properties' of type [java.util.Map]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'serviceClass' of type [java.lang.Class]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'serviceFactory' of type [org.codehaus.xfire.service.ServiceFactory]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'serviceInterface' of type [java.lang.Class]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'serviceName' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'singleton' of type [boolean]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'url' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'username' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Found property
'wsdlDocumentUrl' of type [java.lang.String]
[19 11:32:24.828] DEBUG [CachedIntrospectionResults] - Class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean] is
cache-safe
[19 11:32:24.828] DEBUG [BeanWrapperImpl] - Converting String to
[class java.lang.Class] using property editor
[EMAIL PROTECTED]
[19 11:32:24.828] DEBUG [BeanWrapperImpl] - About to invoke write
method [public void
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.setServiceClass(java.lang.Class)]
on object of class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean]
[19 11:32:24.843] DEBUG [BeanWrapperImpl] - Invoked write method
[public void 
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.setServiceClass(java.lang.Class)]
with value of type [java.lang.Class]
[19 11:32:24.843] DEBUG [BeanWrapperImpl] - About to invoke write
method [public void
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.setWsdlDocumentUrl(java.lang.String)]
on object of class
[org.codehaus.xfire.spring.remoting.XFireClientFactoryBean]
[19 11:32:24.843] DEBUG [BeanWrapperImpl] - Invoked write method
[public void 
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.setWsdlDocumentUrl(java.lang.String)]
with value of type [java.lang.String]
[19 11:32:24.843] DEBUG [DefaultListableBeanFactory] - Invoking
BeanPostProcessors before initialization of bean 'fedsrv'
[19 11:32:24.843] DEBUG [DefaultListableBeanFactory] - Invoking
afterPropertiesSet() on bean with name 'fedsrv'


Please, guide me on my error. Where is the mistake? Why is my server
just hangs....

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to