when i tried to manage DI JAX-WS web services by configuring them as beans in Spring application context xml file like this:

<bean class=”org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter” />

<bean id=”partyService” class=”com.nilesys.ocean.services.party.PartyServiceImpl” >
<property name=”partyDAO” ref=”partyDAO”/>
</bean>

I got this exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0’ defined in ServletContext resource [/WEB-INF/spring-conf/services.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedOperationException: NOT SUPPORTED

after 4 hours of googing  and searching i figured out that adding lazy-init=”true” to the SimpleJaxWsServiceExporter bean will solve the problem like this:

<bean class=”org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter” lazy-init=”true” />

<bean id=”partyService” class=”com.nilesys.ocean.services.party.PartyServiceImpl” >
<property name=”partyDAO” ref=”partyDAO”/>
</bean>

i wish this could help you as i didn’t found a solution for this exact problem by googling it.

Advertisements