Je suis authentification Mis en œuvre par WS-Security sur mon webservice comme décrit à http://static.springframework.org/spring-ws/sites/1.5/reference/html/security.html, comme ceci:Spring WS-Security visible dans WSDL
<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> ...
Toutefois, les clients (comme SoapUI) ne savent pas qu'ils devrait utiliser la sécurité, car il n'est pas mentionné dans le WSDL. Comment puis-je l'obtenir? Voilà comment je générer:
<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>
Apparemment, j'ai mal compris WS-sécurité et il est impossible de préciser dans le WSDL. N'hésitez pas à contredire cela, cependant. –