SOAP::Lite serializer for xsd:anyURI

I

iamdannywa

I had a SOAP funtion make a generic return of an untyped array which
consisted of a URL and a file path (for maintaining an image
repository). The function worked as expected until it encountered an
address (URL) that had multiple query parameters and thus a bare '&' in
the URL.

The SOAP::Lite serializer typed the content as anyURI just as you would
expect from teh documentation. However, the serializer did not encode
the '&' as '&' and the XML validation of the SOAP envelope failed.

Should the serializer of type anyURI entity encode to render valid XML?
I think so, but I cannot find any documentation to argue either way.
Here is a snippet of server code. it will showcase the problem I am
experiencing. In this example I type the return values. In my actual
webservice I allowed SOAP::Lite to type it and it will always type a
URL formatted string as anyURI.

CODE:::


BEGIN {
package SOAP_ImageMgr;
sub Hello {
my $self = shift;
my $badURI = 'http://www.com/cgi?text=Hello World&doit=Goodbye';
return (
SOAP::Data->type('anyURI')->value($badURI),
SOAP::Data->type('string')->value($badURI)
);
}
1;
}
use SOAP::Transport::HTTP;
our $srv = SOAP::Transport::HTTP::CGI->dispatch_to('SOAP_ImageMgr');
$srv->serializer->encoding();
$srv->handle();

Where to go from here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top