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

SOAP::Lite & character encoding oddness making XML::Parser upset

Expand Messages
  • stevejhoran
    Hi all, I am having some issues with SOAP::Lite in conjunction with XML::Parser. After performing my SOAP query, I am getting returned XML data that claims to
    Message 1 of 1 , Jun 25, 2003
    • 0 Attachment
      Hi all,

      I am having some issues with SOAP::Lite in conjunction with
      XML::Parser.

      After performing my SOAP query, I am getting returned XML data that
      claims to be encoded at UTF-16, but in fact is not. Further
      investigation has shown that the SOAP server is indeed sending UTF-16
      encoded data, and somewhere in my perl script it's being converted to
      a different format. (I think it may be UTF-8)

      I have done some documentation reading, and I can see references to
      specifying the encoding being used for making the SOAP query, but
      nothing that refers to what SOAP::Lite should return the data as.

      This is causing a couple of issues, mainly that XML::Parser refuses
      to work with it due to the XML saying it's of type UTF-16 when it
      isn't. I can do a kludge of s/UTF-16/UTF-8/g and then it will parse,
      and on the most part it is fine, but some characters, such as
      apostrophe's are not displayed correctly, and instead appear as 3 non-
      english characters.

      Any suggestions would be greatly appreciated. Please reply directly,
      as my subscription to this list is set to "no mail"

      FYI: I am using Perl 5.6.1, SOAP::Lite 0.55

      The parts of my code that might be of interest are:

      $soap = SOAP::Lite -> service('file:./abcd_live_api.wsdl');
      $results = $soap->GetCountryStateArea($abcd_key, 'Australia', $state);

      Regards,

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