We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I need help with defining the "Capabilities" class so it would pass the Device Tool Test tests.
STEP 5 - Get Media Service capabilities StepStart: 2022-01-19T07:35:14.1804753Z Transmit done Receive done The element 'Capabilities' in namespace 'http://www.onvif.org/ver10/media/wsdl' has invalid child element 'ProfileCapabilities' in namespace 'http://www.onvif.org/ver10/schema'. List of possible elements expected: 'ProfileCapabilities' in namespace 'http://www.onvif.org/ver10/media/wsdl'. STEP FAILED
The response: soap12env:Body tns:GetServiceCapabilitiesResponse <tns:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="false"> <s0:ProfileCapabilities MaximumNumberOfProfiles="10"/> <s0:StreamingCapabilities RTPMulticast="false" RTP_TCP="true" RTP_RTSP_TCP="true" NonAggregateControl="false" NoRTSPStreaming="false"/> </tns:Capabilities> </tns:GetServiceCapabilitiesResponse> </soap12env:Body>
My Code: Classes:
class ProfileCapabilitiesT(SchemaComplexModel): type_name = "ProfileCapabilities" MaximumNumberOfProfiles = XmlAttribute(Int)
class StreamingCapabilitiesT(SchemaComplexModel): type_name = "StreamingCapabilities" RTPMulticast = XmlAttribute(Boolean) RTP_TCP = XmlAttribute(Boolean) RTP_RTSP_TCP = XmlAttribute(Boolean) NonAggregateControl = XmlAttribute(Boolean) NoRTSPStreaming = XmlAttribute(Boolean)
class CapabilitiesT(SchemaComplexModel): type_name = "Capabilities" ProfileCapabilities = ProfileCapabilitiesT StreamingCapabilities = StreamingCapabilitiesT SnapshotUri = XmlAttribute(Boolean) Rotation = XmlAttribute(Boolean) VideoSourceMode = XmlAttribute(Boolean) OSD = XmlAttribute(Boolean)
class GetServiceCapabilitiesResponseT(MediaComplexModel): Capabilities = CapabilitiesT
Function: @rpc(_returns=GetServiceCapabilitiesResponseT, _body_style="out_bare") def GetServiceCapabilities(ctx): logging.info("GetServiceCapabilities")
ret = GetServiceCapabilitiesResponseT() caps = CapabilitiesT() p = ProfileCapabilitiesT() n = config.MAX_PROFILES p.MaximumNumberOfProfiles = n caps.ProfileCapabilities = p s = StreamingCapabilitiesT() s.RTPMulticast = False s.RTP_TCP = True s.RTP_RTSP_TCP = True s.NonAggregateControl = False s.NoRTSPStreaming = False caps.StreamingCapabilities = s caps.SnapshotUri = True caps.Rotation = False caps.VideoSourceMode = False caps.OSD = False ret.Capabilities = caps return ret
I am waiting to understand what is wrong with the definitions, Thanks in advance
David Ron
The text was updated successfully, but these errors were encountered:
Solved it
Sorry, something went wrong.
No branches or pull requests
Hello,
I need help with defining the "Capabilities" class so it would pass the Device Tool Test tests.
STEP 5 - Get Media Service capabilities
StepStart: 2022-01-19T07:35:14.1804753Z
Transmit done
Receive done
The element 'Capabilities' in namespace 'http://www.onvif.org/ver10/media/wsdl' has invalid child element 'ProfileCapabilities' in namespace 'http://www.onvif.org/ver10/schema'. List of possible elements expected: 'ProfileCapabilities' in namespace 'http://www.onvif.org/ver10/media/wsdl'.
STEP FAILED
The response:
soap12env:Body
tns:GetServiceCapabilitiesResponse
<tns:Capabilities
SnapshotUri="true"
Rotation="false"
VideoSourceMode="false"
OSD="false">
<s0:ProfileCapabilities
MaximumNumberOfProfiles="10"/>
<s0:StreamingCapabilities
RTPMulticast="false"
RTP_TCP="true"
RTP_RTSP_TCP="true"
NonAggregateControl="false"
NoRTSPStreaming="false"/>
</tns:Capabilities>
</tns:GetServiceCapabilitiesResponse>
</soap12env:Body>
My Code:
Classes:
class ProfileCapabilitiesT(SchemaComplexModel):
type_name = "ProfileCapabilities"
MaximumNumberOfProfiles = XmlAttribute(Int)
class StreamingCapabilitiesT(SchemaComplexModel):
type_name = "StreamingCapabilities"
RTPMulticast = XmlAttribute(Boolean)
RTP_TCP = XmlAttribute(Boolean)
RTP_RTSP_TCP = XmlAttribute(Boolean)
NonAggregateControl = XmlAttribute(Boolean)
NoRTSPStreaming = XmlAttribute(Boolean)
class CapabilitiesT(SchemaComplexModel):
type_name = "Capabilities"
ProfileCapabilities = ProfileCapabilitiesT
StreamingCapabilities = StreamingCapabilitiesT
SnapshotUri = XmlAttribute(Boolean)
Rotation = XmlAttribute(Boolean)
VideoSourceMode = XmlAttribute(Boolean)
OSD = XmlAttribute(Boolean)
class GetServiceCapabilitiesResponseT(MediaComplexModel):
Capabilities = CapabilitiesT
Function:
@rpc(_returns=GetServiceCapabilitiesResponseT, _body_style="out_bare")
def GetServiceCapabilities(ctx):
logging.info("GetServiceCapabilities")
I am waiting to understand what is wrong with the definitions,
Thanks in advance
David Ron
The text was updated successfully, but these errors were encountered: