在测试用例中从DUT引发故障时出错===============================================
在测试用例中EventProperties>RealTimePullPointNotification界面>EVENT-3-17-v14.12实时拉点订阅无效消息内容过滤器DUT发送故障消息发送给客户端。
在验证客户端中的故障时(Onvif设备测试工具版本6.12(我收到错误No Action元素来自命名空间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
我的XML将错误从DUT发送到客户端,如下所示:========================================
*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>";*
来自ONVIF核心规范的§9.9:
9.9 SOAP故障消息
如果设备在处理来自客户端或Subscription Manager,则设备应生成SOAP 1.2故障消息所有SOAP 1.2故障消息应根据[WS-BaseNotification]和[WS-Topics]规范例外
所有故障都应使用以下URIWS-Addressing[action]消息寻址属性::
http://www.w3.org/2005/08/addressing/soap/fault
此外错误应该作为SOAP接收器故障(env:receiver(发送,即。HTTP错误代码应为500。