-
May 8th, 2009, 06:34 AM
#1
Junit test web services
I have a web services for client configuration as following:
<bean id="bn_appAccessService" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName" value="java:comp/env/service/AppAccessService" />
</bean>
It works just fine. But when I run a Junit test, I got the following error:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'bn_appService' defined in class path resource [app_beans_test.xml]: Cannot resolve reference to bean 'bn_userroles' while setting bean property 'm_authorizer'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'bn_userroles' defined in class path resource [app_beans_test.xml]: Cannot resolve reference to bean 'bn_appAccessService' while setting bean property 'm_appaccess'; nested exception is org.springframework.beans.factory.BeanCreationExce ption:
Error creating bean with name 'bn_appAccessService' defined in class path
resource [app_beans_test.xml]: Invocation of init method failed; nested exception is
javax.naming.NoInitialContextException: Need to specify class name in environment or
system property, or as an applet parameter, or in an application resource file:
java.naming.factory.initial
I was tolled taht I need to use a hessian client and Spring framework provides utilities to do this from within spring configuration. Can some one give me an example?
-Henry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules