MCPcopy Index your code
hub / github.com/OpenFeign/feign / encodesSoap

Method encodesSoap

soap/src/test/java/feign/soap/SOAPCodecTest.java:48–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46class SOAPCodecTest {
47
48 @Test
49 void encodesSoap() {
50 Encoder encoder =
51 new SOAPEncoder.Builder()
52 .withJAXBContextFactory(new JAXBContextFactory.Builder().build())
53 .build();
54
55 GetPrice mock = new GetPrice();
56 mock.item = new Item();
57 mock.item.value = "Apples";
58
59 RequestTemplate template = new RequestTemplate();
60 encoder.encode(mock, GetPrice.class, template);
61
62 String soapEnvelop =
63 """
64 <?xml version="1.0" encoding="UTF-8" ?>\
65 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">\
66 <SOAP-ENV:Header/>\
67 <SOAP-ENV:Body>\
68 <GetPrice>\
69 <Item>Apples</Item>\
70 </GetPrice>\
71 </SOAP-ENV:Body>\
72 </SOAP-ENV:Envelope>\
73 """;
74 assertThat(template).hasBody(soapEnvelop);
75 }
76
77 @Test
78 void doesntEncodeParameterizedTypes() throws Exception {

Callers

nothing calls this directly

Calls 5

encodeMethod · 0.95
buildMethod · 0.45
hasBodyMethod · 0.45
assertThatMethod · 0.45

Tested by

no test coverage detected