Announcement Announcement Module
No announcement yet.
wsdl generation and placeholders Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • wsdl generation and placeholders

    First... Spring Web Services is working amazingly well for me so far. Congratulations on a job well done.

    I'm working on wsdl generation right now. My servlet context uses place holders for some of the wsdl values, like this:

    <bean id="useradmin" class="">
                Dynamically builds a WSDL from the xsd.
            <property name="builder">
                <bean class="">
                    <property name="schema" value="/WEB-INF/xsd/useradmin.xsd"/>
                    <property name="portTypeName" value="UserAdmin"/>
                    <property name="locationUri" value="http://${}:${tomcat.http.port}/ods/webservice"/>
                    <property name="targetNamespace" value="urn:com:ssn:ods:webservice.generated:UserAdmin.xsd"/>
    However, the place holders are not getting resolved. My wsdl looks like this:

    <soap:address location="http://${}:${tomcat.http.port}/ods/webservice" />
    I have a PropertyPlaceholderConfigurer defined in another of the spring context files, and the placeholders seem to get resolved for beans defined in the other files. I see a lot of refresh methods in the various MessageDispatcher related classes. Do I need to wire one of these up?

  • #2
    This is not an issue with Spring Web Services. It actually relates directly to the functionality of org.springframework.web.servlet.DispatcherServlet.

    I've found a thread in another forum that addresses my question:

    Turns out that:
    a DispatcherServlet has its own application context, just using the
    root web application context as parent. Therefore, it needs to define its
    own BeanFactoryPostProcessors and/or BeanPostProcessors, in this case its
    own PropertyPlaceholderConfigurer.
    I added the PropertyPlaceholderConfigurer to the servlet-context.xml, and it works fine.