我试着按照这个简单的教程https://spring.io/guides/gs/consuming-web-service/,它是有效的。
然后,我尝试使用附加的@Configuration
和扩展WebServiceGatewaySupport
的客户机类连接到另一个SOAP服务。似乎这两个客户端类使用相同的@Configuration
上下文,使得我添加的第一个失败(未知的jaxb--class等)。如何确保客户端类使用正确的@Configuration
-class?
发布于 2015-04-16 21:32:09
我最终在@Configuration-classes中创建了@Bean,它返回一个WebServiceTemplate
。也就是说,我没有使用Spring的自动配置机制。我删除了extend WebserviceGatewaySupport
,并使用@Autowired
自动连接在@Configuration
类中创建的WebserviceTemplateBean
bean。
https://stackoverflow.com/questions/29653678
复制相似问题