Browse Source

Update SOAP Encoder Documentation for useFirstChild (#1161)

Adds additional informatiom into the Soap README that includes details
on how to instruct the SOAP Decoder to use `getFirstChild` instead
of `extractContentAsDocument` in situations where JAXB is unable
to read any xml declarations on the SOAP Envelope.
pull/1164/head
Kevin Davis 5 years ago committed by GitHub
parent
commit
0d6b78d6b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      soap/README.md

7
soap/README.md

@ -48,3 +48,10 @@ api = Feign.builder() @@ -48,3 +48,10 @@ api = Feign.builder()
.errorDecoder(new SOAPErrorDecoder())
.target(MyApi.class, "http://api");
```
In certain situations the declarations on the SOAP envelope are not inherited by JAXB when reading the documents. This is particularly
troublesome when it is not possible to correct the XML at the source.
To account for this situation, use the `useFirstChild` option on the `SOAPDecoder` builder. This will instruct JAX be to use `SOAPBody#getFirstChild()`
instead of `SOAPBody#extractContentAsDocument()`. This will allow users to supply a `package-info.java` to manage the element namespaces
explicitly and define what should occur if the namespace declarations are missing.
Loading…
Cancel
Save