-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments:
- We prefer package-private visibility. Would it be possible to move the
SOAPEncoder
andSOAPDecoder
classes up one level intofeign.jaxb
and 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
Charset
should be optional, as it is for the rest of Feign. Can you refactor setting the defaultCharset
toUtil.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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice (for maintenance) to move this to files inside src/test/resources/samples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Velo,
I externalized the SOAP Envelop in corresponding XML files.
soap/README.md
Outdated
|
||
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: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addd java
after ```java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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