I've implemented authentication through WS-Security on my webservice as described at http://static.springframework.org/spring-ws/sites/1.5/reference/html/security.html, like so:
<bean id="callbackHandler" class="org.springframework.ws.soap.security.wss4j.callback.SimplePasswordValidationCallbackHandler">
<property name="users">
<props>
<prop key="bart">arnie</prop>
</props>
</property>
</bean>
<bean id="annotationMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<list>
<bean class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="validationActions" value="UsernameToken" />
<property name="securementActions" value="NoSecurity" />
<property name="validationCallbackHandler" ref="callbackHandler" />
</bean> ...
However, clients (like SoapUI) don't know that they should use security, because it's not mentioned in the WSDL. How can I get it to be? This is how I generate it:
<bean id="qwertyService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schemaCollection" ref="schemaCollection" />
<property name="portTypeName" value="QwertyService" />
<property name="locationUri" value="/QwertyService/" />
<property name="targetNamespace" value="http://www.ead2.nl/demo/wsdl" />
</bean>