Is it possible to integrate existing SOAP endpoints within Spring Webflux? - java

I have an existing Spring Boot application (on Tomcat 7) which exposes certain REST endpoints using Spring-MVC and SOAP endpoints using CXF.
I am planning to migrate the application to Spring-Webflux to make the REST endpoints reactive, but have not been able to figure out a way to integrate SOAP endpoints to Spring Webflux ServletHttpHandlerAdapter class.
Does Spring Web Flux provide any way to do such a thing ?

Related

Running Spring WebServices alongside Spring WebFlux using Tomcat

Just for context: How to route requests to a different servlet with WebFlux
Shortly, Netty web server is unable to run neither Apache CXF nor Spring WS because they work on top of Servlet API. But what about Tomcat? Tomcat supports newer Servlet API version
which in its turn supports reactive API (webflux).
The question is: Is it possible to run WebFlux with Tomcat server and Spring WS for SOAP ?
One servlet will be used for handling reactive operations, and the other for SOAP actions.
You cannot run webflux on Tomcat using servlet (needed for CXF/Spring WS).

What is the proper way to implement OAuth2 Client and AuthServer in Spring Cloud (Microservice Architecture)

I was learning Microservice architecture from Spring Microservices In Action book.
As one of things I wanted to migrate examples which were built on Spring Boot 1.4.4 and Spring Cloud Camden.SR5 to Spring Boot 2.1.6 and Spring Cloud Greenwich.SR1.
Now, I'm having problems with migrating of OAuth2 Auth server and resource servers since Spring decided to change packages/placement of classes and I feel completly lost since nothing seems to work.
Documentation seems to be splitted into SpringBoot/SpringSecurity/SpringOAuth2 depedencies.
What is the proper way of implementing OAuth2 AuthServer and ResourceServer in current (2.1.6) version of SpringBoot with Spring cloud Greenwich?

Consumer Driven Contracts with SOAP web services

Does any of you know any approach or tools to implement Consumer Driven Contracts with SOAP web services? I have a legacy Java application that publishes SOAP web services, implemented with Apache CXF, which are consumed by a bunch of Spring Boot Java microservices. I’m already using Pact and Spring Cloud Contract to test my REST calls between the microservices, but could not find a way to use these same tools, or any other, for SOAP web services.
There is JavaSeifenBenutzer
a project to create Soap/Xml support for pact-jvm via a reverse proxy that converts XML to JSON and vice versa
You can use Spring Cloud Contract with MockMvc and RestDocs to build stubs of the XML service. Then you have to package the stubs in a jar for other people to reuse it and that's it.

Sign SOAP request in Spring boot

I have client spring boot application that communicate with SOAP server. I need to sign the SOAP request. All tutorials is referencing xml configs. Is thiere any easy way to configure in via spring boot?
Thanks

Best approach for securing REST services and a web application

I´m building a web application which comunicates server and clients through REST services (I´m planning to build a mobile app in mid term).
I´ve used Spring Security in other web applications without REST services. But I´m not sure if that approach is suitable for my scenario.
Is it possible secure both access to web pages and calls to REST services using Spring Security? What would you recommend?
Backend uses Spring Data + Spring MVC.
Thank you.
Yes, Spring Security is a good way to secure both REST endpoints and traditional MVC webpages. The implementation can be similar for both your REST endpoints and MVC routes depending on your requirements.
Spring Security is a popular and effective way to add security to your Spring application. Since you already have experience with it, you should be able to secure your REST endpoints with relative ease.
Check out this detailed tutorial on securing REST routes with Spring Security to get started: https://spring.io/guides/tutorials/rest/5/

Categories