Injecting jaxws:endpoint configuration published URL

582 views Asked by At
<jaxws:endpoint id="serviceEndpoint" implementor="#serviceImpl" address="/public/api/service/v1"" publishedEndpointUrl="#{serviceImpl.endpointUrl}"> </jaxws:endpoint> 

<bean id="serviceImpl" class="com.services.ServiceProviderImpl" autowire="byType"> </bean>

I need to populate publishedEndpointUrl refering a variable in my implementor bean. (ServiceProviderImpl) Please let me know the way I can make it. I refereed http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html.

Making it publishedEndpointUrl="#{serviceImpl}.publishedUrl" does not make work ?

Thanks

1

There are 1 answers

6
Gary Russell On BEST ANSWER

Assuming ServiceProviderImpl has a public getter getPublishedUrl(), the syntax you need is

#{serviceImpl.publishedUrl}

In future, when adding questions here, "does not work" is not useful at all.

Always provide the error message and/or stack trace.