0 Replies Latest reply on May 11, 2012 3:43 AM by Damien Picard

    JBossws-cxf with spring : JNDI lookup

    Damien Picard Newbie



      I'm trying to deploy a web services web application using jbossws-cxf and Spring managed beans. To do that, I've installed the Spring module using snowdrop, in order to bind my web services implementor to Spring managed beans.


      The jboss-cxf.xml :



      <import resource="classpath:prevoyance-wsfront.xml" />


      <jaxws:endpoint id="ispAccesEndPoint" implementor="#oteli" address="/prevoyance">


                          <bean class='org.jboss.wsf.stack.cxf.InvokerJSE' />





      The implementor bean is defined in prevoyance-wsfront.xml and is rightly injected by Spring. So all things work fine ; except that I need for some beans to retrieve values from JNDI lookup.


      In web.xml, I define an env-entry :










      And in prevoyance-wsfront.xml, I want to retrieve the associated value via a JNDI lookup :



                     <bean id="invokerTarget" class="Invoker">


                                    <bean id="wsdlUrl" class="org.springframework.jndi.JndiObjectFactoryBean">

                                              <property name="jndiName" value="java:comp/env/sourceoWsdlUrl" />






      But Spring is not able to find this entry :



      nested exception is javax.naming.NameNotFoundException: java:comp/env/sourceoWsdlUrl



      I think that when JBossws instantiate the web services, using Spring, the web.xml hasn't been parsed so JNDI entries don't exist. And i'm looking for another way to define such entries, or a manier to parse the web.xml before JBossws instantiate web services implementors.


      Thank you.