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

Please help: Wide character problem using soap.lite

Expand Messages
  • frozenvillage
    Hi all I have a zip file to be transmitted as a string to the server. I use Soap::lite v0.55. But this soap.lite return an error that Wide Character in
    Message 1 of 4 , Aug 19, 2004
    • 0 Attachment
      Hi all

      I have a zip file to be transmitted as a string to the server. I use
      Soap::lite v0.55. But this soap.lite return an error that Wide
      Character in subroutine entry at Lite.pm line 129.

      Since I am new to this soap.lite, please somebody help me to solve
      this. I am dying to do this soap.lite. Thank you. This ispart of the
      code in lite.pm

      Do I haveto change the encoding? If yes, is it all this base64 that
      must be changed? to what?

      sub as_base64 {
      my $self = shift;
      my($value, $name, $type, $attr) = @_;
      require MIME::Base64;
      return [$name, {'xsi:type' => SOAP::Utils::qualify($self-
      >encprefix => 'base64'), %$attr}, MIME::Base64::encode_base64
      ($value,'')];
      }
    • Duncan Cameron
      ... Base64 is probably the simplest way to send the string, something like $soap- mymethod(SOAP::Data- type(base64 = $mystring)); Regards Duncan
      Message 2 of 4 , Aug 19, 2004
      • 0 Attachment
        At 2004-08-19, 08:45:29 frozenvillage <frozenvillage@...> wrote:

        >Hi all
        >
        >I have a zip file to be transmitted as a string to the server. I use
        >Soap::lite v0.55. But this soap.lite return an error that Wide
        >Character in subroutine entry at Lite.pm line 129.
        >
        >Since I am new to this soap.lite, please somebody help me to solve
        >this. I am dying to do this soap.lite. Thank you. This ispart of the
        >code in lite.pm
        >
        >Do I haveto change the encoding? If yes, is it all this base64 that
        >must be changed? to what?
        >
        >sub as_base64 {
        > my $self = shift;
        > my($value, $name, $type, $attr) = @_;
        > require MIME::Base64;
        > return [$name, {'xsi:type' => SOAP::Utils::qualify($self-
        >>encprefix => 'base64'), %$attr}, MIME::Base64::encode_base64
        >($value,'')];
        >}

        Base64 is probably the simplest way to send the string, something like

        $soap->mymethod(SOAP::Data->type(base64 => $mystring));

        Regards
        Duncan
      • frozenvillage
        ... like ... Hi Duncan, thanks for your reply. If the Base64 is the simplest way to send the string, why do I get this Wide Character problem. I do not send
        Message 3 of 4 , Aug 19, 2004
        • 0 Attachment
          > Base64 is probably the simplest way to send the string, something
          like
          >
          > $soap->mymethod(SOAP::Data->type(base64 => $mystring));
          >
          > Regards
          > Duncan

          Hi Duncan, thanks for your reply.

          If the Base64 is the simplest way to send the string, why do I get
          this "Wide Character" problem. I do not send any character like
          asian character or else, just plain english sentences which stored
          ad a compressed XML file (When I want to send this zip file, I read
          it as a binary, this binary is then treated as string).

          I downloaded this soap.lite, compile it to a dll file, without
          making any changes to the module. Is it the correct way?
        • Duncan Cameron
          ... Ah yes, SOAP::Lite probably detects that the string is binary and so sends as base64 automatically. ... I don t understand what you mean by this, compile
          Message 4 of 4 , Aug 20, 2004
          • 0 Attachment
            At 2004-08-20, 05:15:20 frozenvillage <frozenvillage@...> wrote:

            >> Base64 is probably the simplest way to send the string, something
            >like
            >>
            >> $soap->mymethod(SOAP::Data->type(base64 => $mystring));
            >>
            >> Regards
            >> Duncan
            >
            >Hi Duncan, thanks for your reply.
            >
            >If the Base64 is the simplest way to send the string, why do I get
            >this "Wide Character" problem. I do not send any character like
            >asian character or else, just plain english sentences which stored
            >ad a compressed XML file (When I want to send this zip file, I read
            >it as a binary, this binary is then treated as string).
            >
            Ah yes, SOAP::Lite probably detects that the string is binary and so
            sends as base64 automatically.

            >I downloaded this soap.lite, compile it to a dll file, without
            >making any changes to the module. Is it the correct way?

            I don't understand what you mean by this, 'compile to a dll'. Are you not running perl directly?

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