I need to build a webservice that includes a SOAP Header in the response with spring-ws.
My endpoint processes the request header, then returns the Element that will be the SOAP Body response.
What I need to do is to add a SOAP Header to that response, using the information from the request header.
The only way that I know how to do that is using an interceptor, but that way I don't know how to obtain the header object that I've unmarshalled from the request.
I'm using this way to write my endpoint, as I want to unmarshall and validate the header in my code:
public void handle(@RequestPayload DOMSource domSource, SoapHeader header)
However, the documentation also has this alternative
public void handle(@RequestPayload MyJaxb2Object requestObject, @RequestPayload Element element, Message messageContext)
But that doesn't work for me because I don't want to unmarshall the payload, only the header.
I'm using Spring-ws 2.2.0. http://ift.tt/1LJ0eAz
Thanks a lot Regards
Aucun commentaire:
Enregistrer un commentaire