Skip to content
New issue

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

Call_GetStatus无法绑定数据到结构体 #49

Open
xy-java opened this issue Apr 24, 2024 · 2 comments
Open

Call_GetStatus无法绑定数据到结构体 #49

xy-java opened this issue Apr 24, 2024 · 2 comments

Comments

@xy-java
Copy link

xy-java commented Apr 24, 2024

使用Call_GetStatus时,使用:
type PTZVector struct {
PanTilt Vector2D xml:"onvif:PanTilt"
Zoom Vector1D xml:"onvif:Zoom"
} 无法绑定xml数据,
在我修改为:
type PTZVector struct {
PanTilt Vector2D xml:"PanTilt"
Zoom Vector1D xml:"Zoom"
}后正常绑定数据

@nguyencobap
Copy link

I encountered this error as well.
There is no "onvif" in PanTilt tag.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding"
    xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl">
    <s:Header />
    <s:Body>
        <tptz:GetStatusResponse>
            <tptz:PTZStatus>
                <tt:Position>
                    <tt:PanTilt
                        space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace"
                        x="-0.12477777777777788" y="0.62057142857142855" />
                    <tt:Zoom space="http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace"
                        x="0.040000000000000001" />
                </tt:Position>
                <tt:MoveStatus>
                    <tt:PanTilt>IDLE</tt:PanTilt>
                    <tt:Zoom>IDLE</tt:Zoom>
                </tt:MoveStatus>
                <tt:UtcTime>2024-12-13T06:23:03Z</tt:UtcTime>
            </tptz:PTZStatus>
        </tptz:GetStatusResponse>
    </s:Body>
</s:Envelope>

@xy-java
Copy link
Author

xy-java commented Dec 13, 2024

You can customize PTZVector and Call_GetStatus.
This is a compromise solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants