[Xml-compile] XML-compile: SOAPHTTP.pm

Patrick Powell papowell at astart.com
Mon Nov 20 15:46:33 GMT 2017


I just ran into this when I did some regression tests.

ProcessRequest: REQUEST 'GetDataRequest' TRACE bless( {
 > '0.533141851425171',
   'encode_elapse' => '0.016873836517334',
   'errors' => [
     bless( {
       'message' => bless( {
         '_domain' => 'xml-compile-soap',
         '_expand' => 1,
         '_join' => ' ',
         '_msgid' => 'answer is not xml but `{type}\'',
         '_use' => 
'/usr/local/lib/perl5/site_perl/XML/Compile/Transport/SOAPHTTP
.pm line 222',
         'type' => ''
       }, 'Log::Report::Message' ),


/usr/local/lib/perl5/site_perl/XML/Compile/Transport/SOAPHTTP.om
     my $parse  = sub
       { my $response = shift;
         UNIVERSAL::isa($response, 'HTTP::Response')
             or error __x"no response object received";

         my $ct       = $response->content_type || '';
         lc($ct) ne 'multipart/related'
             or error __x"remote system uses XOP, use XML::Compile::XOP";

         trace "received ".$response->status_line;

         $ct =~ m,[/+]xml$,i
             or error __x"answer is not xml but `{type}' '$ct'", type => 
$ct;

         # HTTP::Message::decoded_content() does not work for old Perls
         my $content = $response->decoded_content(ref => 1)
                    || $response->content(ref => 1);

         ($content, {});
       };

There does not appear to be a content_type for this response.
Where in the XML support does the 'content_type' for the response get added?

Some systems do not respond with a 'content_type' value of *xml* but
have content type 'text/plain', or even 'text/html'
Should there be an option to allow a set of content_types?

-- 
Patrick Powell                 Astart Technologies
papowell at astart.com            1530 Jamacha Rd, Suite X
Network and System             San Diego, CA 92019
   Consulting                   Cell 858-518-7581 FAX 858-751-2435
Web: papowell at astart dot com




More information about the Xml-compile mailing list