Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

Comment on Re: XML::LibXML https
Download Code
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 chilling in the Monastery: (5)
As of 2015-10-14 04:41 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (320 votes), past polls