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

587Re: [soapbuilders] Changes on our validator

Expand Messages
  • Fredrik Lundh
    Mar 29, 2001
    • 0 Attachment
      paul wrote:
      > > soaplib.py 0.9.1 still validates -- without a single change to
      > > the code.
      >
      > The same thing is true about SOAP::Lite. I've just added
      > countTheEntities.

      I didn't even have to do that (ha! ;-)

      it was documented in the spec, but not implemented
      by their client. didn't realize that until I had the set
      up my server, of course...

      </F>

      PS. in case someone's interested, here's the *complete*
      validator implementation for Python:

      class Validator1:
      # see http://soap.weblogs.com/validator1

      def countTheEntities(self, str):
      return {
      "ctLeftAngleBrackets": str.count("<"),
      "ctRightAngleBrackets": str.count(">"),
      "ctAmpersands": str.count("&"),
      "ctApostrophes": str.count("'"),
      "ctQuotes": str.count('"')
      }

      def easyStructTest(self, struct):
      return struct["moe"] + struct["larry"] + struct["curly"]

      def echoStructTest(self, struct):
      return struct

      def manyTypesTest(self, *args):
      return args

      def moderateSizeArrayCheck(self, array):
      return array[0] + array[-1]

      def nestedStructTest(self, struct):
      entry = struct["year2000"]["month04"]["day01"]
      return entry["moe"] + entry["larry"] + entry["curly"]

      def simpleStructReturnTest(self, number):
      return {
      "times10": 10*number,
      "times100": 100*number,
      "times1000": 1000*number
      }
    • Show all 9 messages in this topic