Web services 使用nonce的Spring WS-digest身份验证,创建质询

Web services 使用nonce的Spring WS-digest身份验证,创建质询,web-services,soap,soap-client,spring-ws,Web Services,Soap,Soap Client,Spring Ws,我对soapweb服务比较陌生,这似乎是一件基本的事情,但我仍然找不到解决它的方法。我有一个使用SpringWS和XWS安全性编写的SOAP服务器。以下是相关bean: <bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor"> <property name="policyConfiguration"

我对soapweb服务比较陌生,这似乎是一件基本的事情,但我仍然找不到解决它的方法。我有一个使用SpringWS和XWS安全性编写的SOAP服务器。以下是相关bean:

<bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor">
    <property name="policyConfiguration"
            value="classpath:security-policy.xml"/>
    <property name="callbackHandlers">
        <list>
            <ref bean="passwordValidationHandler"/>
        </list>
    </property>
</bean>

<bean id="passwordValidationHandler" class="org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler">
    <property name="users">
        <props>
            <prop key="user">*****</prop>
        </props>
    </property>
</bean>

问题是,我想使用nonce(一种防止再次发送截获请求的一次性令牌)来扩展摘要身份验证。据我所知(这里也有描述),服务器应该创建一个质询(我认为是nonce和timestamp),然后客户端应该使用密码和时间戳对其进行加密,并将其发送回服务器进行验证。这应该适用于每一个请求。即使用户发送了一个空请求,服务器也应该提供一个质询。但在我的情况下,它不起作用。我遗漏了什么吗?

当它出现时,不一定是服务器应该生成nonce。我在客户机上生成了它,根据数据连接和散列,然后发送到服务器。坦率地说,我只能通过调试SpringWS源代码并查找身份验证问题的确切位置来找到错误的根源

<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
    <xwss:RequireUsernameToken passwordDigestRequired="true" nonceRequired="true"/>
    <xwss:UsernameToken digestPassword="true" useNonce="true"/>
</xwss:SecurityConfiguration>