[英]Receive String in Spring Boot SOAP Endpoint
I need to create an Endpoint in Spring-boot to receive a SOAP request, but I need that request be a Java String. 我需要在Spring-boot中创建一个Endpoint来接收SOAP请求,但是我需要该请求是Java String。 I have something like that: 我有这样的事情:
Config: 配置:
@Bean(name = "myService")
public DefaultWsdl11Definition receiveM2Definition(XsdSchema mySchema) {
DefaultWsdl11Definition wsdl11Definition = new
DefaultWsdl11Definition();
wsdl11Definition.setPortTypeName("testPort");
wsdl11Definition.setLocationUri("/my");
wsdl11Definition.setTargetNamespace("http://test/me");
wsdl11Definition.setSchema(mySchema);
return wsdl11Definition;
}
Endpoint: 终点:
@PayloadRoot(
namespace = "http://test/me",
localPart = "getMyRequest"
)
@ResponsePayload
public JAXBElement<String> getReq(@RequestPayload
JAXBElement<String> request) {
....... }
This work fine, but I need that my endpoint receives a String for my client instead of a JAXBElement. 这个工作正常,但是我需要我的端点为我的客户端接收一个String而不是一个JAXBElement。 Is this possible? 这可能吗? Thanks in advance. 提前致谢。
Doing this in my Schema.xsd work fine: 在我的Schema.xsd中这样做可以正常工作:
<!-- Operations -->
<xs:element name="getRequest" type="xs:string">
</xs:element>
<xs:element name="getResponse" type="xs:string">
</xs:element>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.