Spring WS Intercept Request Response Soap Messages

You may also like...

Subscribe
Notify of
guest
5 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Raghu Kishore Kasturi
Raghu Kishore Kasturi
November 9, 2017 21:25

Thank you!

Ryan
Ryan
September 20, 2019 14:22

Thanks so much. It helped me tackling the problem.

Robert Oschwald
Robert Oschwald
November 6, 2019 14:02

In Spring-WS-Core 2.4.x, it doesn’t work this way anymore. It seems SmartInterceptors are obtained by their bean type, not in the interceptor array anymore.

So define PayloadRootSmartSoapEndpointInterceptor just as beans.

@Bean
PayloadValidatingInterceptor myEndpointValidatingInterceptor() {
PayloadValidatingInterceptor interceptor = new PayloadValidatingInterceptor()
interceptor.schema = new ClasspathResource(MyEndpoint.SCHEMA_FILE_NAME)
interceptor.validateRequest = true
interceptor.validateResponse = true
return interceptor
}

// Per Endpoint Namespace validator. Obtained by type.
@Bean
PayloadRootSmartSoapEndpointInterceptor myEndpointValidator() {
return new PayloadRootSmartSoapEndpointInterceptor(myEndpointValidatingInterceptor(), MyEndpoint.NAMESPACE_URI, null)
}

William
William
May 5, 2021 14:15

Thank you!

Emiliano Nunez
Emiliano Nunez
January 8, 2022 03:19

Thanks! How can I log raw body payload?

5
0
Would love your thoughts, please comment.x
()
x