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

Re: [soaplite] How can I change the encoding of the SOAP response on the server ?

Expand Messages
  • Juan F. Rodriguez
    El mar, 21-12-2004 a las 10:28, Holger Dürer escribió: Not an answer to your question, but have you considered fixing the encoding of your response to be
    Message 1 of 4 , Dec 22, 2004
    • 0 Attachment
      El mar, 21-12-2004 a las 10:28, Holger Dürer escribió:
      > Not an answer to your question, but have you considered fixing the
      > encoding of your response to be utf-8 instead of fixing the encoding
      > declaration? I would assume that returning proper utf-8 will save
      > hassle in the future rather than patching over problems in your code by
      > tweaking the declaration.
      >
      > Holger
      >
      >

      Sure, that's another option. I'm quite a newbie with Perl and
      I'm not sure about know how to translate iso-8859-1
      strings to UTF-8 strings ("Encoding" pm ?). Besides,
      we would like to make
      our web service available using different versions of Perl,
      because over the past 5 years we've been selling a range of
      products that are using from Perl-5.6.0 to Perl-5.8.

      I've tried to play a little bit with the encodings, but it's a
      big mess depending of the Perl version you are using. For example,
      If I read data from a file that contains non-ASCII characters,
      I still dont understand how that data is internally encoded by Perl.

      I received strange error messages when I tried to return "iso-8859-1"
      strings with SOAP::Lite using Perl-5.6.0....so I had to base64 encode
      the strings before returning them to fix it. (does base64 encoding
      on the server affect the performace ? I guess it does and performance
      is very important for us).

      Well....this is not related to the subject of my original
      mail....so thank you very much for all your answers, I'm learning
      things step by step... :-)






      > On Mon, 2004-12-20 at 18:04, Juan F. Rodriguez wrote:
      > > Hello everyone,
      > >
      > > I'm implementing a Web Service using SOAP::Lite
      > > perl module and I'm stalled. The server is always responding with
      > > "<?xml version="1.0" encoding="UTF-8">", but I would like to use
      > > encoding = 'ISO-8859-1', because the server sends some chars that
      > > are not UTF-8 encoded.
      > >
      > > I know how to change it on the clients, using $soap->encoding('...');
      > > but I dont know how to do it on the server side:
      > >
      > > #!/usr/bin/perl
      > >
      > > use SOAP::Transport::HTTP;
      > > use lib 'lib';
      > > use mymodule;
      > >
      > > my $soap = SOAP::Transport::HTTP::CGI->new();
      > > $soap->encoding('ISO-8859-1'); <--- this function call fails :-(
      > > $soap->serializer()->xmlschema('http://www.w3.org/2001/XMLSchema');
      > > $soap->dispatch_to('mymodule');
      > > $soap->handle;
      > >
      > > Can't locate object method "encoding" via package
      > > "SOAP::Transport::HTTP::CGI" at ./ws.cgi line 8
      > >
      > > Is it possible to change this thing on the server ?
      > >
      > > Thank you in advance and I'm looking forward to any reply.
      > >
      > >
      > >
      > >
      > > ____________________________________________________________________
      > > Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor --------------------~-->
      > $4.98 domain names from Yahoo!. Register anything.
      > http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/W6uqlB/TM
      > --------------------------------------------------------------------~->
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      > _____________________________________________________________________
      > Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es


      _____________________________________________________________________
      Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
    Your message has been successfully submitted and would be delivered to recipients shortly.