Every time we pick a public SOAP API on the internet someone shuts it down. It's easier to just use the one from the "producing" guide. Fixes gh-27
30 lines
764 B
Java
30 lines
764 B
Java
|
|
package hello;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
|
|
|
|
@Configuration
|
|
public class CountryConfiguration {
|
|
|
|
@Bean
|
|
public Jaxb2Marshaller marshaller() {
|
|
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
|
|
// this package must match the package in the <generatePackage> specified in
|
|
// pom.xml
|
|
marshaller.setContextPath("hello.wsdl");
|
|
return marshaller;
|
|
}
|
|
|
|
@Bean
|
|
public CountryClient countryClient(Jaxb2Marshaller marshaller) {
|
|
CountryClient client = new CountryClient();
|
|
client.setDefaultUri("http://localhost:8080/ws");
|
|
client.setMarshaller(marshaller);
|
|
client.setUnmarshaller(marshaller);
|
|
return client;
|
|
}
|
|
|
|
}
|