Skip to content

Commit cb4af91

Browse files
authored
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.
1 parent 6b1b889 commit cb4af91

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

soap/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,11 @@ api = Feign.builder()
4747
.decoder(new SOAPDecoder(jaxbFactory))
4848
.errorDecoder(new SOAPErrorDecoder())
4949
.target(MyApi.class, "http://api");
50-
```
50+
```
51+
52+
In certain situations the declarations on the SOAP envelope are not inherited by JAXB when reading the documents. This is particularly
53+
troublesome when it is not possible to correct the XML at the source.
54+
55+
To account for this situation, use the `useFirstChild` option on the `SOAPDecoder` builder. This will instruct JAX be to use `SOAPBody#getFirstChild()`
56+
instead of `SOAPBody#extractContentAsDocument()`. This will allow users to supply a `package-info.java` to manage the element namespaces
57+
explicitly and define what should occur if the namespace declarations are missing.

0 commit comments

Comments
 (0)