like poutsma said, i has implement SoapEndpointInterceptor.handleResponse()
i wanted to add an attribute Id to the soap body (to sign the body later), but when i add it:
Code:
SoapMessageContext soapMessageContext = (SoapMessageContext)messageContext;
SoapMessage messageResponse = soapMessageContext.getSoapResponse();
SoapEnvelope envelope = messageResponse.getEnvelope();
Source envelopeSource = envelope.getSource();
Document docEnvelopeSource = toDomMessagePayload(envelopeSource);
//Id attribute creation
Element body = (Element)docEnvelopeSource.getElementsByTagNameNS("http://schemas.xmlsoap.org/soap/envelope/", "Body").item(0);
logger.info("[SignatureInterceptor.handleResponse] body.getTagName(): " + body.getTagName());
body.setAttribute("Id", identificador);
when in the client look the response, the body hasn't the attribute Id, and not verify the sign.