http://www.perlmonks.org?node_id=1065000


in reply to XML::LibXML https

The easy way would be to retrieve the file into a string and then parse the string as XML; for example...

use HTTP::Tiny; my $wsdlResponse = HTTP::Tiny->new->get($wsdlURL); $wsdlResponse->{success} or die; my $wsdlXML = XML::LibXML->new->parse_file($wsdlResponse->{content});
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: XML::LibXML https
by agentorange (Sexton) on Dec 04, 2013 at 10:13 UTC
    Thank you for clarifying a part I was not understanding. I am of course ultimately just retrieving a string. It's much easier to solve a problem when you understand the problem! ;o)

    With your explanation I've resolved it like so.

    # WSDL URL location and method my $wsdlURL = 'http://my.server.net/callback?wsdl'; my $method = 'UpdateStatus'; # Retrieve WSDL # # During dev ignore SSL cert errors my $ua = LWP::UserAgent->new ( ssl_opts => { verify_hostname => 0, SSL_verify_mode => 0x00 }); # Get WSDL # my $response = $ua->get( $wsdlURL ); $wsdlXML = XML::LibXML->load_xml(string => $response->content, recover + => 2 ); print Dumper $wsdlXML if $debug;