Я пытаюсь позвонить в организацию, и у меня нет WSDL.Я пытаюсь сделать запрос SOAP с помощью webServiceTemplate.
<ws:RegistrarEntrada xmlns:ws="http://ws.rtaws.rtaws.jccm.es" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<sUsuario>user</sUsuario>
<sClave>pass</sClave>
<strXML>
<Datos>
<AcuseRecibo>N</AcuseRecibo>
<CodSIACI>SJT3</CodSIACI>
<CodUniOrgDest>850</CodUniOrgDest>
<Observaciones>Registro.</Observaciones>
<ExisteRep>N</ExisteRep>
<NumDocumentos>0</NumDocumentos>
</Datos>
</strXML>
</ws:RegistrarEntrada>
Когда будет выполнен запрос SOAP, в webServiceTemplate.sendSourceAndReceiveToResult(source, result);
добавляется конверт и запрос:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ws:RegistrarEntrada xmlns:ws="http://ws.rtaws.rtaws.jccm.es" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<sUsuario>user</sUsuario>
<sClave>pass</sClave>
<strXML>
<Datos>
<AcuseRecibo>N</AcuseRecibo>
<CodSIACI>SJT3</CodSIACI>
<CodUniOrgDest>850</CodUniOrgDest>
<Observaciones>Registro.</Observaciones>
<ExisteRep>N</ExisteRep>
<NumDocumentos>0</NumDocumentos>
</Datos>
</strXML>
</ws:RegistrarEntrada>
</env:Body>
</env:Envelope>
Вот что я вижу в своем журнале при отправке запроса:
12:30:32,233 DEBUG sent:649 - Sent request [
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ws:RegistrarEntrada xmlns:ws="http://ws.rtaws.rtaws.jccm.es" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<sUsuario>user</sUsuario>
<sClave>pass</sClave>
<strXML>
<Datos>
<AcuseRecibo>N</AcuseRecibo>
<CodSIACI>SJT3</CodSIACI>
<CodUniOrgDest>850</CodUniOrgDest>
<Observaciones>Registro.</Observaciones>
<ExisteRep>N</ExisteRep>
<NumDocumentos>0</NumDocumentos>
</Datos>
</strXML>
</ws:RegistrarEntrada>
</env:Body>
</env:Envelope>]
12:30:33,722 DEBUG received:706 - Received response [
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:RegistrarEntradaResponse xmlns:ns1="http://ws.rtaws.rtaws.jccm.es" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<RegistrarEntradaReturn xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:string">
<?xml version="1.0" encoding="iso-8859-1"?>
;<RTA-JCCM>
<resultado>0
</resultado>
<fecha>04/12/2018 12:30:34
</fecha>
</RTA-JCCM></RegistrarEntradaReturn>
</ns1:RegistrarEntradaResponse>
</soapenv:Body>
</soapenv:Envelope>
]
ОШИБКА: 'Пространство имен для префикса' soapenv 'не было объявлено.'
Как изменить префикс 'env' на 'soapenv' в webServiceTemplate для отправки правильного запроса?