我已经使用Spring Boot创建了一个SOAP Web服务。当我通过SOAPUI向Web服务发送请求时,这就是我得到的响应
The markup in the document preceding the root element must be well-formed.
这是我的要求:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="url:service" xmlns:types="http://create.service" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<wsa:action />
<wsa:MessageID>xxxx</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>url:service</wsa:To>
<wsse:Security soap:mustUnderstand="1">
<wsu:Timestamp wsu:Id="Timestamp-30065565-cf19-4412-8cc9-55b11d93c407">
<wsu:Created>2019-11-01T08:20:20Z</wsu:Created>
<wsu:Expires>2019-11-01T08:25:20Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:checkRequest>
<requestMessage href="#id1" />
</tns:checkRequest>
<tns:CheckRequestMessage id="id1" xsi:type="tns:CheckRequestMessage">
<checkData href="#id2" />
</tns:CheckRequestMessage>
<tns:checkData id="id2" xsi:type="tns:checkData">
<createDate xsi:type="xsd:string">20191101</createDate>
<createTime xsi:type="xsd:string">152020</createTime>
</tns:checkData>
</soap:Body>
</soap:Envelope>