在测试用例中从DUT向Onvif设备测试工具提出故障时出错

问题描述 投票:0回答:1

在测试用例中从DUT引发故障时出错。================================================== =========

在测试用例中,EventProperties> RealTimePullPointNotification界面> EVENT-3-1-17-v14.12实时牵引点订阅无效消息内容过滤器DUT发送故障给客户的信息。

在验证客户端中的故障时(Onvif设备测试工具Ver 6.12版)出现错误“无操作”元素来自命名空间Addressing10(http://www.w3.org/2005/08/addressing)。

我将wsa:Action元素设置为http://www.w3.org/2005/08/addressing/soap/fault,然后我也得到了上面的错误。

onvif设备测试工具的输出如下:

EVENT-3-1-17-v14.12 REALTIME PULLPOINT SUBSCRIPTION - INVALID MESSAGE CONTENT FILTER

STEP 4 - Create Pull Point Subscription - negative test
StepStart: 2019-11-13T17:18:31.6582116Z
Transmit done
Receive done
SOAP fault returned
Code: Sender
Reason: InvalidMessageContentExpression
Validate fault...
*No Action element from namespace Addressing10 (http://www.w3.org/2005/08/addressing). Expected element with value: http://www.w3.org/2005/08/addressing/soap/fault.*
STEP FAILED
TEST FAILED

我的从DUT向客户端发送错误的XML如下:================================================== ======

*std::string soapFault =
"<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">"
"<SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" >"
"<wsa:MessageID>"
"urn:uuid:c9517d6a-44e7-427a-a1f4-6902eb52a979"
"</wsa:MessageID>"
"<wsa:ReplyTo SOAP-ENV:mustUnderstand="true">"
"<wsa:Address>http://192.168.0.95:8082/onvif</wsa:Address>"
"</wsa:ReplyTo>"
"<wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.0.95:8082/onvif/event_service</wsa:To>"
"<wsa:Action SOAP-ENV:mustUnderstand="true">"http://www.w3.org/2005/08/addressing/soap/fault"</wsa:Action>"
"</SOAP-ENV:Header>"
"<SOAP-ENV:Body>"
"<SOAP-ENV:Fault>"
"<SOAP-ENV:Code>"
"<SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>"
"<SOAP-ENV:Subcode>"
"<SOAP-ENV:Value>ter:InvalidArgVal</SOAP-ENV:Value>"
"<SOAP-ENV:Subcode>"
"<SOAP-ENV:Value>ter:InvalidMessageContentExpression</SOAP-ENV:Value>"
"</SOAP-ENV:Subcode>"
"</SOAP-ENV:Subcode>"
"</SOAP-ENV:Code>"
"<SOAP-ENV:Reason>"
"<SOAP-ENV:Text xml:lang="en"/>"
"</SOAP-ENV:Reason>"
"<SOAP-ENVetail>"
"</SOAP-ENVetail>"
"</SOAP-ENV:Fault>"
"</SOAP-ENV:Body>"
"</SOAP-ENV:Envelope>";*
soap soapui soap-client onvif python-onvif
1个回答
0
投票

摘自ONVIF Core Specs第9.9节:

9.9 SOAP错误消息

[如果设备在处理来自客户端或客户端的[WS-BaseNotification]消息时遇到故障,订阅管理器,则设备应生成SOAP 1.2故障消息。所有SOAP 1.2故障消息均应根据[WS-BaseNotification]和[WS-Topics]规范之一例外;

所有故障均应将以下URI用于WS-Addressing [操作]消息寻址属性::

http://www.w3.org/2005/08/addressing/soap/fault

此外该错误应作为SOAP接收器错误(env:Receiver)发送,即HTTP错误代码应为500。

© www.soinside.com 2019 - 2024. All rights reserved.