I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2012-08-14 00:03:10.381902-07 by chernomyrdin
Got error under apache2 mod_per2 Mason
In command-line module work OK, but if I try using XML::Compile under apache2+mod_perl2+HTML::Mason, I got strange error. My code:
# ... my $call = $self->{wsdl}->compileClient( operation => $service, endpoint => $self->{url}, ); # ... my ($res, $trace) = $call->( wsse_Security => $self->{auth} ); print STDERR "res = ", Dumper($res); print STDERR "trace = ", Dumper($trace);
Got error message:
res = $VAR1 = undef; trace = $VAR1 = bless( { 'transport_end' => '1344927523.95665', 'parse_elapse' => '0.00159311294555664', 'connect_elapse' => '0.0633130073547363', 'stringify_elapse' => '6.69956207275391e-05', 'http_response' => bless( { '_protocol' => 'HTTP/1.1', '_content' => '<soap:Envelope xmlns:soap="http://schem +as.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getVenueListResponse xmlns:ns2="http://services.api +.gate.pmisoft.ru/"><venueList><id>1</id><name>Test place</name></venueList></ns2:getVenueListRespo +nse></soap:Body></soap:Envelope>', '_rc' => 200, '_headers' => bless( { 'client-date' => 'Tue, 14 Aug 2 +012 06:58:43 GMT', 'content-type' => 'text/xml;cha +rset=UTF-8', 'client-response-num' => 1, 'date' => 'Tue, 14 Aug 2012 07: +00:03 GMT', 'client-peer' => '172.27.35.11: +8080', 'content-length' => '290', 'server' => 'Apache-Coyote/1.1' }, 'HTTP::Headers' ), '_msg' => 'OK', '_request' => bless( { '_content_ref' => 1, '_content' => 'SCALAR(0x7ffac12 +b2858)', '_protocol' => 'HTTP/1.1', '_uri' => 'http://172.27.35.11: +8080/kassirgate/VenueService', '_headers' => 'HTTP::Headers=HA +SH(0x7ffac1282ba0)', '_method' => 'POST' }, 'HTTP::Request' ) }, 'HTTP::Response' ), 'encode_elapse' => '0.000475883483886719', 'error' => bless( { 'euid' => '33', 'uid' => '33', 'time' => 1344927523, 'egid' => '33 33', 'message' => 'Can\'t call method "parse_string" on unblessed r +eference at /usr/share/perl5/XML/Compile/Transport.pm line 77. ', 'trace' => bless( { 'ignore_class' => 'ARRAY(0x7ffabb4114d0)', 'ignore_package' => 'ARRAY(0x7ffabb4114a0) +', 'frames' => 'ARRAY(0x7ffac1309bd8)', 'max_arg_length' => 0, 'index' => undef, 'no_refs' => 1, 'raw' => 'ARRAY(0x7ffac1309c08)', 'respect_overload' => 0 }, 'Devel::StackTrace' ), 'format' => 'text', 'pid' => 12817, 'gid' => '33 33' }, 'HTML::Mason::Exception' ), 'elapse' => '0.0654489994049072', 'transport_elapse' => '0.0649731159210205', 'http_request' => $VAR1->{'http_response'}{'_request'}, 'start' => '1344927523.8912', 'transport_start' => '1344927523.89167' }, 'XML::Compile::SOAP::Trace' );
Workaround to fix this error: in file XML/Compile/Transport.pm near line 77.
my $xmlin; if($textin) { $xmlin = eval { XML::LibXML->load_xml( string => $textin ) }; if($@) { $trace->{error} = $@ } else { $trace->{response_dom} = $xmlin } }
Direct Responses: Write a response