如何在JAVA中向SOAP端点uri添加HTTP头?
我需要向SOAP端点添加HTTP请求头,因为我的SOAP请求包含两个额外的头,而不是需要设置为默认值的头如何在JAVA中向SOAP端点uri添加HTTP头?,java,spring-boot,soap,wsdl,Java,Spring Boot,Soap,Wsdl,我需要向SOAP端点添加HTTP请求头,因为我的SOAP请求包含两个额外的头,而不是需要设置为默认值的头 Action: ChangeOffer Content-Type: text/xml 在我的配置文件中,我将URI添加为 @Bean public MyService myService(Jaxb2Marshaller marshaller) { MyService client = new MyService(); client.setDefaultUri("http:
Action: ChangeOffer
Content-Type: text/xml
在我的配置文件中,我将URI添加为
@Bean
public MyService myService(Jaxb2Marshaller marshaller) {
MyService client = new MyService();
client.setDefaultUri("http://localhost:7782/services/SubscribeMgrService");client.setMarshaller((Marshaller)marshaller);
client.setUnmarshaller(marshaller);
return client;
}
我需要在调用时将这些头设置为上面的URL。
有没有这样做的可能性