Is there any other way to get WebServiceTemplate in Spring Boot than WebServiceGatewaySupport # getWebServiceTemplate ()?

Spring provides a class org.springframework.ws.client.core.support.WebServiceGatewaySupportthat matches Spring documentation a

A convenient superclass for application classes that need access to a web service.

The class is apparently intended to be extended . This abstractis why it cannot be created as a bean, so I cannot use composition, not inheritance .

However, when I inherit the class, Spring starts complaining like this:

[WARN] org.springframework.framework.CglibAopProxy - Unable to implement proxy server implementation method . [public final void org.springframework.ws.client.core.support.WebServiceGatewaySupport.afterPropertiesSet () throws java.lang.Exception] because it is marked as final . Instead, use an interface-based JDK APIs instead!

Various resources (e.g. https://github.com/spring-projects/spring-boot/issues/8974 ) say something like

A warning is safe to ignore unless you actually call the xxx method through a proxy

, . , , , " ".

WebServiceTemplate. - :

response = getWebServiceTemplate().marshalSendAndReceive(
               uri, request, new SoapActionCallback(soapAction));

:

Spring (, Spring Boot) ?

, Spring , ? factory?

+4

Source: https://habr.com/ru/post/1682113/


All Articles