[jboss-user] [JBoss Web Services] - JBossws-cxf with spring : JNDI lookup

Damien Picard do-not-reply at jboss.com
Fri May 11 03:44:01 EDT 2012


Damien Picard [https://community.jboss.org/people/damienp] created the discussion

"JBossws-cxf with spring : JNDI lookup"

To view the discussion, visit: https://community.jboss.org/message/734966#734966

--------------------------------------------------------------
Hi,

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">
      <jaxws:invoker>
                    <bean class='org.jboss.wsf.stack.cxf.InvokerJSE' />
        </jaxws:invoker>
</jaxws:endpoint>


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 :


          <env-entry>
                    <env-entry-name>sourceoWsdlUrl</env-entry-name>
                    <env-entry-type>java.lang.String</env-entry-type>
                    <env-entry-value>http://...</env-entry-value>
           </env-entry>


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


               <bean id="invokerTarget" class="Invoker">
                    <constructor-arg>
                              <bean id="wsdlUrl" class="org.springframework.jndi.JndiObjectFactoryBean">
                                        <property name="jndiName" value="java:comp/env/sourceoWsdlUrl" />
                              </bean>
                    </constructor-arg>
               </bean>


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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/734966#734966]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120511/6a7e9f2e/attachment-0001.html 


More information about the jboss-user mailing list