Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Net::HTTPS:::SUPER ???

by dsb (Chaplain)
on May 16, 2014 at 20:29 UTC ( #1086389=perlquestion: print w/replies, xml ) Need Help??

dsb has asked for the wisdom of the Perl Monks concerning the following question:

All, Has anyone recently run into this error:
500 Can't locate object method "configure" via package "Net::HTTPS::SU +PER" at /export/home/scratch/perl/lib/site_perl/5.16.3/ServiceNow/Con line 70.

I tried to poke around in the lib directory to figure out where the call to that package could be, because I had never heard of it, and couldn't find anything about it, which led me to believe it was a package space declared within the Net::HTTPS .pm file.

I found this in Net::HTTPS -

sub http_connect { my($self, $cnf) = @_; if ($self->isa("Net::SSL")) { if ($cnf->{SSL_verify_mode}) { if (my $f = $cnf->{SSL_ca_file}) { $ENV{HTTPS_CA_FILE} = $f; } if (my $f = $cnf->{SSL_ca_path}) { $ENV{HTTPS_CA_DIR} = $f; } } if ($cnf->{SSL_verifycn_scheme}) { $@ = "Net::SSL from Crypt-SSLeay can't verify hostnames; eithe +r install IO::Socket::SSL or turn off verification by setting the PER +L_LWP_SSL_VERIFY_HOSTNAME environment variable to 0"; return undef; } } $self->SUPER::configure($cnf); ##### OFFENDING LINE??? }
This is all coming from an effort at proxy authentication and then SSL authentication at the end point webservice. Truthfully, I'm not even sure whether the problem is at the proxy or the webservice.

UPDATE: The same code set works as is on another machine. Seemed worth noting.

This @ISA my( $cool ) %SIG

Replies are listed 'Best First'.
Re: Net::HTTPS:::SUPER ???
by jeffa (Bishop) on May 16, 2014 at 20:35 UTC

    It sounds like the problem is within the object that is calling the method. Would you post the code that actually makes the call, and perhaps tell us what class the object actually is? This might help others track the problem down.


    (the triplet paradiddle with high-hat)
      It's actually a SOAP::Lite call done by an API from an incident management too call ServiceNow.

      I can post that module but it might be easier if I tell you where you can pull down the API.
      ServiceNow API Wiki

      The module performing the call is ServiceNow::Connection.

      # ==================================================================== +== # # Copyright (C) 2009 # # ==================================================================== +== package ServiceNow::Connection; # default is using SOAP::Lite use SOAP::Lite; $VERSION = '1.00'; my $CONFIG; =pod =head1 Connection module Service-now Perl API - Connection perl module =head1 Desciption An object representation of a Connection object used to access your Se +rvice-now instance. The Connection class can be overrided by the API user for implementati +ons other than the default SOAP::Lite dependency. To override this class, provide the subroutines for new, open, and sen +d. =head2 System Requirements The Service-now Perl API requires Perl 5.8 with the following modules +installed * SOAP::Lite (prerequisites 0.71 o +r later * Crypt::SSLeay * IO::Socket::SSL =cut # implement SOAP::Lite's basic auth strategy sub SOAP::Transport::HTTP::Client::get_basic_credentials { return $CONFIG->getUserName() => $CONFIG->getUserPassword(); } sub new { my ($class, $conf, $target) = (shift, shift, shift); # copy to global my $me = {}; $CONFIG = $conf; $me->{'SOAP'} = SOAP::Lite -> proxy($CONFIG->getSoapEndPoint($target)); bless($me, $class); return $me; } sub open { #print "connection open() is not implemented\n"; } sub send { my ($me, $methodName, %hash) = (shift, shift, %{(shift)}); my $METHOD = SOAP::Data->name($methodName) ->attr({xmlns => '' . $methodName}); my(@PARAMS); my($key); foreach $key (keys(%hash)) { push(@PARAMS, SOAP::Data->name($key => $hash{$key})); } my $RESULT = $me->{'SOAP'}->call($METHOD => @PARAMS); # return the element within the Body element, removing SOAP::Lite de +pendencies return $RESULT->valueof('Body'); } sub close { #print "connection close() is not implemented\n"; } 1;
      I should also say that the same code works fine on a different machine.

      This @ISA my( $cool ) %SIG

        I don't see the call to http_connect() in this code that you posted. What i would do, and this is not very scientific at all, is simply add a line of code (or two) before the call to SUPER::configure() in the http_connect() method (if you can):

        # untested ... look up the docs for caller() use Data::Dumper; warn Dumper { self => $self, caller => [ caller() ] };
        And see if that helps you get to the root of the problem.


        (the triplet paradiddle with high-hat)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1086389]
Approved by mr_mischief
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-12-04 20:13 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (30 votes). Check out past polls.