Closed Bug 475151 Opened 16 years ago Closed 16 years ago

Refactor the XML-RPC server stuff out of Bugzilla::WebService

Categories

(Bugzilla :: WebService, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 4 obsolete files)

Attached patch v1 (obsolete) — Splinter Review
When I started working on the JSON bug (bug 432907), I realized that a lot of refactoring was going to be necessary. Anyhow, to have multiple different WebService frontends, we'll need to refactor the actual RPC server out of Bugzilla::WebService. I figured I'd split this patch out of the JSON patch into a separate bug because otherwise the JSON patch would be way too large.
Attachment #358588 - Flags: review?(wurblzap)
Attached patch v2 (obsolete) — Splinter Review
I realized that handle_login needs to be used by both JSON and XML-RPC, so I factored it out into Bugzilla::WebService::Server.
Attachment #358588 - Attachment is obsolete: true
Attachment #358590 - Flags: review?(wurblzap)
Attachment #358588 - Flags: review?(wurblzap)
Attached patch v3 (obsolete) — Splinter Review
Oops. Previous patch accidentally broke webservice extensions.
Attachment #358590 - Attachment is obsolete: true
Attachment #358591 - Flags: review?(wurblzap)
Attachment #358590 - Flags: review?(wurblzap)
Comment on attachment 358591 [details] [diff] [review] v3 I'll take review from whoever gets to this first.
Attachment #358591 - Flags: review?(dkl)
t/002goodperl........36/486 # Failed test 'Bugzilla/WebService/Server.pm DOES NOT use strict --WARNING' # at t/002goodperl.t line 99. # Looks like you failed 1 test of 486. t/002goodperl........ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/486 subtests
Attached patch v4 (obsolete) — Splinter Review
Fixed.
Attachment #358591 - Attachment is obsolete: true
Attachment #361608 - Flags: review?(dkl)
Attachment #358591 - Flags: review?(wurblzap)
Attachment #358591 - Flags: review?(dkl)
In Bugzilla/Webservice.pm: sub type { my ($self, $type, $value) = @_; if ($type eq 'dateTime') { $value = $self->datetime_format($value); } return XMLRPC::Data->type($type)->value($value); } This seems very specific to XMLRPC as written. Should this be moved to Bugzilla/WebService/Server/XMLRPC.pm?
(In reply to comment #6) > This seems very specific to XMLRPC as written. Should this be moved to > Bugzilla/WebService/Server/XMLRPC.pm? Yes, it is on the dependent patch, I believe.
(In reply to comment #7) > (In reply to comment #6) > > This seems very specific to XMLRPC as written. Should this be moved to > > Bugzilla/WebService/Server/XMLRPC.pm? > > Yes, it is on the dependent patch, I believe. Ok cool. As for the cookie issue. I am still debugging but I did notice that 'on_dispatch' is not being called correctly when set via Bugzilla::WebService::Server::XMLRPC::initialize. If I change the line in xmlrpc.cgi to the following, cookie auth works again as before. -Bugzilla::WebService::Server::XMLRPC->handle(); +Bugzilla::WebService::Server::XMLRPC + ->on_action(sub { +Bugzilla::WebService::Server::XMLRPC->handle_login(WS_DISPATCH, @_) } ) + ->handle(); Maybe you will see something related to this before I get it. Dave
(In reply to comment #8) > As for the cookie issue. I am still debugging but I did notice that > 'on_dispatch' is not being called correctly when set via > Bugzilla::WebService::Server::XMLRPC::initialize. Actually, I can't reproduce this. What version of SOAP::Lite are you using? Have you tried upgrading?
Attached patch v5Splinter Review
Oh, actually, you were right. I did reproduce it, and here's the fix for xmlrpc.cgi.
Attachment #361608 - Attachment is obsolete: true
Attachment #361687 - Flags: review?(dkl)
Attachment #361608 - Flags: review?(dkl)
(In reply to comment #7) > (In reply to comment #6) > > This seems very specific to XMLRPC as written. Should this be moved to > > Bugzilla/WebService/Server/XMLRPC.pm? > > Yes, it is on the dependent patch, I believe. /me baffles. I am not able to see which bug id this is addressed in. Should this be another bug or fixed in this one? Dave
(In reply to comment #11) > /me baffles. I am not able to see which bug id this is addressed in. Should > this be another bug or fixed in this one? Oh, no, actually it belongs in Bugzilla::WebService. See the README for why.
Attachment #361687 - Flags: review?(dkl) → review+
Comment on attachment 361687 [details] [diff] [review] v5 Ok, I understand now about the type() question. Also in IRC we discussed that issues related to POD documention will be addressed the in a different bug which will be checked in after this. This is also dependent on the USAGE_MODE_WEBSERVICE issue being addressed in the JSON patch. r=dkl
Checking in xmlrpc.cgi; /cvsroot/mozilla/webtools/bugzilla/xmlrpc.cgi,v <-- xmlrpc.cgi new revision: 1.11; previous revision: 1.10 done Checking in Bugzilla/WebService.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService.pm,v <-- WebService.pm new revision: 1.17; previous revision: 1.16 done Checking in Bugzilla/WebService/Constants.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Constants.pm,v <-- Constants.pm new revision: 1.24; previous revision: 1.23 done RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server.pm,v done Checking in Bugzilla/WebService/Server.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server.pm,v <-- Server.pm initial revision: 1.1 done RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/XMLRPC.pm,v done Checking in Bugzilla/WebService/Server/XMLRPC.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/XMLRPC.pm,v <-- XMLRPC.pm initial revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: approval+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: