Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/394.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在JAVA中向SOAP端点uri添加HTTP头?_Java_Spring Boot_Soap_Wsdl - Fatal编程技术网

如何在JAVA中向SOAP端点uri添加HTTP头?

如何在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:

我需要向SOAP端点添加HTTP请求头,因为我的SOAP请求包含两个额外的头,而不是需要设置为默认值的头

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。 有没有这样做的可能性