Reputation: 103
Years ago I wrote a few Perl SOAP::Transport::HTML servers running on Windows Server 2000. On that machine, when the service's return string contained characters that might break the soap envelope, perl automatically encoded the string as base64, which the client then handled.
Recently, the scripts have been moved to a machine running Server 2008 and Perl 5.22.1. The service works fine except when the return string has such characters: the string is not encoded and the SOAP envelop returns to the client empty.
How can I force my return string to be base64? Of course I can use MIME::base64 to encode the string, but the SOAP envelop still indicates type text and is not converted correctly on the client side.
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('MyMod')
-> handle;
Upvotes: 3
Views: 99
Reputation: 103
I ended up using MIME::base64 to encode the string and finagled the response such that the client would decode the response string as base64, even though the soap response continues to indicate type string. Works for me--good enough for this very specific application.
Still couldn't find how to otherwise force perl to encode the response.
Upvotes: 0