-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
proposalProposed Specification or API changeProposed Specification or API changewaiting for votesEnhancements or changes proposed that need more support before considerationEnhancements or changes proposed that need more support before consideration
Description
Hi,
It would be great, if there could be some support of SoapHeaders when you are using Feign for legacy Soap calls. I just recently came to legacy API, where it was mandatory.
And having something like this would be absolutely amazing as headers might be marshalled objects.
@RequestLine("POST /getObject")
@Headers({
"SOAPAction: getObject",
"Content-Type: text/xml"
})
MyJaxbObjectResponse getObject(@SoapHeader MyJaxbHeader header, MyJaxbObjectRequest request);
Second best thing would be method annotation where you could define per method interceptor @SoapHeader(MyJaxbHeaderInterceptor.class)
The simplest solution (which I chose as it is the simplest one and it fit my need) would be to add interceptor in builder (to encoder).
I created copy of SoapEncoder SoapEncoderWithHeader(JAXBContextFactory jaxbContextFactory, MyJaxbHeaderInterceptor headerInterceptor) and I only had to add following two lines in encode method:
Marshaller headerMarshaller = jaxbContextFactory.createMarshaller(interceptor.getHeaderClass());
headerMarshaller.marshal(interceptor.createHeader(), soapMessage.getSOAPHeader());
ygorovitch, taboubim, david-vdd, CakeSpork, akashborkar and 6 more
Metadata
Metadata
Assignees
Labels
proposalProposed Specification or API changeProposed Specification or API changewaiting for votesEnhancements or changes proposed that need more support before considerationEnhancements or changes proposed that need more support before consideration