Loading ...
Sorry, an error occurred while loading the content.
 

How to set "Server SOAP Encoding"?

Expand Messages
  • Huebner, Malte
    Hi all, how do i instruct my SOAP::Lite server to response with ISO-8859-1 and not utf-8? Is it possible to=20 set the encoding in SOAP::Lite or do i have to
    Message 1 of 4 , Jul 15, 2004
      Hi all,

      how do i instruct my SOAP::Lite server to response with ISO-8859-1 and not utf-8? Is it possible to=20 set the encoding in SOAP::Lite or do i have to configure my apache for this? Would be the other solution to submit äöü-characters (german umlauts) base64 encoded ?

      Best regards,
      Malte
    • Duncan Cameron
      ... You can set the encoding for a HTTP daemon as follows: $daemon- serializer- encoding( ISO-8859-1 ); A similar approach should work for a CGI (if that is
      Message 2 of 4 , Jul 15, 2004
        At 2004-07-15, 09:43:05 Huebner, Malte <malte.huebner@...> wrote:

        >Hi all,
        >
        >how do i instruct my SOAP::Lite server to response with
        >ISO-8859-1 and not utf-8? Is it possible to
        >set the encoding in SOAP::Lite or do i have to configure
        >my apache for this? Would be the other solution to
        >submit äöü-characters base64 encoded ?
        >
        You can set the encoding for a HTTP daemon as follows:

        $daemon->serializer->encoding('ISO-8859-1');

        A similar approach should work for a CGI (if that is what you are using).

        Note that the only effect of this is to modify the xml declaration

        <?xml version="1.0" encoding="ISO-8859-1"?>

        Regards
        Duncan
      • Duncan Cameron
        At 2004-07-15, 13:40:10 Huebner, Malte ... Well, looking at the docs, this would seem to be equivalent my $cgi =
        Message 3 of 4 , Jul 15, 2004
          At 2004-07-15, 13:40:10 Huebner, Malte <malte.huebner@...>
          wrote:

          >> You can set the encoding for a HTTP daemon as follows:
          >>
          >> $daemon->serializer->encoding('ISO-8859-1');
          >>
          >> A similar approach should work for a CGI (if that is what you
          >> are using).
          >>
          >> Note that the only effect of this is to modify the xml declaration
          >>
          >> <?xml version="1.0" encoding="ISO-8859-1"?>
          >
          >Thanks Duncan, I am using CGI - where can i use ->encoding() there?
          >
          Well, looking at the docs, this would seem to be equivalent

          my $cgi = SOAP::Transport::HTTP::CGI
          -> dispatch_to(...);

          $cgi->serializer->encoding('ISO-8859-1');

          $cgi->handle;

          Both SOAP::Transport::HTTP::Daemon and SOAP::Transport::HTTP::CGI inherit from SOAP::Transport::HTTP::Server which itself inherits from SOAP::Server, where the serializer() method is.

          Regards
          Duncan
        Your message has been successfully submitted and would be delivered to recipients shortly.