当我发送SOAP请求时,出现错误 请求:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns9:SendRequest xmlns:ns2="http://schemas.datacontract.org/2004/07/SMEV3.HELPERS"
xmlns:ns3="http://schemas.datacontract.org/2004/07/SMEV3.SGKT"
xmlns:ns4="http://schemas.datacontract.org/2004/07/Services.Types"
xmlns:ns5="http://schemas.datacontract.org/2004/07/Services.Types.Faults"
xmlns:ns6="http://schemas.datacontract.org/2004/07/SMEV3.TRANSPORT.TYPEREQUEST"
xmlns:ns7="urn://x-artefacts-fts-absenceOfDebt-ru/commons/1.0.1"
xmlns:ns8="urn://x-artefacts-fts-absenceOfDebt-ru/root/1.0.1"
xmlns:ns9="http://tempuri.org/"
xmlns:ns10="http://schemas.microsoft.com/2003/10/Serialization/"
xmlns="http://schemas.datacontract.org/2004/07/System.Xml">
<ns9:request>
<ns6:Request>
<ns4:SenderProvidedRequestData>
<ns4:MessagePrimaryContent>
<ns8:AbsenceOfDebtRequest>
<ns7:INN>2903001570</ns7:INN>
</ns8:AbsenceOfDebtRequest>
</ns4:MessagePrimaryContent>
<ns4:NodeID>SOME-NODE-ID</ns4:NodeID>
<ns4:TestMessage/>
</ns4:SenderProvidedRequestData>
</ns6:Request>
</ns9:request>
<ns9:frgu>
<ns3:FRGUInteractionPartisipantCode>CODE</ns3:FRGUInteractionPartisipantCode>
<ns3:FRGUServiceCode>00000000001</ns3:FRGUServiceCode>
</ns9:frgu>
</ns9:SendRequest>
</S:Body>
</S:Envelope>
我收到错误响应 响应:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xml:lang="en">class com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to class ru.absenceofdebt.fts.artefacts.x.root._1_0.AbsenceOfDebtRequest (com.sun.org.apache.xerces.internal.dom.ElementNSImpl is in module java.xml of loader 'bootstrap'; ru.absenceofdebt.fts.artefacts.x.root._1_0.AbsenceOfDebtRequest is in unnamed module of loader 'app')</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
有什么问题? 对其他端点的其他请求可以正常工作,无需强制转换为类型。
谢谢。
P.S。在下面的注释中,我在github上发布了Java文件和pom.xml