Skip Menu |

This queue is for tickets about the XML-Compile-SOAP CPAN distribution.

Report information
The Basics
Id: 38560
Status: resolved
Priority: 0/
Queue: XML-Compile-SOAP

People
Owner: Nobody in particular
Requestors: tom@eborcom.com (no email address)
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.77
Fixed in: (no value)



Subject: XML::Compile::SOAP silently ignores LWP lacking SSL support
Hi, I tried using XML::Compile::SOAP with a Perl binary that lacks SSL support for LWP. My SOAP calls failed silently, so I ran my script with "-MLWP::Debug=+" and got the following output: LWP::UserAgent::send_request: https URLs are among LWP::UserAgent=HASH(0x8d39a70)'s allowed protocols (http https) LWP::UserAgent::request: Simple response: Not Implemented When I install Crypt::SSLeay, I no longer see this problem. I'm surprised that XML::Compile doesn't catch this problem at run time. Please let me know if I can provide any more information to help with this so other users don't encounter this problem. Thanks, Tom Hukins
Subject: Re: [rt.cpan.org #38560] XML::Compile::SOAP silently ignores LWP lacking SSL support
Date: Mon, 18 Aug 2008 16:13:23 +0200
To: "tom [...] eborcom.com via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: NLnet webmaster <webmaster [...] nlnet.nl>
* tom@eborcom.com via RT (bug-XML-Compile-SOAP@rt.cpan.org) [080818 13:59]: Show quoted text
> Mon Aug 18 09:59:56 2008: Request 38560 was acted upon. > Transaction: Ticket created by tom@eborcom.com > Queue: XML-Compile-SOAP > Subject: XML::Compile::SOAP silently ignores LWP lacking SSL support > Broken in: 0.77 > > I tried using XML::Compile::SOAP with a Perl binary that lacks SSL > support for LWP. > When I install Crypt::SSLeay, I no longer see this problem. > > I'm surprised that XML::Compile doesn't catch this problem at run time. > Please let me know if I can provide any more information to help with > this so other users don't encounter this problem.
Could you send me the trace output: my ($answer, $trace) = $call->($request); use Data::Dumper; print Dumper $trace; -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
From: tom [...] eborcom.com
On Mon Aug 18 10:14:08 2008, webmaster@nlnet.nl wrote: Show quoted text
> Could you send me the trace output:
Here's the output as YAML, with the request's content removed as it contains sensitive information: http_request: &1 !!perl/hash:HTTP::Request _content: | <?xml version="1.0" encoding="UTF-8"?> CONTENT REMOVED _headers: !!perl/hash:HTTP::Headers content-length: 358 content-type: text/xml; charset="utf-8" soapaction: '""' user-agent: libwww-perl/5.814 x-lwp-version: 5.814 x-xml-compile-soap-version: 0.77 x-xml-compile-version: 0.93 _method: POST _protocol: HTTP/1.1 _uri: !!perl/scalar:URI::https https://www.salesforce.com/services/Soap/c/13.0 http_response: !!perl/hash:HTTP::Response _content: | LWP will support https URLs if the Crypt::SSLeay module is installed. More information at <http://www.linpro.no/lwp/libwww-perl/README.SSL>. _headers: !!perl/hash:HTTP::Headers client-date: 'Mon, 18 Aug 2008 15:32:20 GMT' client-warning: Internal response content-type: text/plain _msg: Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) _rc: 501 _request: *1 parse_elapse: 8.70227813720703e-05 start: 1219073540.02724 stringify_elapse: 0.000191211700439453 transport_elapse: 0.076862096786499 transport_end: 1219073540.10523 transport_start: 1219073540.02837 Thanks for your quick reply. Tom
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #38560] XML::Compile::SOAP silently ignores LWP lacking SSL support
Date: Mon, 18 Aug 2008 20:49:36 +0200
To: "tom [...] eborcom.com via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: NLnet webmaster <webmaster [...] nlnet.nl>
* tom@eborcom.com via RT (bug-XML-Compile-SOAP@rt.cpan.org) [080818 15:35]: Show quoted text
> Queue: XML-Compile-SOAP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=38560 >
Hum. Nice debugging output ;-)) What about this? Add to XML/Compile/Transport/SOAPHTTP.pm line 155: my $response = $ua->request($request) or return undef; $trace->{http_response} = $response; + if($response->is_error) + { my $cw = $response->header('Client-Warning'); + error $cw if $cw; + + notice $response->message; + return undef; + } $response->content_type =~ m![/+]xml$!i ? $response->decoded_content : undef; I do not know (yet) whether to die on connection errors as well... Probably not, because you may wish to connect to an alternative server. What do you think? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Can you please check whether my suggested patch works?
Subject: Re: [rt.cpan.org #38560] XML::Compile::SOAP silently ignores LWP lacking SSL support
Date: Sun, 7 Sep 2008 19:31:03 +0100
To: NLnet webmaster via RT <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Tom Hukins <tom [...] eborcom.com>
On Mon, Aug 18, 2008 at 02:50:15PM -0400, NLnet webmaster via RT wrote: Show quoted text
> What about this? > Add to XML/Compile/Transport/SOAPHTTP.pm line 155:
This change causes my script to say: error: Internal response which doesn't cause me to think "Ah, I need Net::SSL - I should go and install that" although it's an improvement over the silent failure. Show quoted text
> I do not know (yet) whether to die on connection errors as well... > Probably not, because you may wish to connect to an alternative > server.
I'd suggest that scripts die if they can't connect to a server: it's something that prevents a program continuing. If users want to trap that failure and connect to an alternative server, they can do so within an eval block as per Perl's conventions. Apologies for the slow reply - I hope this is better late than never. If you have access to an HTTPS enabled SOAP server, you can see this behaviour with: % mv "$(perldoc -l Net::SSL)" "$(perldoc -l Net::SSL).was" (and then move the .was file back in place afterwards) You will need to do the same with IO::Socket::SSL if you have that installed. Tom
Subject: Re: [rt.cpan.org #38560] XML::Compile::SOAP silently ignores LWP lacking SSL support
Date: Fri, 12 Sep 2008 13:23:45 +0200
To: "tom [...] eborcom.com via RT" <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* tom@eborcom.com via RT (bug-XML-Compile-SOAP@rt.cpan.org) [080907 18:31]: Show quoted text
> > Add to XML/Compile/Transport/SOAPHTTP.pm line 155:
> > This change causes my script to say: > error: Internal response
Ok, but code flow proven. Small improvement Change XML/Compile/Transport/SOAPHTTP.pm line 155: my $response = $ua->request($request) or return undef; $trace->{http_response} = $response; if($response->is_error) - { my $cw = $response->header('Client-Warning'); - error $cw if $cw; + { error $response->message if $response->header('Client-Warning'); notice $response->message; return undef; } $response->content_type =~ m![/+]xml$!i ? $response->decoded_content : undef; -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #38560] XML::Compile::SOAP silently ignores LWP lacking SSL support
Date: Fri, 12 Sep 2008 13:05:24 +0100
To: Mark Overmeer via RT <bug-XML-Compile-SOAP [...] rt.cpan.org>
From: Tom Hukins <tom [...] eborcom.com>
On Fri, Sep 12, 2008 at 07:24:17AM -0400, Mark Overmeer via RT wrote: Show quoted text
> if($response->is_error) > - { my $cw = $response->header('Client-Warning'); > - error $cw if $cw; > + { error $response->message if $response->header('Client-Warning');
Excellent! That's much better. Many thanks, Tom
oops, forgot to close this ticket.