Reputation: 4615
I'm trying to create new OSD configuration and my request looks like this(I omitted envelope and header because I have handled other methods, so it works for sure):
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateOSD xmlns="http://www.onvif.org/ver10/media/wsdl">
<OSD token="osdtoken0"/>
</CreateOSD>
</s:Body>
Response from this request: as you can see, I've got detail, which doesn't say much.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope>
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<SOAP-ENV:Code>
<SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>
</SOAP-ENV:Code>
<SOAP-ENV:Reason>
<SOAP-ENV:Text xml:lang="en">error</SOAP-ENV:Text>
</SOAP-ENV:Reason>
<SOAP-ENV:Detail>
<error>CreateOSD error</error>
</SOAP-ENV:Detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I also know my device support OSD because I can get current OSD's configurations:
<trt:GetOSDsResponse>
<trt:OSDs token="osdtoken0">
<tt:VideoSourceConfigurationToken>VIDEO_CH0</tt:VideoSourceConfigurationToken>
<tt:Type>Text</tt:Type>
<tt:Position>
<tt:Type>Custom</tt:Type>
<tt:Pos y="-1" x="-1"/>
</tt:Position>
<tt:TextString>
<tt:Type>DateAndTime</tt:Type>
<tt:DateFormat>yyyy-MM-dd</tt:DateFormat>
<tt:TimeFormat>HH:mm:ss</tt:TimeFormat>
<tt:FontSize>6</tt:FontSize>
<tt:FontColor Transparent="0">
<tt:Color Colorspace="" Z="0" Y="0" X="0"/>
</tt:FontColor>
<tt:BackgroundColor Transparent="0">
<tt:Color Colorspace="" Z="0" Y="0" X="0"/>
</tt:BackgroundColor>
</tt:TextString>
</trt:OSDs>
</trt:GetOSDsResponse>
I've also tried to add these signs like <trt:>
to my request but in that case, I've got structure error response.
So, accordingly to onvif media documentation - How to correctly structure CreateOSD request? Any help would be highly aprreciated.
Upvotes: 1
Views: 435
Reputation: 637
Responses are never that great and usually quite generalized (no details). You can try this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:xmime="http://tempuri.org/xmime.xsd"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<trt:CreateOSD>
<trt:OSD token="">
<tt:VideoSourceConfigurationToken></tt:VideoSourceConfigurationToken>
<tt:Type>Text</tt:Type>
<tt:Position>
<tt:Type></tt:Type>
<tt:Pos x="0.0" y="0.0">
</tt:Pos>
<tt:Extension>
</tt:Extension>
</tt:Position>
<tt:TextString>
<tt:Type></tt:Type>
<tt:DateFormat></tt:DateFormat>
<tt:TimeFormat></tt:TimeFormat>
<tt:FontSize>0</tt:FontSize>
<tt:FontColor Transparent="0">
<tt:Color X="0.0" Y="0.0" Z="0.0" Colorspace="">
</tt:Color>
</tt:FontColor>
<tt:BackgroundColor Transparent="0">
<tt:Color X="0.0" Y="0.0" Z="0.0" Colorspace="">
</tt:Color>
</tt:BackgroundColor>
<tt:PlainText></tt:PlainText>
<tt:Extension>
</tt:Extension>
</tt:TextString>
<tt:Image>
<tt:ImgPath></tt:ImgPath>
<tt:Extension>
</tt:Extension>
</tt:Image>
<tt:Extension>
</tt:Extension>
</trt:OSD>
</trt:CreateOSD>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Upvotes: 1