Error while raising fault from the DUT to Onvif Device test tool in the test case

476 Views Asked by At

Error while raising fault from the DUT in the test case. ==========================================================

In the test case EventProperties>RealTimePullPointNotification Interface>EVENT-3-1-17-v14.12 REAL TIME PULL POINT SUBSCRIPTION-INVALID MESSAGE CONTENT FILTER the DUT sends fault message to client.

While validating the fault in the client(Onvif Device Test Tool Ver 6.12) I am getting the error No Action element from namespace Addressing10 (http://www.w3.org/2005/08/addressing).

I set the wsa:Action Element to http://www.w3.org/2005/08/addressing/soap/fault then also i am getting the above error.

The output from onvif device test tool is as below:

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

My XML which sends error from DUT to client is as below: ========================================================

*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>";*
1

There are 1 best solutions below

1
Ottavio Campana On

From §9.9 of the ONVIF Core Specs:

9.9 SOAP Fault Messages

If a device encounters a failure while processing [WS-BaseNotification] messages from either a client or Subscription Manager, then the device shall generate a SOAP 1.2 fault message.All SOAP 1.2 fault messages shall be generated according to [WS-BaseNotification] and [WS-Topics] specifications with one exception;

All faults shall use the following URI for the WS-Addressing [action] Message Addressing Property::

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

Furthermore the error should be sent as a SOAP receiver fault (env:Receiver), i.e. the HTTP error code shall be 500.