Spring boot SOAP Response Разметка в документе, предшествующем корневому элементу, должна быть правильно сформирована - PullRequest
0 голосов
/ 04 ноября 2019

Я создал веб-сервис SOAP, используя загрузку Spring. Когда я отправляю запрос в веб-сервис через SOAPUI, я получаю ответ

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>
...