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

question about base64 encoding

Expand Messages
  • Mark Wilkinson
    Hi all! Using SOAP::Lite on the client side, I have data which is being passed to me as: xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64 and these
    Message 1 of 3 , Mar 4, 2004
    • 0 Attachment
      Hi all!

      Using SOAP::Lite on the client side, I have data which is being passed
      to me as:

      xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64

      and these are decoded automatically by SOAP::Lite. Wonderful! However,
      when data is passed to me as:

      xsi:type = http://www.w3.org/2001/XMLSchema/base64Binary

      SOAP::Lite does not automatically decode it. This is surprising,
      because the definition of SOAP-ENC:base64 is:

      <xs:simpleType name="base64">
      <xs:restriction base="xs:base64Binary"/>
      </xs:simpleType>

      So the two really should be handled identically (or??).

      The same does *not* hold true for strings; data (in particular, escaped
      XML) with SOAP-ENC:string are de-escaped by SOAP::Lite on the receiving
      end, as are those encoded as xs:string - there is no (visible)
      difference in behaviour in these two cases.

      Am I missing something, or is this a bug in the way SOAP::Lite handles
      base64 data?

      Any advice appreciated!

      Mark


      --
      Mark Wilkinson (mwilkinson@...)
      University of British Columbia iCAPTURE Centre
    • Mark Wilkinson
      Hi all! Using SOAP::Lite on the client side, I have data which is being passed to me as: xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64 and these
      Message 2 of 3 , Mar 9, 2004
      • 0 Attachment
        Hi all!

        Using SOAP::Lite on the client side, I have data which is being passed
        to me as:

        xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64

        and these are decoded automatically by SOAP::Lite. Wonderful! However,
        when data is passed to me as:

        xsi:type = http://www.w3.org/2001/XMLSchema/base64Binary

        SOAP::Lite does not automatically decode it. This is surprising,
        because the definition of SOAP-ENC:base64 is:

        <xs:simpleType name="base64">
        <xs:restriction base="xs:base64Binary"/>
        </xs:simpleType>

        So the two really should be handled identically (or??).

        The same does *not* hold true for strings; data (in particular, escaped
        XML) with SOAP-ENC:string are de-escaped by SOAP::Lite on the receiving
        end, as are those encoded as xs:string - there is no (visible)
        difference in behaviour in these two cases.

        Am I missing something, or is this a bug in the way SOAP::Lite handles
        base64 data?

        Any advice appreciated!

        Mark


        --
        Mark Wilkinson (mwilkinson@...)
        University of British Columbia iCAPTURE Centre
      • Byrne Reese
        This is most likely an artifact of SOAP::Lite using the 1999 XML Schema as opposed to the 2001 now recommended by the WS-i. I just tested this to ensure that
        Message 3 of 3 , Oct 10, 2004
        • 0 Attachment
          This is most likely an artifact of SOAP::Lite using the 1999 XML Schema as opposed to the 2001 now recommended by the WS-i. I just tested this to ensure that the next release of SOAP::Lite will have this fixed.

          If you wish to change the XML Schema version yourself, then use the following code:

          $SOAP::Constants::DEFAULT_XML_SCHEMA = 'http://www.w3.org/2001/XMLSchema';

          Mark Wilkinson wrote:
          Hi all!

          Using SOAP::Lite on the client side, I have data which is being passed
          to me as:

          xsi:type = http://schemas.xmlsoap.org/soap/encoding/base64

          and these are decoded automatically by SOAP::Lite.  Wonderful!  However,
          when data is passed to me as:

          xsi:type = http://www.w3.org/2001/XMLSchema/base64Binary

          SOAP::Lite does not automatically decode it.  This is surprising,
          because the definition of SOAP-ENC:base64 is:

          <xs:simpleType name="base64">
          <xs:restriction base="xs:base64Binary"/>
          </xs:simpleType>

          So the two really should be handled identically (or??).

          The same does *not* hold true for strings; data (in particular, escaped
          XML) with SOAP-ENC:string are de-escaped by SOAP::Lite on the receiving
          end, as are those encoded as xs:string - there is no (visible)
          difference in behaviour in these two cases.

          Am I missing something, or is this a bug in the way SOAP::Lite handles
          base64 data?

          Any advice appreciated!

          Mark


          --
          Mark Wilkinson (mwilkinson@...)
          University of British Columbia iCAPTURE Centre

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