So I have a custom module setup, heres the subroutine within it

sub new { my ($self, $settings) = (@_); die('Server not set for connection settings') if(!$settings->{ +'server'}); die('Username not set for connection settings') if(!$settings->{'u +sername'}); die('Password not set for connection settings') if(!$settings->{'p +assword'}); $settings->{'protocol'} = ($settings->{'protocol'}) ? $setting +s->{'protocol'} : "https"; $settings->{'port'} = ($settings->{'port'}) ? $settings->{' +port'} : "443"; my $proxy_uri = sprintf("https://%s:%s@%s:443/iControl/iControlPor +tal.cgi", $settings->{'username'},$settings->{'password'},$settings-> +{'server'}); $self->debug("Connection Settings:\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +>>>>>>>>>>\n". Dumper($settings)."<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<"); $self->debug("Connection URI: $proxy_uri"); $soap = SOAP::Lite->proxy($proxy_uri); if($soap->fault) { print "\nSoap Fault: ".$soap->faultcode." ".$soap->faultstring +." ".$soap->faultdetail."\n\n"; } return $soap; }

Pretty basic right? Just makes a soap authentication request. Heres the weird part. Notice I didnt make it die() if $soap->fault;, I just let it try to continue. Well, it throws an error, but it actually returns the expected data! Here it is:

Soap Fault: 1 1 1 Members in first pool: $VAR1 = bless( { 'address' => '1.2.3.4', 'port' => '80' }, 'Common::IPPortDefinition' );

So the code, string and detail are all just "1".... not much detail right? Now when I actually do a Data::Dumper on the faultcode, it shows a ton of data, and I found this in it.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode> <faultstring xsi:type="xsd:string">Unknown method &quot;{Unspecified}:faultcode +&quot;</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Soooo the fault code, is unknown method: faultcode?... Someone make it make sense, lol


In reply to SOAP::Lite fault seems faulty by jhyland87

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.