如何从 wsdl 和生成的 java 文件中获取 Soap 操作。因为我的 wsdl 导入了另一个 wsdl,其中有 @webmethod
how to get Soap action from wsdl and generated java files. as my wsdl imports another wsdl which has @webmethod in it
我有一个正在导入另一个 wsdl 的 wsdl。
我想从 java 客户端代码调用网络服务,我已经配置了我的 java class 如下
package test;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
@Configuration
public class WeConfig {
@Bean
public Jaxb2Marshaller marshaller() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setContextPath("test");
return marshaller;
}
@Bean
public WeatherClient1 weatherClient(Jaxb2Marshaller marshaller) {
WeatherClient1 client = new WeatherClient1();
client.setDefaultUri("*******");
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
return client;
}
}
我的访问方法如下
GetDataResponse response = (GetDataResponse) getWebServiceTemplate()
.marshalSendAndReceive(
"*******",
request,
new SoapActionCallback("*******"));
我的网络服务类似于
https://abcde.handling.com/celebrity/Confi?wsdl
请告诉我,我必须在配置和 soapcallbackaction 的 setdefaultUri 中输入什么。 soap Ui 给了我一个请求方法 "GetData"
提前致谢..
请帮忙..
经过长时间的奋斗,这个问题的答案如下;
DefaultUri =(完整 WSDL)https://abcde.handling.com/celebrity/Confi?wsdl
我的请求没有回调操作,所以:
GetDataResponse 响应 = (GetDataResponse) getWebServiceTemplate()
.marshalSendAndReceive(
"Imported wsdl's URI",
请求);
我有一个正在导入另一个 wsdl 的 wsdl。 我想从 java 客户端代码调用网络服务,我已经配置了我的 java class 如下
package test;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
@Configuration
public class WeConfig {
@Bean
public Jaxb2Marshaller marshaller() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setContextPath("test");
return marshaller;
}
@Bean
public WeatherClient1 weatherClient(Jaxb2Marshaller marshaller) {
WeatherClient1 client = new WeatherClient1();
client.setDefaultUri("*******");
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
return client;
}
}
我的访问方法如下
GetDataResponse response = (GetDataResponse) getWebServiceTemplate()
.marshalSendAndReceive(
"*******",
request,
new SoapActionCallback("*******"));
我的网络服务类似于
https://abcde.handling.com/celebrity/Confi?wsdl
请告诉我,我必须在配置和 soapcallbackaction 的 setdefaultUri 中输入什么。 soap Ui 给了我一个请求方法 "GetData" 提前致谢.. 请帮忙..
经过长时间的奋斗,这个问题的答案如下;
DefaultUri =(完整 WSDL)https://abcde.handling.com/celebrity/Confi?wsdl
我的请求没有回调操作,所以:
GetDataResponse 响应 = (GetDataResponse) getWebServiceTemplate() .marshalSendAndReceive( "Imported wsdl's URI", 请求);