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

615Re: [soapbuilders] Changes on our validator

Expand Messages
  • Dave Winer
    Mar 30, 2001
    • 0 Attachment
      Fredrik I was wondering how your code could pass the validator without
      changes now that we are in the "parameter names not order" era. If I were to
      change the order of the parameters on the validator client, would that break
      you? If so, there's a problem because according to the rules I can change
      them at will, and you're supposed to still work. I didn't make these rules,
      btw. Dave


      ----- Original Message -----
      From: "Fredrik Lundh" <fredrik@...>
      To: <soapbuilders@yahoogroups.com>
      Sent: Thursday, March 29, 2001 11:03 PM
      Subject: Re: [soapbuilders] Changes on our validator


      > 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
      > }
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • Show all 9 messages in this topic