Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-09-03 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls