Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-182

Order of setting properties in WebServiceGatewaySupport

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.1
    • Component/s: Core
    • Labels:
      None

      Description

      In WebServiceGatewaySupport the set* properties delegate to WebServiceTemplate in the moment the call is made.
      As long as one uses the default WebServiceTemplate there is no problem.
      But as soon as using a custom WebServiceTemplate the order the properties are becomes critical, fact that should not be the case.
      E.g.

      if I have:
      <bean id="airlineClient" class="org.springframework.ws.samples.airline.client.sws.AirlineClient">
      <property name="marshaller" ref="marshaller"/>
      <property name="unmarshaller" ref="marshaller"/>
      <property name="defaultUri" value="http://localhost:8080/airline/services"/>
      <property name="webServiceTemplate" ref="myWebServiceTemplate"/>
      </bean>
      will fail when used as the delegate will go to the default template, template that is replaced in the last property set with my template.
      If I have :
      <bean id="airlineClient" class="org.springframework.ws.samples.airline.client.sws.AirlineClient">
      <property name="webServiceTemplate" ref="myWebServiceTemplate"/>
      <property name="marshaller" ref="marshaller"/>
      <property name="unmarshaller" ref="marshaller"/>
      <property name="defaultUri" value="http://localhost:8080/airline/services"/>
      </bean>
      everithing works file since teh web template is already set before the delegate take place.

      I suggest that delegates takes place in afterPropertiesSet not in the set* methods.

        Attachments

          Activity

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              adreghiciu Alin Dreghiciu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: