// Path: step10_simple_app_with_cxf-spring-boot-starter/src/main/java/de/jonashackt/tutorial/configuration/SimpleBootCxfConfiguration.java
// @Configuration
// public class SimpleBootCxfConfiguration {
// 
//     public static final String SERVICE_URL = "/WeatherSoapService_1.0";
// 
//     @Autowired
//     private SpringBus springBus;
// 
//     @Bean
//     public WeatherService weatherService() {
//         return new WeatherServiceEndpoint();
//     }
// 
//     @Bean
//     public Endpoint endpoint() {
//         EndpointImpl endpoint = new EndpointImpl(springBus, weatherService());
//         endpoint.setServiceName(weatherClient().getServiceName());
//         endpoint.setWsdlLocation(weatherClient().getWSDLDocumentLocation().toString());
//         endpoint.publish(SERVICE_URL);
//         return endpoint;
//     }
// 
//     @Bean
//     public Weather weatherClient() {
//         return new Weather();
//     }
// 
//     @Bean
//     public CustomFaultBuilder weatherFaultBuilder() {
//         return new WeatherFaultBuilder();
//     }
// }


import de.codecentric.cxf.common.BootStarterCxfException;
import de.codecentric.cxf.configuration.CxfAutoConfiguration;
import de.codecentric.cxf.soaprawclient.SoapRawClient;
import de.codecentric.namespace.weatherservice.WeatherService;
import de.jonashackt.tutorial.configuration.SimpleBootCxfConfiguration;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
package de.jonashackt.tutorial;


@Configuration
public class SimpleBootCxfSystemTestConfiguration {

    @Autowired
    private CxfAutoConfiguration cxfAutoConfiguration;

    @Bean
    public WeatherService weatherServiceSystemTestClient() {
        JaxWsProxyFactoryBean jaxWsProxyFactory = new JaxWsProxyFactoryBean();
        jaxWsProxyFactory.setServiceClass(WeatherService.class);
// Path: step10_simple_app_with_cxf-spring-boot-starter/src/main/java/de/jonashackt/tutorial/configuration/SimpleBootCxfConfiguration.java
// @Configuration
// public class SimpleBootCxfConfiguration {
// 
//     public static final String SERVICE_URL = "/WeatherSoapService_1.0";
// 
//     @Autowired
//     private SpringBus springBus;
// 
//     @Bean
//     public WeatherService weatherService() {
//         return new WeatherServiceEndpoint();
//     }
// 
//     @Bean
//     public Endpoint endpoint() {
//         EndpointImpl endpoint = new EndpointImpl(springBus, weatherService());
//         endpoint.setServiceName(weatherClient().getServiceName());
//         endpoint.setWsdlLocation(weatherClient().getWSDLDocumentLocation().toString());
//         endpoint.publish(SERVICE_URL);
//         return endpoint;
//     }
// 
//     @Bean
//     public Weather weatherClient() {
//         return new Weather();
//     }
// 
//     @Bean
//     public CustomFaultBuilder weatherFaultBuilder() {
//         return new WeatherFaultBuilder();
//     }
// }


// Path: step10_simple_app_with_cxf-spring-boot-starter/src/test/java/de/jonashackt/tutorial/SimpleBootCxfSystemTestConfiguration.java
import de.codecentric.cxf.common.BootStarterCxfException;
import de.codecentric.cxf.configuration.CxfAutoConfiguration;
import de.codecentric.cxf.soaprawclient.SoapRawClient;
import de.codecentric.namespace.weatherservice.WeatherService;
import de.jonashackt.tutorial.configuration.SimpleBootCxfConfiguration;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

package de.jonashackt.tutorial;


@Configuration
public class SimpleBootCxfSystemTestConfiguration {

    @Autowired
    private CxfAutoConfiguration cxfAutoConfiguration;

    @Bean
    public WeatherService weatherServiceSystemTestClient() {
        JaxWsProxyFactoryBean jaxWsProxyFactory = new JaxWsProxyFactoryBean();
        jaxWsProxyFactory.setServiceClass(WeatherService.class);
        jaxWsProxyFactory.setAddress("http://localhost:8090" + cxfAutoConfiguration.getBaseUrl() + SimpleBootCxfConfiguration.SERVICE_URL);