Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.soap.encode.main
on main (adrmsg, val, adrparent, name, customStructType=nil, customNamespace=nil, customNamespaceURI=nil, flEntityEncodeHighAscii=false) { <<Changes: <<03/19/01; 3:25:08 PM by JES <<Added support for encoding arrays of structs. When encoding arrays, pass in customArrayType, customNamespace, and customNamespaceURI. <<04/03/01; 7:47:48 PM by JES <<New optional parameter, flEntityEncodeHighAscii, specifies whether to entity-encode high-ascii characters when encoding strings. Default is false. This is passed to soap.encode.simpleType, soap.encode.array, and soap.encode.struct. <<04/07/01; 7:25:18 PM by JES <<Changed name of customArrayType parameter to customStructType. <<04/09/01; 2:22:43 PM by JES <<Fixed a bug where types were not always specified for scalar values. local (type); case typeof (val) { binaryType; booleanType; charType; dateType; doubleType; intType; longType; shortType; stringType; unknownType { return (soap.encode.simpleType (adrmsg, val, adrparent, name, flEntityEncodeHighAscii:flEntityEncodeHighAscii))}; listType { return (soap.encode.array (adrmsg, val, adrparent, name, customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii))}; tableType { return (soap.encode.struct (adrmsg, val, adrparent, name, customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii))}} else { scripterror ("Can't encode \"" + name + "\" because the encoding of type '" + string.typeToString (typeof (val)) + "' is not supported.")}; return (true)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.