I continue with my project with testing aop and make some basic tests. I find that with version 3.0.0+ RequestCreators.withSoapEnvelope can not find endpoint because of different implementation of SaajSoapMessage. In version 3.0.0+ envelop is already set up because of method getVersion in constructor. And RequestCreators is trying to change document after envelop in SaajSoapMessage si already initialized. I made my custom withEnhancedSoapEnvelope and add just one line to reinitialized envelop after document from test is set and test is now OK:
soapMessage.setDocument((Document) result.getNode());
// TODO magic line here
soapMessage.setSaajMessage(soapMessage.getSaajMessage());
Tomas Hudec opened SWS-1019 and commented
I continue with my project with testing aop and make some basic tests. I find that with version 3.0.0+ RequestCreators.withSoapEnvelope can not find endpoint because of different implementation of SaajSoapMessage. In version 3.0.0+ envelop is already set up because of method getVersion in constructor. And RequestCreators is trying to change document after envelop in SaajSoapMessage si already initialized. I made my custom withEnhancedSoapEnvelope and add just one line to reinitialized envelop after document from test is set and test is now OK:
soapMessage.setDocument((Document) result.getNode());
// TODO magic line here
soapMessage.setSaajMessage(soapMessage.getSaajMessage());
All online in my github:
https://github.com/hudi1/aop-test/blob/master/src/test/java/org/example/CountryEndpointTest.java
Affects: 3.0.0.RELEASE
Reference URL: https://github.com/hudi1/aop-test
Issue Links:
("duplicates")
5 votes, 7 watchers
The text was updated successfully, but these errors were encountered: