Announcement Announcement Module
Collapse
No announcement yet.
wsdl generation and placeholders Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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:

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

    Code:
    <soap:address location="http://${host.name}:${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: http://forum.springframework.org/showthread.php?t=11347

    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.

    Comment

    Working...
    X