You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
7.0 KiB
95 lines
7.0 KiB
namespace ONVIFService
|
|
{
|
|
public class Template
|
|
{
|
|
public const string GetServiceRequestTemplage = @"<s:Envelope
|
|
xmlns:s=""http://www.w3.org/2003/05/soap-envelope""
|
|
xmlns:a=""http://schemas.xmlsoap.org/ws/2004/08/addressing"">
|
|
<s:Header>
|
|
<a:Action s:mustUnderstand=""1"">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</a:Action>
|
|
<a:MessageID>urn:uuid:{0}</a:MessageID>
|
|
<a:ReplyTo>
|
|
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
|
|
</a:ReplyTo>
|
|
<a:To s:mustUnderstand=""1"">urn:schemas-xmlsoap-org:ws:2005:04:discovery</a:To>
|
|
</s:Header>
|
|
<s:Body>
|
|
<Probe
|
|
xmlns=""http://schemas.xmlsoap.org/ws/2005/04/discovery"">
|
|
<d:Types
|
|
xmlns:d=""http://schemas.xmlsoap.org/ws/2005/04/discovery""
|
|
xmlns:dp0=""http://www.onvif.org/ver10/device/wsdl"">dp0:Device
|
|
</d:Types>
|
|
</Probe>
|
|
</s:Body>
|
|
</s:Envelope>";
|
|
|
|
public const string GetCapabilitiesAction = "http://www.onvif.org/ver10/device/wsdl/GetCapabilities";
|
|
|
|
public const string GetCapabilitiesMessage = @"<s:Envelope xmlns:s=""http://www.w3.org/2003/05/soap-envelope"">
|
|
<s:Body xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
|
|
<GetCapabilities xmlns=""http://www.onvif.org/ver10/device/wsdl"">
|
|
<Category>All</Category>
|
|
</GetCapabilities>
|
|
</s:Body>
|
|
</s:Envelope>";
|
|
|
|
public const string GetProfilesAction = "http://www.onvif.org/ver10/media/wsdlGetProfiles/";
|
|
public const string GetProfilesMessageBody = @"<GetProfiles xmlns=""http://www.onvif.org/ver10/media/wsdl""></GetProfiles>";
|
|
|
|
public const string GetStreamUriAction = "http://www.onvif.org/ver10/media/wsdl/GetStreamUri";
|
|
|
|
public const string GetStreamUriMessage = @"<GetStreamUri xmlns=""http://www.onvif.org/ver10/media/wsdl"">
|
|
<StreamSetup>
|
|
<Stream xmlns=""http://www.onvif.org/ver10/schema"">RTP-Unicast</Stream>
|
|
<Transport xmlns=""http://www.onvif.org/ver10/schema"">
|
|
<Protocol>RTSP</Protocol>
|
|
</Transport>
|
|
</StreamSetup>
|
|
<ProfileToken>{0}</ProfileToken>
|
|
</GetStreamUri>";
|
|
|
|
public const string GetDeviceInformationAction = "http://www.onvif.org/ver10/device/wsdl/GetDeviceInformation";
|
|
|
|
public const string Templage = @"<s:Envelope xmlns:s=""http://www.w3.org/2003/05/soap-envelope"">
|
|
<s:Body xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
|
|
{0}
|
|
</s:Body>
|
|
</s:Envelope>";
|
|
|
|
public const string AuthTemplate = @"<s:Envelope xmlns:s=""http://www.w3.org/2003/05/soap-envelope"">
|
|
<s:Header>
|
|
<Security xmlns=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"" s:mustUnderstand=""1"">
|
|
<UsernameToken>
|
|
<Username>{0}</Username>
|
|
<Password Type=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"">{1}</Password>
|
|
<Nonce EncodingType=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"">{2}</Nonce>
|
|
<Created xmlns=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"">{3}</Created>
|
|
</UsernameToken>
|
|
</Security>
|
|
</s:Header>
|
|
<s:Body xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
|
|
{4}
|
|
</s:Body>
|
|
</s:Envelope>";
|
|
|
|
public const string GetSnapshotUriAction = "http://www.onvif.org/ver10/media/wsdl/GetSnapshotUri";
|
|
|
|
public const string GetSnapshotUriMessage = @"<GetSnapshotUri xmlns=""http://www.onvif.org/ver10/media/wsdl"">
|
|
<ProfileToken>{0}</ProfileToken>
|
|
</GetSnapshotUri>";
|
|
|
|
public const string ContinuousMoveAction = "http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove";
|
|
|
|
public const string ContinuousMoveMessage = @"<ContinuousMove xmlns=""http://www.onvif.org/ver20/ptz/wsdl"">
|
|
<ProfileToken>{0}</ProfileToken>
|
|
<Velocity>
|
|
<Zoom xmlns=""http://www.onvif.org/ver10/schema"" x=""{1}""></Zoom>
|
|
<PanTilt x=""{2}"" y=""{3}"" xmlns=""http://www.onvif.org/ver10/schema""></PanTilt>
|
|
</Velocity>
|
|
</ContinuousMove>";
|
|
|
|
public const string StopAction = "http://www.onvif.org/ver20/ptz/wsdl/Stop";
|
|
public const string StopMessage = @"<Stop xmlns=""http://www.onvif.org/ver20/ptz/wsdl""><ProfileToken>{0}</ProfileToken><PanTilt>true</PanTilt><Zoom>true</Zoom></Stop>";
|
|
}
|
|
} |