[mythtv] Web services wsdl fails after commits c3cf321 and ea8a83d

David Hampton mythtv at love2code.net
Sat Dec 30 15:16:24 UTC 2017


On Fri, 2017-12-29 at 22:29 -0500, Peter Bennett wrote:
> David
> 
> Two commits have removed the Q_DECLARE_METATYPE and
> qRegisterMetaType 
> for the web service types. The web service wsdl now does not work, It
> is 
> missing the URLS for subtypes. The xsd urls also fail as a result of
> the 
> same thing.
> 
> There are thousands of lines of changes here. I tried a git revert.
> It 
> gave a bunch of conflicts - mainly they were duplicated public: 
> declarations. After I fixed those I tried a compile but there were 
> hundreds of errors about conflicting definitions and types.
> 
> Wsdl::IsCustomType( QString &sTypeName ) uses a call to
> QMetaType::type. 
> This is returning zero for all of the custom types because they were
> not 
> registered. It should return a value.
> 
> Xsd::GetXSD uses QMetaType::type and QMetaType::construct( id ) to 
> create an object of a custom type. This is not working as the id is 
> always coming out as 0 so all of the xsd URLs fail.
> 
> Can we get it all reverted back to the state where it has the 
> Q_DECLARE_METATYPE and qRegisterMetaType ?

Reverting the changes would re-introduce compiler warnings and usage of
objects that the Qt documentation says is bad behavior.  My guess
(without looking at the code) would be that wsdl is looking up
"SomeTypeBasedOnQObject" instead of "SomeTypeBasedOnQObject*".  Let me
spend some time trying to fix this before I revert anything.

David

> Examples of wsdl output -
> 
> http://localhost:6544/Dvr/wsdl
> 
> With MythTV 29 correct result is below - see there is an import 
> schemalocation for many types.
> 
> <definitions name="DvrServices" targetNamespace="http://mythtv.org">;
> <types>
> <xs:schema targetNamespace="http://MythTV.org/Imports">;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=ArrayOfString" 
> namespace="http://mythtv.org"/>;
> <xs:import schemaLocation="http://localhost:6544/Dvr/xsd?type=CutList
> " 
> namespace="http://mythtv.org"/>;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=EncoderList" 
> namespace="http://mythtv.org"/>;
> <xs:import schemaLocation="http://localhost:6544/Dvr/xsd?type=InputLi
> st" 
> namespace="http://mythtv.org"/>;
> <xs:import schemaLocation="http://localhost:6544/Dvr/xsd?type=Program
> " 
> namespace="http://mythtv.org"/>;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=ProgramList" 
> namespace="http://mythtv.org"/>;
> <xs:import schemaLocation="http://localhost:6544/Dvr/xsd?type=RecRule
> " 
> namespace="http://mythtv.org"/>;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=RecRuleFilterList"
>  
> namespace="http://mythtv.org"/>;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=RecRuleList" 
> namespace="http://mythtv.org"/>;
> <xs:import 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=TitleInfoList" 
> namespace="http://mythtv.org"/>;
> </xs:schema>
> <xs:schema elementFormDefault="qualified" 
> targetNamespace="http://mythtv.org">;
> 
> With master the result is below - note there is only 1 import, for 
> ArrayOfString.
> 
> <definitions targetNamespace="http://mythtv.org" name="DvrServices">
> <types>
> <xs:schema targetNamespace="http://MythTV.org/Imports">;
> <xs:import namespace="http://mythtv.org" 
> schemaLocation="http://localhost:6544/Dvr/xsd?type=ArrayOfString"/>;
> </xs:schema>
> <xs:schema elementFormDefault="qualified" 
> targetNamespace="http://mythtv.org">;
> 
> Other thing, if you use one of the URLS from the schemalocation
> values, 
> it works successfully in Myth 29 but fails in Master.
> 
> End result is, trying to import wsdl into a test tool fails. Users 
> trying to create or update applications by using the wsdl will fail.
> I 
> am unable to test the new web service for Roger's enhancements.
> 
> Peter
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


More information about the mythtv-dev mailing list