SOAP
Jim Walters
jimw at bugopolis.com
Mon Jan 5 21:47:15 UTC 2004
Have gotten back to working on the SOAP API (using SOAP::Lite) but am in
Perl module hell. Actually, its sort of a rookie problem. In the
bugzilla directory I've created a .cgi file which sort of looks like
this:
#!/usr/bin/perl -w
use strict;
use lib qw(.);
use SOAP::Transport::HTTP;
use Bugzilla::DB;
use Bugzilla::Demo;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
And in the Bugzilla directory I stuck a .pm file that looks like this:
use strict;
package Demo;
use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::DB;
use Bug;
sub hi {
return new Bug(1,1);
#return "hello, world ";
}
sub bye {
return "goodbye, cruel world";
}
sub languages {
return ("Perl", "C", "sh");
}
1;
The error message coming back in SOAP to the JavaScript SOAP API in
Mozilla (which is really nice, since in this case I don't have to tail
error_log) is: "Undefined subroutine &main::SendSQL called at Bug.pm
line 153".
OK, I know the new Bug() object isn't the way to do this, but I just
want to get the function name resolutions to work reasonably well. I get
a returned "hello world" fine. I can actually call the Bugzilla->login
sub and get the hash (?) back in my browser through the SOAP APIs. But
what am I doing wrong that is causing SendSQL not to resolve. Is it
because it has been depricated? I'm sure the problem has to do with the
way I am including things rather than with the SOAP module. Well, maybe.
Jim
On Tue, 2003-12-23 at 08:44, Joel Peshkin wrote:
> I guess I should broaden the question a bit and not focus so narrowly on
> SOAP.
>
More information about the developers
mailing list