Создание WebService работающего по протоколу Soap 1.2 со SpringBoot .2.x

Есть ли какие особенности в настройке Spring-Ws, когда создается веб-сервис, работающий по протоколу SOAP-1.2, при работе с SpringBoot 2.x ?

Что еще нужно добавить и почему ? Где есть об этом информация ?


@EnableWs
@Configuration
public class WebServiceConfig {

    private static final String NAMESPACE_URI = "http://..../apps";

    @SuppressWarnings({"rawtypes", "unchecked"})
    @Bean (name = "apsMessage")
    public ServletRegistrationBean messageDispatcherServlet(ApplicationContext appContext){

        MessageDispatcherServlet servlet = new MessageDispatcherServlet();

        servlet.setApplicationContext(appContext);
        servlet.setTransformWsdlLocations(true);
        return new ServletRegistrationBean(servlet, "/ws/*");
    }


    @Bean(name = "apps")
    public DefaultWsdl11Definition defaultWsdl11Definition(@Qualifier("appsSchema") XsdSchema schema){

        DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();

        wsdl11Definition.setPortTypeName("ApsPort");

        wsdl11Definition.setLocationUri("/ws");

        wsdl11Definition.setTargetNamespace(NAMESPACE_URI);

        wsdl11Definition.setSchema(schema);

        wsdl11Definition.setCreateSoap11Binding(true);
        wsdl11Definition.setCreateSoap12Binding(true);

        return wsdl11Definition;
    }

    @Bean(name = "appsSchema")
    public XsdSchema moviesSchema(){

        return new SimpleXsdSchema(new ClassPathResource("xsd/schema-apps.xsd"));

    }
}


Ответы (0 шт):