Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: XML::LibXML https

by tobyink (Abbot)
on Nov 29, 2013 at 20:09 UTC ( #1065000=note: print w/replies, xml ) Need Help??

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 = ''; 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;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2016-10-23 08:25 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (300 votes). Check out past polls.