Skip Menu |
 

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

Report information
The Basics
Id: 86142
Status: open
Priority: 0/
Queue: SOAP-WSDL

People
Owner: Nobody in particular
Requestors: npbroadcast [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Missing XML declaration in request [patch]
Download (untitled) / with headers
text/plain 395b
The XML generated by SOAP::WSDL::Serializer::XSD does not include a declaration at the start. Some web services will not accept requests without a declaration. W3C recommendation states "XML documents should begin with an XML declaration which specifies the version of XML being used." See: http://www.w3.org/TR/xml/#sec-prolog-dtd The attached patch adds a declaration to the generated XML.
Subject: add_xml_declaration.diff
--- SOAP/WSDL/Serializer/XSD.pm.orig 2013-06-11 12:31:19.000000000 +0100 +++ SOAP/WSDL/Serializer/XSD.pm 2013-06-14 11:45:11.000000000 +0100 @@ -30,7 +30,7 @@ my $soap_prefix = $opt->{ namespace }->{ $SOAP_NS }; # envelope start with namespaces - my $xml = "<$soap_prefix\:Envelope "; + my $xml = qq|<?xml version="1.0" ?><$soap_prefix\:Envelope |; while (my ($uri, $prefix) = each %{ $opt->{ namespace } }) {
Download (untitled) / with headers
text/plain 315b
Show quoted text
> The attached patch adds a declaration to the generated XML.
I forked this module on GITPAN so I could make it pass tests cleanly on perl-5.19.9, and I added this patch there: https://github.com/scrottie/SOAP-WSDL I might ask to take over maintenance of this module. Just a heads up. Thanks for the patch.
Download (untitled) / with headers
text/plain 146b
This ticket needs to be closed, as the patch has already been applied and shipped to CPAN. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.