Announcement Announcement Module
Collapse
No announcement yet.
Junit test web services Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X