Add SOAP CoDec (+ JAXB modifications)#786
Conversation
4c0129e to
7fb9d10
Compare
|
Hot Take: this looks pretty good overall. We have a few JAXB related changes in flight. I think there will be conflicts going forward. In the meantime, can you look at the Travis build and correct any errors? |
There was a problem hiding this comment.
A few comments:
- We prefer package-private visibility. Would it be possible to move the
SOAPEncoderandSOAPDecoderclasses up one level intofeign.jaxband make the members package-private? The reason for this is that we don't want to leak out our implementation details to users of the library. - Specifying a
Charsetshould be optional, as it is for the rest of Feign. Can you refactor setting the defaultCharsettoUtil.UTF-8? - Can you add a test case that can decode a raw SOAP Envelope and verify that an encoded object produces a valid SOAP Envelope?
|
Ok no problem, I take that into account. |
|
I will also manage for SOAP fault returns and check why StringWriter was originally buggy for me. |
7fb9d10 to
6294155
Compare
|
support wsdl? |
2 similar comments
|
support wsdl? |
|
support wsdl? |
a5d7cd9 to
640d15c
Compare
You'll have to implement your own JAXB classes generation. Afterwhat the Feign API client will be capable of marshall/unmarshall your types. It does not handle WSDL parsing... |
e6101c5 to
013e097
Compare
|
PR is unwip, but don't know why Travis publish fails on jdk11 ...? |
|
Seems I would recommend rebasing on |
013e097 to
2ceedb3
Compare
velo
left a comment
There was a problem hiding this comment.
Added a few comments, I think it's good, but would love to see this big XML entries on .xml files
|
|
||
| public class SOAPFaultDecoderTest { | ||
|
|
||
| private static final String SOAP_1_2_FAULT = "<?xml version=\"1.0\"?>\n" + |
There was a problem hiding this comment.
It would be nice (for maintenance) to move this to files inside src/test/resources/samples
There was a problem hiding this comment.
Hi Velo,
I externalized the SOAP Envelop in corresponding XML files.
|
|
||
| Because a SOAP Fault can be returned as well with a 200 http code than a 4xx or 5xx HTTP error code (depending on the used API), you may also use `SOAPErrorDecoder` in your API configuration, in order to be able to catch `SOAPFaultException` in case of SOAP Fault. Add it, like below: | ||
|
|
||
| ``` |
2ceedb3 to
1cf8851
Compare
|
Hi, |
|
Yeah, it's good to go, sorry for the delay |
|
No problems, I had the source code anyway ;-) |
|
hi @pilak is there an example of how to make this work with WSDL? I have an existing WSDL based webServiceClient template that I would like to move to feign. I'd really appreciate any assistance on to how to use it with WSDL. |
Ready to merge
Thank you