Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: XML::Compile problem in Win-based mod_perl app

by bart (Canon)
on Aug 05, 2012 at 22:03 UTC ( [id://985574]=note: print w/replies, xml ) Need Help??


in reply to XML::Compile problem in Win-based mod_perl app

Can't call method "parse_string" on unblessed reference at C:/Perl/site/lib/XML/Compile/Transport.pm line 77.
This obtuse error message simply means that you don't have an object. You now have to find out why.

Replies are listed 'Best First'.
Re^2: XML::Compile problem in Win-based mod_perl app
by stuckey (Novice) on Aug 06, 2012 at 02:29 UTC
    Thanks -- yes, it's definitely the case that the object isn't being created (ref unblessed). What's confounding us is why this is happening here and not when the same script runs in a Linux-based Apache/mod_perl setting or when the code is run on Windows as a standalone Perl script.

    For comparison, here are trace examples from both working and non-working login calls. Note the error field near the end of the second (breaking example) trace:

    START TRACE FOR WORKING LOGIN ==============

    
     TRACE INFO:$VAR1 = bless( {
      'transport_end' => '1344195499.00649',
      'parse_elapse' => '0.000446081161499023',
      'connect_elapse' => '0.420936822891235',
      'stringify_elapse' => '5.19752502441406e-005',
      'response_dom' => bless( do{\(my $o = 79470568)}, 'XML::LibXML::Document' ),
      'http_response' => bless( {
        '_protocol' => 'HTTP/1.1',
        '_content' => '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><LoginResponse xmlns="http://somedomain.com"><LoginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Error i:nil="true"/><Session><Organisation>string<SessionId>sessidstring</SessionId><User><Email>dude@somedomain.com</Email><FacilityIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">guidstringguidstringguidstringaguidstring</FacilityIds><FirstName>UserFirstName</FirstName><GroupId>groupidstring</GroupId><Id>idstring</Id><Inactive>false</Inactive><LastName>UserLastName</LastName></User></Session></LoginResult></LoginResponse></s:Body></s:Envelope>',
        '_rc' => 200,
        '_headers' => bless( {
          'client-date' => 'Sun, 05 Aug 2012 19:38:18 GMT',
          'x-powered-by' => 'ASP.NET',
          'content-type' => 'text/xml; charset=utf-8',
          'client-response-num' => 1,
          'date' => 'Sun, 05 Aug 2012 19:38:18 GMT',
          'client-peer' => '168.63.166.222:80',
          'server' => 'Microsoft-IIS/7.5',
          'content-length' => '1149'
        }, 'HTTP::Headers' ),
        '_msg' => 'OK',
        '_request' => bless( {
          '_content_ref' => 1,
          '_content' => \'<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><tns:Login xmlns:tns="http://somedomain.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:email>someguy@somedomain.com</tns:email><tns:password>passwordstring</tns:password><tns:ip>someip</tns:ip></tns:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ',
          '_protocol' => 'HTTP/1.1',
          '_uri' => bless( do{\(my $o = 'http://somedomain.com/AppService.svc')}, 'URI::http' ),
          '_headers' => bless( {
            'user-agent' => 'libwww-perl/6.04',
            'x-xml-compile-soap-version' => '2.28',
            'x-xml-compile-cache-version' => '0.991',
            'content-length' => 407,
            'soapaction' => '"http://somedomain.com/AppService/Login"',
            'x-xml-libxml-version' => '2.0003',
            'x-xml-compile-version' => '1.25',
            'content-type' => 'text/xml; charset="utf-8"',
            'x-lwp-version' => '6.04'
          }, 'HTTP::Headers' ),
          '_method' => 'POST'
        }, 'HTTP::Request' )
      }, 'HTTP::Response' ),
      'encode_elapse' => '0.000396013259887695',
      'elapse' => '0.470435857772827',
      'transport_elapse' => '0.421434879302979',
      'http_request' => $VAR1->{'http_response'}{'_request'},
      'decode_elapse' => '0.0486049652099609',
      'start' => '1344195498.41262',
      'transport_start' => '1344195498.28505'
    }, 'XML::Compile::SOAP::Trace' );
    
    END TRACE FOR WORKING LOGIN

    =============================
    START TRACE FOR BREAKING LOGIN

     TRACE INFO:$VAR1 = bless( {
      'transport_end' => '1344194990.68682',
      'parse_elapse' => '0.0023648738861084',
      'connect_elapse' => '0.311218023300171',
      'stringify_elapse' => '5.60283660888672e-005',
      'http_response' => bless( {
        '_protocol' => 'HTTP/1.1',
        '_content' => '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><LoginResponse xmlns="http://somedomain.com"><LoginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Error i:nil="true"/><Session><Organisation>wcat1<DiscountRate>0.00</DiscountRate><FYStartMonth>0</FYStartMonth><Id>6ad37dcb-b962-4867-ac39-d6c3ab2879ed</Id><Inactive>false</Inactive><InflationRate>0.00</InflationRate><Name>Sample Sessoin</Name></Organisation><SessionId>sessionstring</SessionId><User><Email>someguy@somedomain.com</Email><FacilityIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">guidstringguidstringguidstringguidstring</FacilityIds><FirstName>FirstName</FirstName><GroupId>numbersstuff</GroupId><Id>numbersandletters</Id><Inactive>false</Inactive><LastName>LastName</LastName></User></Session></LoginResult></LoginResponse></s:Body></s:Envelope>',
        '_rc' => 200,
        '_headers' => bless( {
          'client-date' => 'Sun, 05 Aug 2012 19:29:50 GMT',
          'x-powered-by' => 'ASP.NET',
          'content-type' => 'text/xml; charset=utf-8',
          'client-response-num' => 1,
          'date' => 'Sun, 05 Aug 2012 19:29:50 GMT',
          'client-peer' => 'ip.address',
          'server' => 'Microsoft-IIS/7.5',
          'content-length' => '1149'
        }, 'HTTP::Headers' ),
        '_msg' => 'OK',
        '_request' => bless( {
          '_content_ref' => 1,
          '_content' => \'<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><tns:Login xmlns:tns="http://somdomain.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:email>name@addr.com</tns:email><tns:password>passwordstring</tns:password><tns:ip>ip.addr</tns:ip></tns:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ',
          '_protocol' => 'HTTP/1.1',
          '_uri' => bless( do{\(my $o = 'http://somedomain.com/AppService.svc')}, 'URI::http' ),
          '_headers' => bless( {
            'user-agent' => 'libwww-perl/6.04',
            'x-xml-compile-soap-version' => '2.28',
            'x-xml-compile-cache-version' => '0.991',
            'content-length' => 407,
            'soapaction' => '"http://somedomain.com/IAppService/Login"',
            'x-xml-libxml-version' => '2.0003',
            'x-xml-compile-version' => '1.25',
            'content-type' => 'text/xml; charset="utf-8"',
            'x-lwp-version' => '6.04'
          }, 'HTTP::Headers' ),
          '_method' => 'POST'
        }, 'HTTP::Request' )
      }, 'HTTP::Response' ),
      'encode_elapse' => '0.000400066375732422',
      'error' => 'Can\'t call method "parse_string" on unblessed reference at C:/strawberry/perl/site/lib/XML/Compile/Transport.pm line 82.
    ',
      'elapse' => '0.314038991928101',
      'transport_elapse' => '0.313638925552368',
      'http_request' => $VAR1->{'http_response'}{'_request'},
      'start' => '1344194990.37278',
      'transport_start' => '1344194990.37318'
    }, 'XML::Compile::SOAP::Trace' );
    
    END TRACE FOR BREAKING LOGIN ==============

    The reason for the unblessed ref isn't clear to us at this point. Any suggestions are most welcome.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://985574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-26 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found