I'm trying to expose a SOAP Webservice using spring-ws with the following requirements. My Webservice will not have anything in the SOAP Body. The webservice payload will be encrypted, signed and everything would be in the SOAP Header.
I would use the wss4j interceptor with spring to extract and verify that before it comes to the endpoint.
My endpoint merely acts as a method just to return a response to the caller. All of the processing happens before it comes to my endpoint.
I'm wondering how should be the mapping for this? Or are they any other patterns for use cases such as this?
I tried with this:
@PayloadRoot(localPart = "*", namespace = "*")
@ResponsePayload public Element handleEmptyBody(@RequestPayload Element requestElement) {
// Handle empty SOAP body here
return requestElement;
}
But this doesn't work. It says it cannot find a mapping.