Monday, June 21st, 2021, 00:08 UTC | ||
[00:08:39] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[00:20:20] | gregl (gregl!~greg@cpe-24-194-253-7.nycap.res.rr.com) has quit (Quit: Leaving) | |
[00:45:12] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has quit (Quit: glenb77) | |
[00:53:10] | gregl (gregl!~greg@cpe-24-194-253-7.nycap.res.rr.com) has joined #mythtv | |
[01:03:21] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has joined #mythtv | |
[01:31:30] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[01:31:31] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[02:22:27] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has joined #mythtv | |
[02:57:48] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has quit (Quit: Konversation terminated!) | |
[04:09:36] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has quit (*.net *.split) | |
[05:00:08] | ChanServ (ChanServ!ChanServ@services.libera.chat) has quit (shutting down) | |
[05:14:52] | ChanServ (ChanServ!ChanServ@services.libera.chat) has joined #mythtv | |
[05:14:52] | Mode for #mythtv by strontium.libera.chat : +o ChanServ | |
[05:47:30] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has joined #mythtv | |
[06:02:31] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has quit (Quit: glenb77) | |
[06:20:31] | DevMythNotifyBot (DevMythNotifyBot!~nodebot@cust32-dsl91-135-4.idnet.net) has quit (Read error: Connection reset by peer) | |
[06:20:43] | DevMythNotifyBot (DevMythNotifyBot!~nodebot@cust32-dsl91-135-4.idnet.net) has joined #mythtv | |
[06:54:04] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has joined #mythtv | |
[07:05:59] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has quit (Ping timeout: 256 seconds) | |
[07:06:08] | markspieth2 (markspieth2!~markspiet@1.152.108.171) has joined #mythtv | |
[07:06:08] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[07:06:08] | markspieth2 (markspieth2!~markspiet@1.152.108.171) has quit (Changing host) | |
[07:06:08] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[07:35:55] | markspieth2 (markspieth2!~markspiet@202.169.118.74) has joined #mythtv | |
[07:35:55] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[07:35:55] | markspieth2 (markspieth2!~markspiet@202.169.118.74) has quit (Changing host) | |
[07:35:55] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[07:52:45] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has joined #mythtv | |
[07:53:53] | peper03 (peper03!~peper03@cpc80071-stkp11-2-0-cust244.10-2.cable.virginm.net) has quit (Changing host) | |
[07:53:53] | peper03 (peper03!~peper03@mythtv/developer/peper03) has joined #mythtv | |
[08:27:45] | stuarta: | morning all |
[09:10:39] | markspieth2 (markspieth2!~markspiet@202.169.118.74) has joined #mythtv | |
[09:10:39] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[09:10:39] | markspieth2 (markspieth2!~markspiet@202.169.118.74) has quit (Changing host) | |
[09:10:39] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[13:07:33] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[13:07:33] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[13:12:01] | peterbennett: | stuarta: Morning |
[13:12:43] | peterbennett: | stuarta: SOAP. |
[13:13:44] | stuarta: | afternoon! |
[13:15:06] | peterbennett: | I am not sure about the SOAP support – wsdl and soap requests. |
[13:15:46] | peterbennett: | Normally I would use a package to generate code, wsdls, requests etc for soap |
[13:16:08] | stuarta: | regarding the wsdl generation, that is here -> https://github.com/MythTV/mythtv/blob/devel/h . . . p/mythwsdl.h (and .cpp) |
[13:16:19] | peterbennett: | Writing the SOAP code from scratch seems like a wasted duplicated effort |
[13:16:22] | stuarta: | there is also a mythxml.[cpp|h] |
[13:16:41] | stuarta: | peterbennett: it's just handling SOAP request bodies isn't it? |
[13:18:03] | peterbennett: | Yes handle the request and generate the wsdl |
[13:18:30] | stuarta: | so i get wsdl from http --json http://localhost:7544/Video/wsdl |
[13:18:40] | stuarta: | or :7744 for the new code |
[13:18:47] | stuarta: | and the wsdl is incomplete |
[13:18:58] | stuarta: | there is no SOAP involved in the wsdl request |
[13:19:10] | peterbennett: | I suppose we could make assumptions that soap requests will be a single level, no repeating groups, etc. and put together a simple xml parse for that |
[13:19:11] | stuarta: | but there is soap data in the response |
[13:19:57] | stuarta: | if we understand how markk hooked up parsing of json/xml bodies, soap shouldn't be too hard to add |
[13:20:00] | peterbennett: | There are application generators that use the wsdl to generate the soap request. |
[13:20:27] | stuarta: | yup, so the wsdl generation needs fixing, so that the 2 outputs are equivalent |
[13:20:33] | peterbennett: | It all has to fit together |
[13:20:55] | stuarta: | yup, although i see it as 2 distinct bits which need implementing |
[13:21:05] | stuarta: | 1) finish wsdl generation code |
[13:21:09] | stuarta: | 2) handle soap requests |
[13:21:43] | peterbennett: | I also wonder what the wsdl generator will use – for example the Vidoe wsdl has two missing parts, which I think need to be supplied by certain macros used in teh old service implementation. |
[13:22:49] | stuarta: | https://paste.centos.org/view/12947ad5 so this is existing wsdl for Video service |
[13:23:11] | stuarta: | https://paste.centos.org/view/67267ca4 and this is "new" wsdl |
[13:24:08] | stuarta: | as you can see, it starts to diverge from line 5, where we are defining our own schema via xsd |
[13:24:43] | peterbennett: | The new one is a stub, not much there |
[13:24:53] | stuarta: | exactly |
[13:25:07] | stuarta: | but, in theory, not too hard to finish off. markk said as much |
[13:27:37] | peterbennett: | The old services required the thing to be defined twice, in a class and then again in a derived class. I think this may have been required for the wsdl generation. |
[13:28:38] | stuarta: | it was either wsdl, or the custom qt types |
[13:28:39] | peterbennett: | It seems to generate xsds for the various objects as well |
[13:32:54] | peterbennett: | Who wrote the original code for wsdl xsd etc? Did they get any code from other projects? |
[13:33:13] | stuarta: | iirc it was david blain |
[13:35:32] | peterbennett: | Should I carry on converting services the way I did Video/GetVideo and leave the wsdl and soap request to somebody else? |
[13:36:08] | peterbennett: | I am concerned that the wsdl creation may need additional code that is not done there. |
[13:36:39] | stuarta: | i am in 2 minds about this. |
[13:36:41] | peterbennett: | I wonder how many people use soap requests. |
[13:36:51] | stuarta: | on one hand, in theory the 2 are independent |
[13:37:14] | stuarta: | on the other hand, if there is something we need to change in the way we implement the new services classes, we really need to find out sooner rather than later |
[13:37:32] | stuarta: | otherwise we have to spend more time retrofitting changes |
[13:40:28] | peterbennett: | There are som things in the old service that are now removed (e.g. calls to qRegisterMetaType), and new stuff added per Mark's example (e.g. Q_DECLARE_METATYPE). I don't know what these do. |
[13:40:57] | peterbennett: | Leaving out the Q_DECLARE_METATYPE does not seem to make a difference, the service still works |
[13:41:35] | peterbennett: | Also Q_DISABLE_COPY – is it needed? |
[13:42:11] | stuarta: | this is where the new code tries to decode the content -> https://github.com/MythTV/mythtv/blob/devel/h . . . ding.cpp#L72 |
[13:44:48] | stuarta: | peterbennett: i suspect i know why your soap request failed -> https://github.com/MythTV/mythtv/blob/devel/h . . . types.h#L310 |
[13:44:57] | stuarta: | "must be lower case", in your email it's not |
[13:45:07] | stuarta: | so we really should downcase all the headers |
[13:46:17] | stuarta: | if we don't do that already |
[13:46:57] | stuarta: | hmpf, it's mixed case (like you had it) in the mdn docs |
[13:47:44] | peterbennett: | That soap request comes from soapui, it generates the correct form. |
[13:48:00] | stuarta: | good |
[13:48:29] | stuarta: | oooo, "Value" must be lower case, and that's what is passed by the calling fucntion as "content-type" |
[13:48:36] | stuarta: | right, so maybe not that |
[13:50:11] | stuarta: | qt docs don't actually say if the keys are downcased, or if the "contains" function is case insensitive -> https://doc.qt.io/qt-5/qmultimap.html#contains |
[13:52:39] | stuarta: | peterbennett: try changing https://github.com/MythTV/mythtv/blob/devel/h . . . ding.cpp#L77 to the correct cased version of Content-Type and see if that helps? |
[13:53:46] | peterbennett: | Are you thinking that the soap xml request code is done and we just need some tweaks to get it working? |
[13:54:19] | stuarta: | well i'd like to understand if it's something simple that's stopping it from processing it |
[13:54:40] | stuarta: | soap is just xml from what i can see |
[13:54:48] | peterbennett: | The first thing that stops it is it rejects the POST |
[13:55:13] | stuarta: | you need to explicitly allow POST for that method |
[13:55:36] | peterbennett: | Then after I bypassed that check it gave 404 because the URL is just /Video not /Video/GetVideo |
[13:55:51] | stuarta: | see the converted frontend service, it has definitions which say which functions are POST |
[13:55:57] | stuarta: | you'll need to add that |
[13:56:52] | peterbennett: | I believe all soap requests are POST, so it needs to allow POST if it is a SOAP request but not if it is the other format url |
[13:56:54] | stuarta: | ahhhh, right we lower case the headers as we put them in the map |
[13:57:01] | stuarta: | https://github.com/MythTV/mythtv/blob/devel/h . . . rser.cpp#L98 |
[13:57:20] | stuarta: | so ignore my previous suggestion to change content-type -> Content-Type |
[13:57:53] | stuarta: | there is also --verbose http:debug available |
[14:00:31] | stuarta: | looks like the metadata service does introspection to create the wsdl |
[14:00:37] | stuarta: | here's a log snippet |
[14:00:40] | stuarta: | http/mythhttpmetaservice.cpp:34:MythHTTPMetaService Service 'Video' is missing version information |
[14:00:45] | stuarta: | http/mythhttpmetaservice.cpp:125:MythHTTPMetaService Service 'Video' introspection complete |
[14:03:47] | peterbennett: | https://www.kdab.com/development-resources/qt-tools/kd-soap/ |
[14:04:19] | peterbennett: | The KD SOAP server module contains all required functionality, allowing web service deployment without the need for an external web server. |
[14:05:24] | peterbennett: | I am a fan of using other people's code for complicated parts where possible. |
[14:06:00] | stuarta: | oh i agree, lets understand first why this doesn't work |
[14:07:29] | stuarta: | there's also qtsoap |
[14:07:51] | peterbennett: | I am pretty sure it doesn't work because it was not coded |
[14:09:00] | peterbennett: | However a qtsoap may not accept the other form of request (/Video/GetVideo?Id=9). That is not standard soap but everybody uses it with MythTV. |
[14:10:16] | stuarta: | the tool i've used for API testing is postman, it's web based, so nice |
[14:11:05] | peterbennett: | qtsoap seems to be client side, we need server side. |
[14:12:47] | stuarta: | lets identify what's broken / missing, before we try to stick a whole extra library in there |
[14:12:51] | stuarta: | we never needed it before |
[14:14:19] | stuarta: | i see what you mean about the casemember and genre being missing |
[14:14:24] | stuarta: | *castmember |
[14:18:50] | stuarta: | right, so it receives the soap body properly, i think it's just missing the glue to turn the soap body into the request params |
[14:28:42] | frobnic (frobnic!fb@b2b-130-180-11-14.unitymedia.biz) has joined #mythtv | |
[14:28:59] | frobnic (frobnic!fb@b2b-130-180-11-14.unitymedia.biz) has quit (Client Quit) | |
[14:29:07] | frobnic (frobnic!fb@b2b-130-180-11-14.unitymedia.biz) has joined #mythtv | |
[14:31:27] | peterbennett: | I guess i could add some parsing logic to do that, but the wsdl looks way more complicated. |
[14:31:45] | stuarta: | i'm just testing a fix for your prohibited POST |
[14:32:58] | stuarta: | https://paste.centos.org/view/eb1034a9 <- this fixes your lack of POST support, and it returned data to me |
[14:34:24] | stuarta: | what i don't have is the SOAP equivalent to ?Id=9 to properly test GetVideo |
[14:35:02] | peterbennett: | Just find the id of a video that has metadata in your database. |
[14:35:20] | stuarta: | i have that |
[14:35:46] | ** stuarta nicks it from peterbennett's original email ** | |
[14:36:34] | peterbennett: | That request was generated using soapui from the wsdl on port 6544 |
[14:37:03] | stuarta: | ok. so no error, but the Id isn't picked up by the service, so something needs glueing together |
[14:37:24] | peterbennett: | so did you get the xml with all zeroes? |
[14:38:32] | stuarta: | looks like it https://paste.centos.org/view/dbb047a0 |
[14:39:42] | stuarta: | json equivalent https://paste.centos.org/view/82823959 |
[14:40:11] | ** peterbennett trying it now ... ** | |
[14:41:29] | stuarta: | next step then is to understand if the Id is a) being parsed, b) making it to the service |
[14:42:08] | peterbennett: | I am still getting 405 Method Not Allowe |
[14:42:24] | stuarta: | peterbennett: did you apply the patch in the pastebin? |
[14:42:35] | peterbennett: | yes |
[14:43:04] | peterbennett: | Q_CLASSINFO("Version", "1.0") Q_CLASSINFO("GetVideo", "methods=GET,POST") |
[14:43:37] | peterbennett: | Are you using POST http://rocinante:6744/Video HTTP/1.1 |
[14:43:54] | peterbennett: | I suspect you used POST http://rocinante:6744/Video/GetVideo |
[14:44:12] | stuarta: | the latter |
[14:44:24] | peterbennett: | It seems soap uses teh base url then puts the method in the soapaction, |
[14:44:44] | stuarta: | that i would have to look into, but have to go for schoolrun now |
[14:44:46] | stuarta: | back later |
[14:44:54] | peterbennett: | ok bye |
[14:44:57] | hampton (hampton!~david@mythtv/developer/hampton) has quit (Quit: Leaving.) | |
[14:55:17] | jpabq (jpabq!~quassel@67-0-218-130.albq.qwest.net) has quit (Changing host) | |
[14:55:17] | jpabq (jpabq!~quassel@mythtv/developer/jpabq) has joined #mythtv | |
[14:55:17] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v jpabq | |
[15:12:27] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has joined #mythtv | |
[16:00:22] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[16:12:08] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has quit (Quit: glenb77) | |
[16:30:38] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[16:30:38] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[16:41:12] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[17:21:29] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[17:21:29] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[17:25:30] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Ping timeout: 240 seconds) | |
[17:56:11] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[17:56:11] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[17:58:12] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Read error: Connection reset by peer) | |
[18:15:05] | glenb77 (glenb77!~glenb77@2603-8000-b440-c812-0000-0000-0000-0331.res6.spectrum.com) has joined #mythtv | |
[18:47:50] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[18:47:51] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[19:40:11] | stuarta: | peterbennett: i worked out why the GET on the /Video service doesn't work. it's falling through to the file handling code, which means what we need to find, it where we fix it to interpret the SOAP request and call the appropriate method |
[19:41:04] | stuarta: | hence the 404, which in this instance, is literally "file not found" |
[19:43:20] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[20:05:41] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[20:05:41] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[20:17:36] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[20:18:58] | enyc (enyc!~enyc@muddle.enyc.org.uk) has quit (Changing host) | |
[20:18:58] | enyc (enyc!~enyc@user/enyc) has joined #mythtv | |
[20:22:31] | stuarta: | right, this is where it the logic lives to generate the "meta" services like wsdl -> https://github.com/MythTV/mythtv/blob/devel/h . . . vice.cpp#L29 |
[20:22:53] | stuarta: | it should be trivial to add others if we need them |
[20:23:40] | stuarta: | now i wonder if we can here decide if we have a soap body, and invoke the appropriate class "method" |
[20:31:37] | stuarta: | peterbennett: this is where the request data is parsed out if it's www-form-encoded -> https://github.com/MythTV/mythtv/blob/devel/h . . . .cpp#L93-L94 |
[20:32:28] | stuarta: | should be easy enough to add here a check for (mime.Name() == "text/xml") and attempt SOAP parsing |
[20:34:41] | stuarta: | still need to work out how to allow POST to the service itself |
[20:38:42] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[20:38:42] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[20:53:46] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[21:04:02] | hampton (hampton!~david@mythtv/developer/hampton) has joined #mythtv | |
[21:04:02] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v hampton | |
[21:05:48] | hampton (hampton!~david@mythtv/developer/hampton) has quit (Client Quit) | |
[21:05:55] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has quit (Quit: Konversation terminated!) | |
[21:06:06] | hampton (hampton!~david@mythtv/developer/hampton) has joined #mythtv | |
[21:06:06] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v hampton | |
[21:10:36] | hampton (hampton!~david@mythtv/developer/hampton) has quit (Ping timeout: 258 seconds) | |
[21:11:11] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has joined #mythtv | |
[21:23:16] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[21:23:17] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett | |
[21:23:45] | hampton (hampton!~david@mythtv/developer/hampton) has joined #mythtv | |
[21:23:45] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v hampton | |
[21:46:44] | Steve-Goodey (Steve-Goodey!~steve@2a00:23c5:7d83:6501:6ea1:20d:5872:d872) has quit (Quit: Konversation terminated!) | |
[21:53:58] | SteveGoodey (SteveGoodey!~steve@2a00:23c5:7d83:6501:fa68:6631:5ed6:d871) has quit (Quit: Konversation terminated!) | |
[21:57:37] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has quit (Quit: Leaving.) | |
[22:37:03] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[22:37:04] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[22:45:36] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has quit (Read error: Connection reset by peer) | |
[22:45:43] | markspieth2 (markspieth2!~markspiet@mythtv/developer/markspieth) has joined #mythtv | |
[22:45:44] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v markspieth2 | |
[23:45:29] | peterbennett (peterbennett!~peter@mythtv/developer/peterbennett) has joined #mythtv | |
[23:45:30] | Mode for #mythtv by ChanServ!ChanServ@services.libera.chat : +v peterbennett |
IRC Logs collected by
BeirdoBot.
Please use the above link to report any bugs.