The following operations are supported. For a formal definition, please review the Service Description.

Web Service Links

Namespace Children of ::wsdb::types::mywebservice::myString3

Namespace Code for ::wsdb::types::mywebservice::myString3

namespace eval ::wsdb::types::mywebservice::myString3 {
    variable base xsd::string
    variable maxLength 8
    variable pattern {\A[0-7]+\Z}
    variable validate ::wsdb::types::mywebservice::myString3::validate

}

Procedures in ::wsdb::types::mywebservice::myString3


proc ::wsdb::types::mywebservice::myString3::validate {
    value
    {errorListVar }
} {
    variable base
    variable maxLength
    variable pattern

    if {"$errorListVar" ne ""} {
        upvar $errorListVar errorList
    }

    set valid 0
    set errorList [list $value]

    while {1} {
        if {![::wsdb::types::${base}::validate $value]} {
            lappend errorList "failed base test $base"
            break
        }
        set valueLength [string length $value]
        if {$valueLength > 8} {
            lappend errorList "failed maxLength test foundLength ($valueLength) > maxLength (8)"
            break
        }
        if {![regexp $pattern $value]} {
            lappend errorList "failed pattern test using [list $pattern]"
            break
        }
        set valid 1
        break
    }

    return $valid
}