You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SQL调用SOAP服务无法获取数据,请求优化建议

新手求助:SQL调用SOAP服务获取数据失败,求优化思路

我是一名完全的新手,尝试通过SQL查询从SOAP服务获取数据。我先在reqbin.com上进行了测试,能正常获取响应,但使用以下SQL代码却无法获取数据,恳请各位提供优化思路。

DECLARE @xmlRequest NVARCHAR(MAX) = 
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <StatusNespolehlivyPlatceRequest xmlns="http://adis.mfcr.cz/rozhraniCRPDPH/">
            <dic>27396819</dic>
        </StatusNespolehlivyPlatceRequest>
    </soapenv:Body>
</soapenv:Envelope>';

DECLARE @response INT;
DECLARE @responseText NVARCHAR(MAX);

EXEC sp_OACreate 'MSXML2.ServerXMLHTTP', @response OUT;
EXEC sp_OAMethod @response, 'open', NULL, 'POST', 'https://adisrws.mfcr.cz/dpr/axis2/services/rozhraniCRPDPH.rozhraniCRPDPHSOAP', 'false';
EXEC sp_OAMethod @response, 'setRequestHeader', NULL, 'Content-Type', 'text/xml; charset=utf-8';
EXEC sp_OAMethod @response, 'send', NULL, @xmlRequest;
EXEC sp_OAMethod @response, 'responseText', @responseText OUT;

-- Debugging: Print the raw response
PRINT @responseText;

感谢各位的建议!

内容的提问来源于stack exchange,提问作者Marcel Lucansky

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 11:43:15