Hello,
I'm writing web service with Spring and Spring WS Security. And I have the following configuration in my server:
My Java Endpoint:Code:<!-- My applicationContext --> <bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="interceptors"> <list> <ref local="wsServerSecurityInterceptor" /> </list> </property> </bean> <bean id="wsServerSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor"> <property name="validationActions" value="Signature"/> <property name="validationSignatureCrypto"> <ref bean="serverCrypto" /> </property> </bean> <bean id="serverCrypto" class="org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean"> <property name="keyStorePassword" value="mypasswd"/> <property name="keyStoreLocation" value="classpath:keystores/server-keystore.jks"/> </bean>
But when my client sends a Timestamped SOAP message, my server says:Code:@Endpoint public class MyServiceEndpoint { private final static String NAMESPACE_URI = "http://www.example.com/service"; @PayloadRoot(localPart = "ServiceRequest", namespace = NAMESPACE_URI) @ResponsePayload public ServiceResponse handleRequest(@RequestPayload ServiceRequest serviceRequest) throws Throwable { log.debug(serviceRequest.getTransactionID()); return null; } }
Well, it looks like my client sends a valid message, but service is not understanding message's Security part...Code:DEBUG org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping - Looking up endpoint for [{http://www.example.com/service}ServiceRequest] DEBUG org.springframework.ws.soap.server.SoapMessageDispatcher - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@128c73f] maps request to endpoint [public messages.ServiceResponse endpoints.MyServiceEndpoint.handleRequest(messages.ServiceRequest) throws java.lang.Throwable] DEBUG org.springframework.ws.soap.server.SoapMessageDispatcher - Handling MustUnderstand header {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security WARN org.springframework.ws.soap.server.SoapMessageDispatcher - Could not handle mustUnderstand headers: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security. Returning fault
Can someone help me with this issue?
P.S. I've found a very similar thread, but it didn't help me![]()


Reply With Quote
